From 47462dc6c323cc4ac7b32b93051947d351799c1f Mon Sep 17 00:00:00 2001 From: yiming <m13691596795@163.com> Date: 星期四, 21 三月 2024 18:53:20 +0800 Subject: [PATCH] 检索页修改 --- pages/bookExhibitionList/index.js | 64 ++++++++++++-------------------- 1 files changed, 24 insertions(+), 40 deletions(-) diff --git a/pages/bookExhibitionList/index.js b/pages/bookExhibitionList/index.js index 1febd4e..a3ae6df 100644 --- a/pages/bookExhibitionList/index.js +++ b/pages/bookExhibitionList/index.js @@ -8,6 +8,7 @@ * 椤甸潰鐨勫垵濮嬫暟鎹� */ data: { + keynoteDisabled: true, value: '', keyword: '', nameSort: null, @@ -49,9 +50,7 @@ price: 'jsek_teacherEducation', label: '鏁欏笀鏁欒偛', }, - ], - }, multipleSelect: { value: [], @@ -68,33 +67,7 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ 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(); @@ -114,18 +87,18 @@ if (this.data.filteredItems = []) { console.log(11111); - singleSelectOptions.push({ - label: '绂佺敤閫夐」', - value: 'disabled', - disabled: true, - }); + // singleSelectOptions.push({ + // label: '鏆傛棤鏁版嵁', + // value: 'disabled', + // disabled: true, + // }); + } else { + console.log(7889); } - // singleSelectOptions.push({ - // label: '绂佺敤閫夐」', - // value: 'disabled', - // disabled: true, - // }); + + + // 鏇存柊鏁版嵁 @@ -300,6 +273,18 @@ const newValue = e.detail.value; const selectedOption = this.data.product.options.find(option => option.value === newValue); const newPrice = selectedOption ? selectedOption.price : null; + console.log(newValue, 'newValue'); + console.log(newPrice, 'newPrice'); + if (newPrice) { + this.setData({ + keynoteDisabled: false + }) + + } else { + this.setData({ + keynoteDisabled: true + }) + } this.setData({ 'product.value': newValue, 'product.price': newPrice, // 灏嗛�変腑鐨� price 鍊间繚瀛樺湪鏁版嵁涓� @@ -330,6 +315,7 @@ }); }, handleConfirm(event) { + const { value } = event.detail; // 纭鎿嶄綔鐨勫鐞嗛�昏緫 @@ -369,8 +355,6 @@ this.data.nameSort = 'Desc' // console.log('sssssss'); this.bookExhibitionGet() - - }, onBookExhibitionDetails: function (event) { const item = event.currentTarget.dataset.item; -- Gitblit v1.9.1