闫增涛
2025-03-31 04c7b0163caeae4ab1c5da62e301fa993101cfad
pages/cart/index.js
@@ -33,12 +33,21 @@
    wx.setNavigationBarTitle({
      title: '购物车'
    });
    this.shoppingCartGet();
    // this.shoppingCartGet();
    this.setData({
      swipeOpened: true
    })
  },
  onShow() {
    loginInfo(app, (data) => {
      if (data) {
        this.shoppingCartGet();
      } else {
        wx.switchTab({
          url: '/pages/home/home',
        })
      }
    })
    this.setData({
      swipeOpened: false
    })
@@ -47,7 +56,6 @@
        active: 3
      })
    }
    this.shoppingCartGet();
    this.setData({
      totalPrice: 0.00,
      selectedCount: 0,
@@ -216,12 +224,7 @@
    });
  },
  goPaymentPage() {
    // 首页测试登录功能,后续注释
    // 检查登录状态
    const token = wx.getStorageSync(app.config.tokenKey)