优化购物车页面

This commit is contained in:
TOP糯米 2023-04-09 22:41:02 +08:00
parent 9a92cdf1f0
commit 68f0622384
1 changed files with 31 additions and 25 deletions

View File

@ -84,8 +84,20 @@ export default {
cart: (state) => state.cart.cart, cart: (state) => state.cart.cart,
}), }),
}, },
onLoad() {}, onLoad() {
async onShow() { this.initPage();
},
onShow() {},
onReady() {},
onReachBottom() {},
onPullDownRefresh() {},
onShareTimeline() {},
onShareAppMessage() {},
methods: {
/**
* 初始化页面
*/
async initPage() {
await this.$store.dispatch("cart/update"); await this.$store.dispatch("cart/update");
this.list = []; this.list = [];
this.cart.list.forEach((item) => { this.cart.list.forEach((item) => {
@ -110,12 +122,6 @@ export default {
}); });
}); });
}, },
onReady() {},
onReachBottom() {},
onPullDownRefresh() {},
onShareTimeline() {},
onShareAppMessage() {},
methods: {
/** /**
* 选中组 * 选中组
*/ */