From dc934dfd63fecff84d0bf996418e041b9bd4ea59 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期二, 30 四月 2024 18:16:13 +0800
Subject: [PATCH] bug修改

---
 packageDomain/pages/sampleBookList/index.js |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/packageDomain/pages/sampleBookList/index.js b/packageDomain/pages/sampleBookList/index.js
index b86a4ca..afec91a 100644
--- a/packageDomain/pages/sampleBookList/index.js
+++ b/packageDomain/pages/sampleBookList/index.js
@@ -152,14 +152,17 @@
           // 鑾峰彇鐢宠娆℃暟
           that.getSelectPaperBookCount()
           that.getSelectBookCount()
-
         }
       })
     } else {
       that.setData({
         userInfo: JSON.parse(wx.getStorageSync(app.config.userInfoKey))
       })
-
+      const paperBookList = wx.getStorageSync('paperBookList') ? JSON.parse(wx.getStorageSync('paperBookList')).length : 0
+      const electronicBookList = wx.getStorageSync('electronicBookList') ? JSON.parse(wx.getStorageSync('electronicBookList')).length : 0
+      this.setData({
+        num: paperBookList + electronicBookList
+      })
     }
   },
 
@@ -348,9 +351,6 @@
   // 鑾峰彇鍥句功鍒楄〃
   getBookList(isReachBottom) {
     let that = this;
-    this.setData({
-      skeletonLoding: true
-    })
     let sort;
     let pathObj = {};
     if (that.data.pathList.length) {
@@ -512,11 +512,14 @@
   //楂樼骇鍒嗙被閫夋嫨
   onChangeIcon(e) {
     this.setData({
+      skeletonLoding: true,
+      bookList: [],
       'assortCheck.code': e.detail.value,
       stairCode: '',
       secondCode: '',
       path: `${e.detail.value}`,
       'iconList.value': e.detail.value,
+
     });
     this.getBookList(false);
     this.getStairList(this.data.assortCheck.code);
@@ -528,17 +531,20 @@
       `${this.data.assortCheck.code}\\${e.detail.value}` :
       this.data.assortCheck.code;
     this.setData({
+      skeletonLoding: true,
+      bookList: [],
       pathList: [],
       stairCode: e.detail.value,
       secondCode: '',
       path: path,
       'stairList.value': e.detail.value,
+      'secondList.value': ""
     });
     this.getBookList(false);
     this.getSecondList(path);
   },
-  // 浜岀骇鍒嗙被鍒囨崲
-  onChangeSecond(e) {
+  // 浜岀骇鍒嗙被鍒囨崲 
+  onConfirmSecond(e) {
     const pathList = [];
     for (let index = 0; index < e.detail.value.length; index++) {
       const element = e.detail.value[index];
@@ -549,17 +555,15 @@
       });
     }
     this.setData({
+      skeletonLoding: true,
       pathList: pathList,
       'secondList.value': e.detail.value,
     });
-
-  },
-  // 
-  onConfirmSecond() {
     this.getBookList(false);
   },
   onResetSecond() {
     this.setData({
+      pathList: [],
       'secondList.value': [],
     });
     this.getBookList(false);

--
Gitblit v1.9.1