From 4a9955330070cf8abd78d95aaa2067d9a06a88c3 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期二, 07 五月 2024 10:05:59 +0800
Subject: [PATCH] 各页面bug修改

---
 pages/retrievalPage/index.js |   51 ++++++++-------------------------------------------
 1 files changed, 8 insertions(+), 43 deletions(-)

diff --git a/pages/retrievalPage/index.js b/pages/retrievalPage/index.js
index 331b16f..2ededee 100644
--- a/pages/retrievalPage/index.js
+++ b/pages/retrievalPage/index.js
@@ -39,14 +39,13 @@
       page: 1,
       total: 0,
     },
-    tabValue: ''
+    tabValue: '0'
   },
 
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
    */
   onLoad(options) {
-
     console.log(app.config.appId);
     const systInfo = wx.getSystemInfoSync();
     const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅
@@ -56,17 +55,14 @@
       barHeight: systInfo.statusBarHeight,
       searchVal: options.searchVal
     })
-
-
     this.retrievalPageGet()
     this.bibliographyGet()
     let event = {
       detail: {
-
         value: "0"
       }
     }
-    this.onTabsChange(event)
+    // this.onTabsChange(event)
   },
 
   /**
@@ -129,21 +125,15 @@
     this.bibliographyGet()
   },
 
-
   //鏍囩鐨勫垏鎹�
   onTabsChange(event) {
     const value = event.detail.value
-    // if (this.data.bookData <= 0 || this.data.courseData <= 0 || this.data.digitalTextbooksData <= 0 || this.data.seminarData <= 0 || this.data.biblioClassificationData <= 0 || this.data.bookFairData <= 0) {
-    //   this.setData({
-    //     isMore: true
-    //   })
-    // }
+    console.log(value);
     if (value === '0') {
       this.setData({
         tabValue: value,
         isMore: false
       })
-
     } else if (value === '1') {
       console.log(value, 'tab');
       this.setData({
@@ -171,14 +161,9 @@
         isMore: false
       })
     }
-
   },
 
-
-
-
   retrievalPageGet() {
-
     let fields = {
       liveTime: [],
       lecturer: [],
@@ -233,8 +218,6 @@
       ...searchObj,
       ...fields
     }
-
-
     let courseObj = {}
     if (this.data.searchVal) {
       courseObj = {
@@ -243,7 +226,6 @@
         '||isbn*': this.data.searchVal.trim(),
         '||seriesName*': this.data.searchVal.trim()
       }
-
     }
     //璇剧▼
     let queryCourse = {
@@ -426,7 +408,6 @@
       data: body
     }).then((resp) => {
       console.log(resp, 'resp');
-
       //鍥句功       0
       const data1 = resp[0]
       const datas1 = handleQueryResourceListData({
@@ -436,12 +417,7 @@
       this.setData({
         bookData: datas1,
         bookTotal: data1.totalCount,
-
       })
-
-
-
-
       //鏁板瓧璇剧▼    1
       const data2 = resp[1]
       const datas2 = handleQueryResourceListData({
@@ -452,9 +428,6 @@
         courseData: datas2,
         courseTotal: data2.totalCount
       })
-
-
-
       // 鏁板瓧鏁欐潗    2
       const data3 = resp[2]
       const datas3 = handleQueryResourceListData({
@@ -465,15 +438,12 @@
         digitalTextbooksData: datas3,
         digitalTextbooksTotal: data3.totalCount
       })
-
       // 涓撻鐮旇   3
-
       const data4 = resp[3]
       const datas4 = handleQueryResourceListData({
         datas: data4.datas,
         fields
       })
-
       this.setData({
         seminarData: datas4,
         seminarTotal: data4.totalCount
@@ -484,7 +454,6 @@
         datas: data5.datas,
         fields
       })
-
       datas5.forEach((items) => {
         items.subtitleName = items.subtitle + items.name
       })
@@ -493,18 +462,12 @@
         biblioClassificationData: datas5,
         biblioClassificationTotal: data5.totalCount
       })
-
       this.setData({
         loading: false,
         hidden: false,
       })
-
-
     })
     wx.stopPullDownRefresh()
-
-
-
   },
   bibliographyGet() {
     let bibliographyObj = {}
@@ -548,9 +511,7 @@
     wx.stopPullDownRefresh()
   },
   downloadData(event) {
-    console.log(111);
     const item = event.currentTarget.dataset.item;
-    // console.log(item.datas.freeFile.Value);
     const URL = app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.datas.freeFile.Value
     item.determine = false
     console.log(URL, 'URL');
@@ -579,6 +540,10 @@
     });
   },
   onSearchSubmit() {
+    this.setData({
+      loading: true,
+      hidden: true,
+    })
     console.log(this.data.searchVal);
     this.retrievalPageGet()
     this.bibliographyGet()
@@ -919,5 +884,5 @@
         }, 100)
       }
     }
-  }
+  },
 })
\ No newline at end of file

--
Gitblit v1.9.1