bug
litian
2025-02-14 deacb08ab6b48db066458433f21a52a0ee1a95ea
pages/home/home.js
@@ -39,6 +39,7 @@
      value: false
    },
    loading: true,
    showStateMenu: false, // 新年公告弹窗
  },
  onShow() {
    this.setData({
@@ -50,8 +51,19 @@
      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();
@@ -648,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,
            })
          }
        }
      }
    })