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)