From f10d1c14a59343f3ad6bafa4762363427be0c89b Mon Sep 17 00:00:00 2001
From: yiming <m13691596795@163.com>
Date: 星期五, 08 三月 2024 18:23:47 +0800
Subject: [PATCH] feat(绕太阳): 人

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

diff --git a/pages/bookExhibitionList/index.js b/pages/bookExhibitionList/index.js
index 937d286..067ceae 100644
--- a/pages/bookExhibitionList/index.js
+++ b/pages/bookExhibitionList/index.js
@@ -56,9 +56,55 @@
       value: [],
       options: [],
     },
+    navBarHeight: '',
+    barHeight: ''
+
   },
 
 
+
+  /**
+    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
+    */
+  onLoad(options) {
+    // console.log(this.data.filteredItems, 88888);
+    const systInfo = wx.getSystemInfoSync();
+    const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅
+    const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴�
+    this.setData({
+      navBarHeight: navBarHeight,
+      barHeight: systInfo.statusBarHeight,
+    })
+
+    // 鍗曞垪閫夋嫨鍣ㄩ�夐」
+    const singleSelectOptions = this.data.filteredItems.map(item => ({
+      label: item.name,
+      value: item.value,
+      disabled: false,
+    }))
+
+    if (this.data.filteredItems = []) {
+      console.log(11111);
+      singleSelectOptions.push({
+        label: '绂佺敤閫夐」',
+        value: 'disabled',
+        disabled: true,
+      });
+    }
+
+    // singleSelectOptions.push({
+    //   label: '绂佺敤閫夐」',
+    //   value: 'disabled',
+    //   disabled: true,
+    // });
+
+
+    // 鏇存柊鏁版嵁
+    this.setData({
+      'multipleSelect.options': singleSelectOptions,
+    });
+
+  },
 
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
@@ -171,6 +217,7 @@
       this.setData({
         bookExhibitionList: list
       })
+        
       //鍙栨秷
       wx.hideLoading()
       // console.log(this.data.bookExhibitionList, '鏁版嵁');
@@ -205,41 +252,6 @@
   },
 
 
-  /**
-   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
-   */
-  onLoad(options) {
-    // console.log(this.data.filteredItems, 88888);
-
-    // 鍗曞垪閫夋嫨鍣ㄩ�夐」
-    const singleSelectOptions = this.data.filteredItems.map(item => ({
-      label: item.name,
-      value: item.value,
-      disabled: false,
-    }))
-
-    if (this.data.filteredItems = []) {
-      console.log(11111);
-      singleSelectOptions.push({
-        label: '绂佺敤閫夐」',
-        value: 'disabled',
-        disabled: true,
-      });
-    }
-
-    // singleSelectOptions.push({
-    //   label: '绂佺敤閫夐」',
-    //   value: 'disabled',
-    //   disabled: true,
-    // });
-
-
-    // 鏇存柊鏁版嵁
-    this.setData({
-      'multipleSelect.options': singleSelectOptions,
-    });
-
-  },
 
 
   // 鎬诲垎绫�
@@ -326,7 +338,7 @@
     const item = event.currentTarget.dataset.item;
     console.log(item);
     wx.navigateTo({
-      url: '/pages/bookExhibitionDetails/index?id=' + item.id // 鍋囪璺宠浆鍒拌鎯呴〉闈紝骞朵紶閫掍簡id鍙傛暟
+      url: '/pages/bookExhibitionDetails/index?id=' + item.id + '&bookName=' + item.name // 鍋囪璺宠浆鍒拌鎯呴〉闈紝骞朵紶閫掍簡id鍙傛暟
     });
   },
   // 鎼滅储妗�
@@ -336,5 +348,8 @@
     })
     console.log(this.data.keyword, 'keyword');
     this.bookExhibitionGet()
-  }
+  },
+  goBack() {
+    wx.navigateBack();
+  },
 })
\ No newline at end of file

--
Gitblit v1.9.1