From 02eb8d0829a78a30bdb6ce25f93858dfdd61c4dc Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期六, 07 九月 2024 19:06:14 +0800
Subject: [PATCH] bug

---
 pages/retrievalPage/index.js |   70 +++++++++++++++++++++++++++-------
 1 files changed, 55 insertions(+), 15 deletions(-)

diff --git a/pages/retrievalPage/index.js b/pages/retrievalPage/index.js
index 4346ab2..6886b17 100644
--- a/pages/retrievalPage/index.js
+++ b/pages/retrievalPage/index.js
@@ -38,37 +38,37 @@
       page: 1,
       total: 0,
     },
-    tabValue: 0,
+    tabValue: '0',
     tabPanelstyle: 'display:flex;justify-content:center;align-items:center;',
     // tab閫夐」
     tabList: [{
         title: "鍥句功",
         index: "0",
-        // bookTotal: this.data.bookTotal
+        bookTotal: 0
       },
       {
         title: "璇剧▼",
         index: "1",
-        // bookTotal: this.data.courseTotal
+        bookTotal: 0
       },
       {
         title: "鏁板瓧鏁欐潗",
         index: "2",
-        // bookTotal: this.data.digitalTextbooksTotal
+        bookTotal: 0
       }, {
         title: "涓撻",
         index: "3",
-        // bookTotal: this.data.seminarTotal
+        bookTotal: 0
       },
       {
         title: "涔︾洰",
         index: "4",
-        // bookTotal: this.data.bookFairTotal
+        bookTotal: 0
       },
       {
         title: "涔﹀睍",
         index: "5",
-        // bookTotal: this.data.biblioClassificationTotal
+        bookTotal: 0
       },
     ],
     tabsId: 0, //榛樿閫夊瀷涓鸿澶�
@@ -193,7 +193,8 @@
         'Name*': this.data.searchVal.trim(),
         '||author*': this.data.searchVal.trim(),
         '||isbn*': this.data.searchVal.trim(),
-        '||seriesName*': this.data.searchVal.trim()
+        '||seriesName*': this.data.searchVal.trim(),
+        '||projectLeader*': this.data.searchVal.trim()
       }
 
     }
@@ -235,7 +236,8 @@
         'Name*': this.data.searchVal.trim(),
         '||author*': this.data.searchVal.trim(),
         '||isbn*': this.data.searchVal.trim(),
-        '||seriesName*': this.data.searchVal.trim()
+        '||seriesName*': this.data.searchVal.trim(),
+        '||projectLeader*': this.data.searchVal.trim()
       }
     }
     //璇剧▼
@@ -428,7 +430,9 @@
       this.setData({
         bookData: datas1,
         bookTotal: data1.totalCount,
+        [`tabList[${0}].bookTotal`]: data1.totalCount
       })
+      console.log(this.data.tabList, 7777)
       //鏁板瓧璇剧▼    1
       const data2 = resp[1]
       const datas2 = handleQueryResourceListData({
@@ -437,7 +441,8 @@
       })
       this.setData({
         courseData: datas2,
-        courseTotal: data2.totalCount
+        courseTotal: data2.totalCount,
+        [`tabList[${1}].bookTotal`]: data2.totalCount
       })
       // 鏁板瓧鏁欐潗    2
       const data3 = resp[2]
@@ -447,7 +452,8 @@
       })
       this.setData({
         digitalTextbooksData: datas3,
-        digitalTextbooksTotal: data3.totalCount
+        digitalTextbooksTotal: data3.totalCount,
+        [`tabList[${2}].bookTotal`]: data3.totalCount
       })
       // 涓撻鐮旇   3
       const data4 = resp[3]
@@ -457,7 +463,8 @@
       })
       this.setData({
         seminarData: datas4,
-        seminarTotal: data4.totalCount
+        seminarTotal: data4.totalCount,
+        [`tabList[${3}].bookTotal`]: data4.totalCount
       })
       // 涔﹀睍      4
       const data5 = resp[4]
@@ -471,7 +478,8 @@
       // console.log(datas5, 'sadasd');
       this.setData({
         biblioClassificationData: datas5,
-        biblioClassificationTotal: data5.totalCount
+        biblioClassificationTotal: data5.totalCount,
+        [`tabList[${5}].bookTotal`]: data5.totalCount
       })
       this.setData({
         loading: false,
@@ -515,7 +523,8 @@
 
       this.setData({
         bookFairData: res.datas,
-        bookFairTotal: res.total
+        bookFairTotal: res.total,
+        [`tabList[${4}].bookTotal`]: res.total
       })
 
     })
@@ -549,6 +558,33 @@
         console.log('涓嬭浇鏂囦欢澶辫触', res);
       }
     });
+  },
+  openBookFair(event) {
+    const item = event.currentTarget.dataset.item
+    if (item.fileType == "pdf") {
+      wx.navigateTo({
+        url: "/packageBookService/pages/components/webView/index?md5=" +
+          item.freeFile +
+          "&fileName=" +
+          item.name +
+          "&fileType=" +
+          item.fileType + "&bookBuy=true"
+          // "&freePage=" +
+          // this.data.fileInfo.freePage +
+
+          +
+          "&bookId=" +
+          item.id,
+      });
+    } else {
+      Toast({
+        context: this,
+        selector: '#t-toast',
+        message: '姝や功涓嶈兘鏌ョ湅',
+        theme: 'warning',
+        direction: 'column',
+      });
+    }
   },
   onSearchSubmit() {
     this.setData({
@@ -898,7 +934,11 @@
     }
   },
   onTabsClick(event) {
-    console.log(`Click tab, tab-panel value is ${event.detail.value}.`);
+    console.log(`
+                      Click tab, tab - panel value is $ {
+                        event.detail.value
+                      }.
+                      `);
   },
   tabClick() {
     console.log(2323);

--
Gitblit v1.9.1