修复bug
This commit is contained in:
parent
e59f83a0e9
commit
e6bc9233f4
|
@ -51,7 +51,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view>
|
||||
商品库存 <text style="margin-left: 20rpx;">{{(sku[changeSkuKey] && sku[changeSkuKey].stock)||change.stock}}</text>
|
||||
商品库存 <text style="margin-left: 20rpx;">{{sku[changeSkuKey] ? sku[changeSkuKey].stock : change.stock}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
@ -217,6 +217,7 @@ import { Toast } from '../libs/uniApi';
|
|||
// 加入购物车
|
||||
addcart() {
|
||||
// return console.log(this.sku[this.changeSkuKey]);
|
||||
if(!this.sku[this.changeSkuKey]) return Toast('该规格有错误, 请选择其他规格');
|
||||
if(+this.sku[this.changeSkuKey].procure_price * +this.cart_num<=0) return Toast('无法购买价格小于等于0的商品');
|
||||
if (this.sku[this.changeSkuKey]) {
|
||||
if (this.cart_num > this.sku[this.changeSkuKey].stock) return uni.showToast({
|
||||
|
|
|
@ -380,6 +380,12 @@
|
|||
type: 2
|
||||
})
|
||||
this.cloudList = data;
|
||||
this.cloudList.forEach((item)=>{
|
||||
item.children.unshift({
|
||||
cate_name: '全部',
|
||||
store_category_id: item.store_category_id,
|
||||
});
|
||||
})
|
||||
this.merchant = this.cloudList[0];
|
||||
this.merchantTow = this.merchant?.children[0];
|
||||
this.storeParam.category_id = this.merchantTow.store_category_id;
|
||||
|
|
|
@ -402,7 +402,7 @@
|
|||
this.credit_buy = options.credit_buy
|
||||
this.sotreParam.type_id = options.type_id
|
||||
this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
|
||||
this.sotreParam.category_id = options.merchant_category_id || ''
|
||||
this.sotreParam.category_id = options.cate_id || ''
|
||||
this.storeList = [];
|
||||
|
||||
if (this.mer_location == 1) {
|
||||
|
|
Loading…
Reference in New Issue