Browse Source

购物车删除添加

wcni 5 years ago
parent
commit
fa2719f746
3 changed files with 6 additions and 12 deletions
  1. 6 9
      pages/index/cart.vue
  2. 0 1
      pages/index/index.vue
  3. 0 2
      pages/myOrder/adressManger.vue

+ 6 - 9
pages/index/cart.vue

@@ -128,7 +128,11 @@
 			onClickButton(e) {
 				let array = [];
 				if(this.pricelist.length == 0) {
-					this.$msg('请选择商品');
+					if(this.isdelete) {
+						this.$msg('请选择商品');
+					}else {
+						this.$msg('请选择删除商品');
+					}
 					return;
 				}
 				this.pricelist.forEach(item => {
@@ -137,13 +141,8 @@
 				let ids = array.toString();
 				if(this.isdelete) {
 					// 结算
-					this.getorderId(); // 保存订单生成订单id
+					this.getorderId(); // 保存订单生成订单id 购买
 				}else {
-					if(ids == '') {
-						this.$msg('请选择删除商品');
-						return;
-					}
-					// 删除
 					this.deleteshop(ids);
 				}
 			},
@@ -252,7 +251,6 @@
 			},
 			// 单选
 			checkboxChange(e) {
-			  console.log("kkkk")
 			  this.checkboxList = []
 			  e.detail.forEach((item, idx) => {
 				  this.$set(this.checkboxList, idx, item)
@@ -264,7 +262,6 @@
 			  })
 			  this.pricelist = price;
 			  let num = 0;
-			  console.log(this.pricelist);
 			  this.pricelist.forEach(item => {
 				  num += item.goods_num;
 			  })

+ 0 - 1
pages/index/index.vue

@@ -242,7 +242,6 @@
 				uni.navigateTo({
 					url: `/pages/index/searchresult?lat=${lat}&lon=${lon}`
 				})
-				
 			},
 			// 滚动到顶部
 			upper(e) {

+ 0 - 2
pages/myOrder/adressManger.vue

@@ -3,11 +3,9 @@
 		<view class="row b-b"  @click="changeshow">
 			<input class="input"  id="box" type="text" :disabled="true" v-model="addressData.addressName" placeholder="省,城市,区县" placeholder-class="placeholder" />
 		</view>
-		
 		<view class="row b-b">
 			<input class="input" type="text" v-model="addressData.area" placeholder="详细地址,如街道,楼牌号等" placeholder-class="placeholder" />
 		</view>
-		
 		<view class="row b-b">
 			<input class="input" type="text" v-model="addressData.name" placeholder="姓名" placeholder-class="placeholder" />
 		</view>