fixing bug 8.11
This commit is contained in:
@@ -127,13 +127,15 @@
|
||||
<image class="image" :src="goodsInfo.goods_image"></image>
|
||||
<view class="info">
|
||||
<text class="u-line-2">{{goodsInfo.goods_name}}</text>
|
||||
<text>¥{{ goodsInfo.goods_promotion_type == 1 ? goodsInfo.goods_promotion_price : goodsInfo.goods_price }}</text>
|
||||
<text v-if="type == 1">¥{{ goodsInfo.goods_price }}</text>
|
||||
<text v-else-if="type == 2">¥{{ goodsInfo.pintuan_price }}</text>
|
||||
<text v-else-if="type == 3">¥{{ groupbuyInfo.groupbuy_price }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<guige @sel="self" ref="guige" v-for="(item,index) in goodsInfo.spec_value" :key="index" :title="goodsInfo.spec_name[index]" :item="item"></guige>
|
||||
<view class="num">
|
||||
<text>购买数量</text>
|
||||
<u-number-box v-model="goodsNumber" :min="1"></u-number-box>
|
||||
<u-number-box v-model="goodsNumber"></u-number-box>
|
||||
</view>
|
||||
<view style="height:100rpx"></view>
|
||||
</view>
|
||||
@@ -273,7 +275,7 @@ export default {
|
||||
this.time = time;
|
||||
this.date = date
|
||||
}
|
||||
console.log(123)
|
||||
// console.log(123)
|
||||
this.$u.api.getAtwillUserInfo({
|
||||
id:this.storeid
|
||||
}).then((res)=>{
|
||||
@@ -347,6 +349,16 @@ export default {
|
||||
this.showSpec = true;
|
||||
return false;
|
||||
}
|
||||
// 如果没有规格设规格已全选
|
||||
if(this.goodsInfo.spec_value == null) {
|
||||
this.quanxuan = true;
|
||||
}
|
||||
if(!this.quanxuan) {
|
||||
this.$refs.uToast.show({
|
||||
title: '请选择规格'
|
||||
})
|
||||
return false;
|
||||
}
|
||||
this.$u.api.addCart({
|
||||
goods_id: this.id,
|
||||
quantity: this.goodsNumber,
|
||||
@@ -476,12 +488,6 @@ export default {
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (num == 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: '数量不能为0'
|
||||
})
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(!this.debounce) return;
|
||||
this.debounce = false;
|
||||
@@ -513,9 +519,7 @@ export default {
|
||||
url: '/pageC/cart/ConfirmOrder'
|
||||
})
|
||||
} else {
|
||||
// console.log(res.message);
|
||||
this.debounce = true;
|
||||
this.$u.toast(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user