fix: 修复商城页面 goods_extend 字段名不匹配导致的渲染错误
This commit is contained in:
parent
b0a54e6c30
commit
d00370d6e4
|
|
@ -70,7 +70,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="br20 mt20" style="background: #FFFFFF;">
|
<view class="br20 mt20" style="background: #FFFFFF;">
|
||||||
<view class="pay-type" @click="changePay(0)"
|
<view class="pay-type" @click="changePay(0)"
|
||||||
v-if="orderData != null && orderData.goodsExtend.pay_wechat == 1">
|
v-if="orderData != null && orderData.goods_extend && orderData.goods_extend.pay_wechat == 1">
|
||||||
<view class="" style="width: 100%; color: #333333;">
|
<view class="" style="width: 100%; color: #333333;">
|
||||||
微信支付
|
微信支付
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pay-type" @click="changePay(1)"
|
<view class="pay-type" @click="changePay(1)"
|
||||||
v-if="orderData != null && orderData.goodsExtend.pay_currency2 == 1">
|
v-if="orderData != null && orderData.goods_extend && orderData.goods_extend.pay_currency2 == 1">
|
||||||
|
|
||||||
<view class="" style="width: 100%; color: #333333;">
|
<view class="" style="width: 100%; color: #333333;">
|
||||||
{{ $config.getAppSetting('currency2_name') }}
|
{{ $config.getAppSetting('currency2_name') }}
|
||||||
|
|
@ -257,9 +257,11 @@ export default {
|
||||||
if (res.status == 1) {
|
if (res.status == 1) {
|
||||||
this.orderData = res.data;
|
this.orderData = res.data;
|
||||||
this.zhifu = 0;
|
this.zhifu = 0;
|
||||||
if (this.orderData.goodsExtend.pay_wechat == 1) {
|
// 使用 goods_extend(API 返回的下划线命名)
|
||||||
|
const goodsExtend = this.orderData.goods_extend || {};
|
||||||
|
if (goodsExtend.pay_wechat == 1) {
|
||||||
this.zhifu = 0;
|
this.zhifu = 0;
|
||||||
} else if (this.orderData.goodsExtend.pay_currency2 == 1) {
|
} else if (goodsExtend.pay_currency2 == 1) {
|
||||||
this.zhifu = 1;
|
this.zhifu = 1;
|
||||||
}
|
}
|
||||||
this.$refs.pop.open();
|
this.$refs.pop.open();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user