|
|
@ -19,7 +19,8 @@ |
|
|
|
<text>商品信息</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="product-card" v-for="(info, index) in productInfo.commonShop"> |
|
|
|
<view class="product-card" v-for="(info, index) in productInfo.commonShop" |
|
|
|
:key="index"> |
|
|
|
|
|
|
|
<view class="checkbox"> |
|
|
|
<uv-checkbox |
|
|
@ -180,11 +181,22 @@ |
|
|
|
}, res => { |
|
|
|
if (res.code === 200 && res.result) { |
|
|
|
// 如果返回商品信息,则设置商品信息 commonShop |
|
|
|
this.productInfo = res.result; |
|
|
|
|
|
|
|
this.productInfo.commonShop.forEach(n => { |
|
|
|
if(res.result.shopRecommends){ |
|
|
|
res.result.shopRecommends = JSON.parse(res.result.shopRecommends) |
|
|
|
} |
|
|
|
|
|
|
|
res.result.commonShop.forEach(n => { |
|
|
|
this.checkboxValue.push(n.id) |
|
|
|
|
|
|
|
if(typeof res.result.shopRecommends == 'object'){ |
|
|
|
n.selectNum = res.result.shopRecommends[n.id] |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
console.log(res.result); |
|
|
|
|
|
|
|
this.productInfo = res.result; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
@ -323,6 +335,7 @@ |
|
|
|
this.$api('createSumOrder', data, res => { |
|
|
|
uni.hideLoading(); |
|
|
|
if (res.code === 200) { |
|
|
|
uni.$emit('getQuickOrderInfo') |
|
|
|
uni.requestPaymentWxPay(res) |
|
|
|
.then(e => { |
|
|
|
uni.showToast({ |
|
|
@ -357,6 +370,7 @@ |
|
|
|
this.$api('cancelOrderFast', { |
|
|
|
orderId : this.orderId |
|
|
|
}).then(res => { |
|
|
|
uni.$emit('getQuickOrderInfo') |
|
|
|
uni.showToast({ |
|
|
|
title: '取消成功', |
|
|
|
icon: 'none', |
|
|
|