From bbba5d26e9e26c910ed337dcb65f462752ee6dce Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期四, 12 九月 2024 09:11:47 +0800
Subject: [PATCH] fenxiang

---
 pages/digitalTextbooks/index.js |   39 ++++++++++++---------------------------
 1 files changed, 12 insertions(+), 27 deletions(-)

diff --git a/pages/digitalTextbooks/index.js b/pages/digitalTextbooks/index.js
index 374ff4d..d5bb7c2 100644
--- a/pages/digitalTextbooks/index.js
+++ b/pages/digitalTextbooks/index.js
@@ -21,7 +21,8 @@
     tabList: [],
     selectedIndex: 0,
     digitalTextbooksData: [],
-    path: "jsek_dTHigherEducation",
+    // path: "jsek_dTHigherEducation",
+    path: "*",
     loading: true,
     sorter: {
       value: "*",
@@ -115,6 +116,7 @@
   onShareAppMessage() {
 
   },
+  onShareTimeline() {},
   //鏂板姞鐨勫嚱鏁�
 
   getCourseTypeListList() {
@@ -142,11 +144,14 @@
       newData.forEach((item) => {
         item.titleIcon = getPublicImage(item.icon, '', '160')
       })
-
+      newData.unshift({
+        name: '鍏ㄩ儴',
+        refCode: '*'
+      })
       this.setData({
         tabList: newData
       })
-      console.log(this.data.tabList);
+      console.log(1, this.data.tabList);
 
     })
   },
@@ -159,34 +164,13 @@
   },
 
   selectTab(e) {
-    console.log(e);
     let index = e.detail.value
-    console.log(index);
     this.setData({
       selectedIndex: index
     })
-
-    if (index == 0) {
-      this.setData({
-        path: this.data.tabList[0].refCode
-      })
-
-    } else if (index == 1) {
-      this.setData({
-        path: this.data.tabList[1].refCode
-      })
-
-    } else if (index == 2) {
-      this.setData({
-        path: this.data.tabList[2].refCode
-      })
-
-    } else if (index == 3) {
-      this.setData({
-        path: this.data.tabList[3].refCode
-      })
-
-    }
+    this.setData({
+      path: this.data.tabList[index].refCode
+    })
     this.bookExhibitionGet()
 
   },
@@ -248,6 +232,7 @@
           ...searchObj
         }
       }).then((res) => {
+        res.datas.forEach(item => item.price = item.price.toFixed(2))
         this.setData({
           digitalTextbooksData: res.datas,
           loading: false

--
Gitblit v1.9.1