From deacb08ab6b48db066458433f21a52a0ee1a95ea Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期五, 14 二月 2025 09:28:32 +0800 Subject: [PATCH] bug --- pages/home/home.js | 36 ++++++++++++++++++++++++++++-------- 1 files changed, 28 insertions(+), 8 deletions(-) diff --git a/pages/home/home.js b/pages/home/home.js index 71d2aea..106412b 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -1,7 +1,6 @@ import { fetchHome } from '../../services/home/home'; -import moment from 'moment' import { loginInfo } from '../../assets/js/login'; @@ -40,6 +39,7 @@ value: false }, loading: true, + showStateMenu: false, // 鏂板勾鍏憡寮圭獥 }, onShow() { this.setData({ @@ -50,9 +50,20 @@ if (token) { this.getShoppingCartList() } - + this.init(); + // const stateMenu = wx.getStorageSync('stateMenu') + // if (stateMenu == 'true') { + // this.setData({ + // showStateMenu: true + // }) + // wx.setStorageSync('stateMenu', 'false') + // } }, - + closeStateMenu() { + this.setData({ + showStateMenu: false + }) + }, onLoad() { this.getBannerList() const systInfo = wx.getSystemInfoSync(); @@ -77,7 +88,7 @@ } }) } - this.init(); + }, onReachBottom() {}, onPullDownRefresh() { @@ -115,6 +126,9 @@ path: 'jsek_banner\\jsek_homeBannerApplet', fields: { jsek_link: [] + }, + coverSize: { + width: 400 }, paging: { start: 0, @@ -646,10 +660,16 @@ success(res) { console.log(res); if (res.errMsg == "scanCode:ok" && res.path || res.result) { - let path = res.path || res.result - wx.redirectTo({ - url: '/' + path, - }) + if (res.path) { + let path = res.path || res.result + wx.redirectTo({ + url: '/' + path, + }) + } else { + wx.redirectTo({ + url: '/pages/scanResult/index?result=' + res.result, + }) + } } } }) -- Gitblit v1.9.1