From aa2c08b3be23a01d44205b2c19d21a2bf53f944f Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期一, 01 四月 2024 16:15:38 +0800
Subject: [PATCH] 图书服务列表、详情页bug修改

---
 pages/bookExhibitionList/index.js |   52 +++++++++++++++++++++++++++++++++-------------------
 1 files changed, 33 insertions(+), 19 deletions(-)

diff --git a/pages/bookExhibitionList/index.js b/pages/bookExhibitionList/index.js
index 8569505..bd39345 100644
--- a/pages/bookExhibitionList/index.js
+++ b/pages/bookExhibitionList/index.js
@@ -26,9 +26,7 @@
     },
     product: {
       value: '*',
-
-      options: [
-        {
+      options: [{
           value: '*',
           label: '鎬诲垎绫�',
         },
@@ -59,16 +57,17 @@
     navBarHeight: '',
     barHeight: '',
     windowHeight: '',
+
   },
 
 
 
   /**
-    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
-    */
+   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
+   */
   onLoad(options) {
 
-
+    console.log(this.data.keynoteDisabled, 'keynoteDisabled');
     // console.log(this.data.filteredItems, 88888);
     const systInfo = wx.getSystemInfoSync();
     const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅
@@ -100,12 +99,14 @@
 
 
 
-
+    console.log(this.data.bookExhibitionList.length, 'this.data.bookExhibitionList.length');
     // 鏇存柊鏁版嵁
     this.setData({
       'multipleSelect.options': singleSelectOptions,
     });
 
+
+    // 
   },
 
   /**
@@ -120,8 +121,8 @@
    */
   onShow() {
     this.bookExhibitionGet()
-
     this.keyProjectsGet()
+
   },
 
   /**
@@ -222,12 +223,24 @@
       console.log(res, 'item');
       this.data.total = res.total
 
-      //  list.push(res.datas)
+      // list.push(res.datas)
+      console.log(res.datas.length);
+
+
+      if (res.datas.length == 0) {
+        this.setData({
+          keynoteDisabled: true
+        })
+      }
+
       const list = [...res.datas]
 
       this.setData({
         bookExhibitionList: list
       })
+      // 鍒ゆ柇鏁版嵁闀垮害
+      console.log(list.length, 'list.length');
+
 
       //鍙栨秷
       wx.hideLoading()
@@ -273,14 +286,20 @@
     const newValue = e.detail.value;
     const selectedOption = this.data.product.options.find(option => option.value === newValue);
     const newPrice = selectedOption ? selectedOption.price : null;
+    const bookExhibitionListsubsidiary = []
+    this.setData({
+      bookExhibitionListsubsidiary: this.data.bookExhibitionList
+    })
+    console.log(bookExhibitionListsubsidiary, 'bookExhibitionListsubsidiary');
     console.log(newValue, 'newValue');
     console.log(newPrice, 'newPrice');
+
     if (newPrice) {
       this.setData({
         keynoteDisabled: false
       })
-
-    } else {
+    }
+    if (!newPrice) {
       this.setData({
         keynoteDisabled: true
       })
@@ -296,12 +315,9 @@
     if (this.data.keynoteValue) {
       //濡傛灉鏈夋暟鎹氨娓呯┖骞跺埛鏂伴〉闈�
       this.data.keynoteValue = []
-
       this.bookExhibitionGet(newValue)
       this.onLoad()
-      console.log('true');
     }
-
   },
 
   // 閲嶇偣椤圭洰
@@ -313,7 +329,9 @@
   },
   handleConfirm(event) {
 
-    const { value } = event.detail;
+    const {
+      value
+    } = event.detail;
     // 纭鎿嶄綔鐨勫鐞嗛�昏緫
 
     console.log('纭鎿嶄綔锛岄�変腑鐨勫�间负锛�', value);
@@ -328,10 +346,6 @@
     this.bookExhibitionGet()
   },
   onSwapRight() {
-    // console.log('xxxxxx');
-    // this.data.nameSort = 'Asc'
-
-
     if (!this.data.nameSort) {
       this.setData({
         nameSort: 'Desc',

--
Gitblit v1.9.1