From bc7b375c7dd6b256ebd582c4ab85f77fca8dc054 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期四, 21 三月 2024 14:54:55 +0800
Subject: [PATCH] Merge refs/remotes/origin/master into refs/heads/master

---
 pages/bookExhibitionList/index.js |  135 +++++++++++++++++++++++++++++++-------------
 1 files changed, 94 insertions(+), 41 deletions(-)

diff --git a/pages/bookExhibitionList/index.js b/pages/bookExhibitionList/index.js
index 937d286..1febd4e 100644
--- a/pages/bookExhibitionList/index.js
+++ b/pages/bookExhibitionList/index.js
@@ -29,7 +29,6 @@
       options: [
         {
           value: '*',
-
           label: '鎬诲垎绫�',
         },
         {
@@ -50,15 +49,91 @@
           price: 'jsek_teacherEducation',
           label: '鏁欏笀鏁欒偛',
         },
+
       ],
+
     },
     multipleSelect: {
       value: [],
       options: [],
     },
+    navBarHeight: '',
+    barHeight: '',
+    windowHeight: '',
   },
 
 
+
+  /**
+    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
+    */
+  onLoad(options) {
+    // 鑾峰彇灞忓箷楂樺害
+    wx.getSystemInfo({
+      success: function (res) {
+        // this.setData({
+        //   windowHeight: res.windowHeight
+        // })
+
+        // 鑾峰彇鑺傜偣鐨勭被鍚�
+        var query = wx.createSelectorQuery();
+        query.select('.assembleContent').boundingClientRect();
+        query.exec(function (res) {
+
+          // console.log(res, 'res');
+          let node = res[0];
+          node.setStyle({
+            backgroundColor: '#0256b9',
+          })
+          // // 淇敼鑺傜偣鏍峰紡
+          // if (node) {
+          //   node.setStyle({
+          //     backgroundColor: 'red',
+          //     color: 'white'
+          //   });
+          // }
+        });
+      }
+    });
+
+    // 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,
+    });
+
+  },
 
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
@@ -96,7 +171,10 @@
   onPullDownRefresh() {
 
   },
-
+  onPullDownRefresh() {
+    this.data.page.size = 16 //鏇存敼鏄剧ず鐨勫��
+    this.bookExhibitionGet(); // 璋冪敤鏂规硶鍔犺浇鏇村鏁版嵁
+  },
   /**
    * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
    */
@@ -122,7 +200,9 @@
         'page.size': newSize
       });
       this.bookExhibitionGet(); // 璋冪敤鏂规硶鍔犺浇鏇村鏁版嵁
-      console.log(1111);
+
+
+
     }
   },
 
@@ -153,6 +233,7 @@
       queryType: '*',
       fields: {
         jsek_link: [],
+        subtitle: [],
         'bookClassification*': this.data.keynoteValue || [],
         ...searchObj
       },
@@ -162,7 +243,10 @@
       //   width: 100
       // },
     }).then(res => {
-
+      res.datas.forEach((item) => {
+        item.subtitleName = item.subtitle + item.name
+      })
+      console.log(res, 'item');
       this.data.total = res.total
 
       //  list.push(res.datas)
@@ -171,6 +255,7 @@
       this.setData({
         bookExhibitionList: list
       })
+
       //鍙栨秷
       wx.hideLoading()
       // console.log(this.data.bookExhibitionList, '鏁版嵁');
@@ -205,41 +290,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 +376,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 + '&subtitleName=' + item.subtitleName // 鍋囪璺宠浆鍒拌鎯呴〉闈紝骞朵紶閫掍簡id鍙傛暟
     });
   },
   // 鎼滅储妗�
@@ -336,5 +386,8 @@
     })
     console.log(this.data.keyword, 'keyword');
     this.bookExhibitionGet()
-  }
+  },
+  goBack() {
+    wx.navigateBack();
+  },
 })
\ No newline at end of file

--
Gitblit v1.9.1