From 6ee4de94a2492900447efc50430ac21ed8cab799 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Thu, 23 Jul 2026 08:45:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=9A=E5=95=86?= =?UTF-8?q?=E6=88=B7=E4=BC=98=E6=83=A0=E5=88=B8=E9=80=89=E6=8B=A9=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E5=92=8C=E7=A9=BA=E6=8C=87=E9=92=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 新增coupon_list数组类型校验避免渲染异常 2. 重构优惠券选择逻辑,使用merch_id隔离选中状态避免多商户污染 3. 增加orderCreateData.coupon的类型兜底处理,防止非对象/数组类型报错 4. 修复优惠券弹窗选中状态同步逻辑,保留用户已选优惠券 --- pages_goods/public/js/detail.js | 2 +- .../common-payment/common-payment.vue | 4 +- .../_components/common-payment/payment.js | 111 +++++++++++------- 3 files changed, 70 insertions(+), 47 deletions(-) diff --git a/pages_goods/public/js/detail.js b/pages_goods/public/js/detail.js index 30618aa..2f7ad34 100644 --- a/pages_goods/public/js/detail.js +++ b/pages_goods/public/js/detail.js @@ -249,7 +249,7 @@ export default { } // 优惠券 - if (this.goodsSkuDetail.coupon_list) { + if (Array.isArray(this.goodsSkuDetail.coupon_list)) { this.couponList = this.goodsSkuDetail.coupon_list; this.couponList.forEach(v => { if (v.count == v.lead_count) v.useState = 2; diff --git a/pages_order/_components/common-payment/common-payment.vue b/pages_order/_components/common-payment/common-payment.vue index 62fba90..fa13a7f 100644 --- a/pages_order/_components/common-payment/common-payment.vue +++ b/pages_order/_components/common-payment/common-payment.vue @@ -234,7 +234,7 @@ {{ $lang('order.payment.orderMoney.coupon') }} -