@@ -111,6 +111,7 @@
checkAll: false,// 全选
isEdit: false, // 是否编辑模式
cartList: [], // 商品列表
+ loading: false
};
},
computed: {
@@ -146,10 +147,12 @@
onLoad() {
+ this.loading = true
uni.$emit('getCartList')
// 刷新列表成功
uni.$on('getCarListSuccess',item => {
this.cartList = JSON.parse(JSON.stringify(this.$store.state.vuex_cartList))
+ this.loading = false
// 默认全选
if(!this.isEdit){
this.checkAllChange()
@@ -258,6 +258,8 @@
this.orderId = res.data.id
// 校验用户是否设置过支付密码
this.toCheckPwd()
+ // 刷新购物车
+ uni.$emit('getCartList')
} else {
uni.showToast({
title: res.message,