From cac88b3bf823fedf18f0faa4ec96c3de224f30c0 Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期一, 15 七月 2024 15:23:12 +0800 Subject: [PATCH] video --- pages/home/home.js | 25 ++++++++++++++++++++++--- 1 files changed, 22 insertions(+), 3 deletions(-) diff --git a/pages/home/home.js b/pages/home/home.js index 4b721d9..7df68cf 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -41,12 +41,15 @@ loading: true }, onShow() { + this.setData({ + searchVal: "", + }); + console.log(this.data.searchVal) this.loadHomePage(); - this.getBannerList() - }, onLoad() { + this.getBannerList() const systInfo = wx.getSystemInfoSync(); const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� @@ -147,6 +150,7 @@ //鐐瑰嚮鐩綍 toPages(item) { let info = item.target.dataset.info + console.log(info); if (info.url) { if (info.text == "鍥句功鏈嶅姟") { wx.switchTab({ @@ -587,6 +591,22 @@ }, + // 鎵竴鎵� + onIconScanTap() { + wx.scanCode({ + success(res) { + console.log(res); + if (res.errMsg == "scanCode:ok" && res.path || res.result) { + let path = res.path || res.result + wx.redirectTo({ + url: '/' + path, + }) + } + } + }) + }, + + // 鐩戝惉婊氬姩鏉� onScroll(e) { @@ -602,7 +622,6 @@ } } }, - isChange(data) { this.setData({ isWhite: data -- Gitblit v1.9.1