fix: 修复商城页面 goods_extend 字段名不匹配导致的渲染错误

This commit is contained in:
gpu 2026-01-24 03:16:36 +08:00
parent b0a54e6c30
commit d00370d6e4

View File

@ -70,7 +70,7 @@
</view>
<view class="br20 mt20" style="background: #FFFFFF;">
<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>
@ -81,7 +81,7 @@
</view>
</view>
<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;">
{{ $config.getAppSetting('currency2_name') }}
@ -257,9 +257,11 @@ export default {
if (res.status == 1) {
this.orderData = res.data;
this.zhifu = 0;
if (this.orderData.goodsExtend.pay_wechat == 1) {
// 使 goods_extendAPI 线
const goodsExtend = this.orderData.goods_extend || {};
if (goodsExtend.pay_wechat == 1) {
this.zhifu = 0;
} else if (this.orderData.goodsExtend.pay_currency2 == 1) {
} else if (goodsExtend.pay_currency2 == 1) {
this.zhifu = 1;
}
this.$refs.pop.open();