lilei 4 سال پیش
والد
کامیت
0105c3140d
2فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 3 0
      pages/cart/cart.vue
  2. 2 0
      pages/toOrder/index.vue

+ 3 - 0
pages/cart/cart.vue

@@ -111,6 +111,7 @@
 				checkAll: false,// 全选
 				checkAll: false,// 全选
 				isEdit: false, // 是否编辑模式
 				isEdit: false, // 是否编辑模式
 				cartList: [], // 商品列表
 				cartList: [], // 商品列表
+				loading: false
 			};
 			};
 		},
 		},
 		computed: {
 		computed: {
@@ -146,10 +147,12 @@
 			},
 			},
 		},
 		},
 		onLoad() {
 		onLoad() {
+			this.loading = true
 			uni.$emit('getCartList')
 			uni.$emit('getCartList')
 			// 刷新列表成功
 			// 刷新列表成功
 			uni.$on('getCarListSuccess',item => {
 			uni.$on('getCarListSuccess',item => {
 				this.cartList = JSON.parse(JSON.stringify(this.$store.state.vuex_cartList))
 				this.cartList = JSON.parse(JSON.stringify(this.$store.state.vuex_cartList))
+				this.loading = false
 				// 默认全选
 				// 默认全选
 				if(!this.isEdit){
 				if(!this.isEdit){
 					this.checkAllChange()
 					this.checkAllChange()

+ 2 - 0
pages/toOrder/index.vue

@@ -258,6 +258,8 @@
 							this.orderId = res.data.id
 							this.orderId = res.data.id
 							// 校验用户是否设置过支付密码
 							// 校验用户是否设置过支付密码
 							this.toCheckPwd()
 							this.toCheckPwd()
+							// 刷新购物车
+							uni.$emit('getCartList')
 						} else {
 						} else {
 							uni.showToast({
 							uni.showToast({
 								title: res.message,
 								title: res.message,