Ver código fonte

购物车添加

wcni 5 anos atrás
pai
commit
c92f3ad35b
3 arquivos alterados com 8 adições e 6 exclusões
  1. 3 0
      pages/index/cart.vue
  2. 5 1
      pages/index/shop.vue
  3. 0 5
      pages/myOrder/adressManger.vue

+ 3 - 0
pages/index/cart.vue

@@ -187,6 +187,9 @@
 						store_id: this.store_id
 					},
 					success: () => {
+						// this.nums = 0;
+						// this.isDelete = true;
+					 //    this.listip = "结算" + '(' + this.nums + ')';
 						this.getshoplist();
 					}
 				})

+ 5 - 1
pages/index/shop.vue

@@ -454,6 +454,8 @@
 							 let store = this.store_id;
 							 let order_id = res.data.data.order_id;
 							 this.specClass = 'none';
+							 this.specSelected = [];
+							 this.chosename = [];
 							 uni.navigateTo({
 							   url: `/pages/index/sureBuy?store=${store}&order_id=${order_id}`
 							 });
@@ -478,7 +480,7 @@
 						this.specSelected = this.datalist.goods_list;
 						return;
 					}
-					if(this.chosename.length == 0) {
+					if(this.chosename.length == 0&&this.datalist.spec_list.length != 0) {
 						this.specClass = 'show';
 						return;
 					}
@@ -495,6 +497,8 @@
 									goods_num: this.shopnumber
 								},
 								success: () => {
+									this.specSelected = [];
+									this.chosename = [];
 									this.$msg("商品添加成功");
 									this.specClass = 'none';
 									this.getshopdetail();

+ 0 - 5
pages/myOrder/adressManger.vue

@@ -63,7 +63,6 @@
 			}
 		},
 		onLoad(option){
-			
 			let title = '新增收货地址';
 			if(option.type==='edit'){
 				title = '编辑收货地址'
@@ -92,7 +91,6 @@
 				this.area_id = '';
 				this.getadress();
 				this.show = !this.show;
-				
 			},
 			cancelCity() {
 				this.addressData.addressName = this.adress;
@@ -131,9 +129,6 @@
 			switchChange(e){
 				this.addressData.default = e.detail;
 			},
-			
-			
-		 
 			// choseCity(e) {
 			// 	console.log(e);
 			// 	this.show = false;