From 006a2ecb6430146cea3afdf353938043c231e5fc Mon Sep 17 00:00:00 2001 From: yiming <m13691596795@163.com> Date: 星期四, 21 三月 2024 14:34:44 +0800 Subject: [PATCH] 修改购物车等 --- pages/bookExhibitionList/index.js | 54 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 46 insertions(+), 8 deletions(-) diff --git a/pages/bookExhibitionList/index.js b/pages/bookExhibitionList/index.js index 067ceae..84d40c5 100644 --- a/pages/bookExhibitionList/index.js +++ b/pages/bookExhibitionList/index.js @@ -29,7 +29,6 @@ options: [ { value: '*', - label: '鎬诲垎绫�', }, { @@ -50,15 +49,17 @@ price: 'jsek_teacherEducation', label: '鏁欏笀鏁欒偛', }, + ], + }, multipleSelect: { value: [], options: [], }, navBarHeight: '', - barHeight: '' - + barHeight: '', + windowHeight: '', }, @@ -67,6 +68,34 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ 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(); // 鑳跺泭淇℃伅 @@ -142,7 +171,10 @@ onPullDownRefresh() { }, - + onPullDownRefresh() { + this.data.page.size = 16 //鏇存敼鏄剧ず鐨勫�� + this.bookExhibitionGet(); // 璋冪敤鏂规硶鍔犺浇鏇村鏁版嵁 + }, /** * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� */ @@ -168,7 +200,9 @@ 'page.size': newSize }); this.bookExhibitionGet(); // 璋冪敤鏂规硶鍔犺浇鏇村鏁版嵁 - console.log(1111); + + + } }, @@ -199,6 +233,7 @@ queryType: '*', fields: { jsek_link: [], + subtitle: [], 'bookClassification*': this.data.keynoteValue || [], ...searchObj }, @@ -208,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) @@ -217,7 +255,7 @@ this.setData({ bookExhibitionList: list }) - + //鍙栨秷 wx.hideLoading() // console.log(this.data.bookExhibitionList, '鏁版嵁'); @@ -338,7 +376,7 @@ const item = event.currentTarget.dataset.item; console.log(item); wx.navigateTo({ - url: '/pages/bookExhibitionDetails/index?id=' + item.id + '&bookName=' + item.name // 鍋囪璺宠浆鍒拌鎯呴〉闈紝骞朵紶閫掍簡id鍙傛暟 + url: '/pages/bookExhibitionDetails/index?id=' + item.id + '&bookName=' + item.name + '&subtitleName=' + item.subtitleName // 鍋囪璺宠浆鍒拌鎯呴〉闈紝骞朵紶閫掍簡id鍙傛暟 }); }, // 鎼滅储妗� -- Gitblit v1.9.1