From f4e7324c27b7c6ecb824029e22a13541c5033ade Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期一, 22 七月 2024 16:07:56 +0800 Subject: [PATCH] ceshi --- pages/home/home.js | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/pages/home/home.js b/pages/home/home.js index 0feef1c..7df68cf 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -46,11 +46,10 @@ }); 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; // 瀵艰埅鏍忛珮搴� @@ -592,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) { -- Gitblit v1.9.1