From aecfdf9c2a5fd9a0adde58b6e8b33ed345692d5b Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Mon, 29 Sep 2025 16:54:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=88=91=E7=9A=84=E4=BC=98?= =?UTF-8?q?=E6=83=A0=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/user/coupon.vue | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/pages/user/coupon.vue b/pages/user/coupon.vue index 56f3675..40106bf 100644 --- a/pages/user/coupon.vue +++ b/pages/user/coupon.vue @@ -143,13 +143,32 @@ const selectListItem = ref(''); const selectListItemDetails = ref([]); function showDetailHandle(item) { showDetail.value = true; + + // 1. 定义每个规则的独立描述(仅“其他优惠券”需判断item.type) + const ruleList = []; + + // 规则1:限时折扣同享(始终显示) + const discountRule = item.discountShare ? '与限时折扣同享' : '不与限时折扣同享'; + ruleList.push(discountRule); + + // 规则2:会员价/会员折扣同享(始终显示) + const vipRule = item.vipPriceShare ? '与会员价/会员折扣同享' : '不与会员价/会员折扣同享'; + ruleList.push(vipRule); + + // 规则3:其他优惠券同享(仅item.type=2时显示) + if (item.type === 2) { + const otherCouponRule = item.otherCouponShare ? '与其他优惠券同享' : '不与其他优惠券同享'; + ruleList.push(otherCouponRule); + } + const shareRuleText = `${ruleList.join('、')}`; + selectListItemDetails.value = [ `可适用门店:${item.useShops}`, `可适用商品:${item.foods}`, `可使用类型:${convertValuesToLabels(item.useType)}`, `可用时间段:${item.useTimeType == 'all' ? '全段时间可用' : `${item.useStartTime} - ${item.useEndTime}`}`, `限量规则:每人限领${item.getLimit == -10086 ? `无限张` : `${item.getLimit}张`},每日最多可使用${item.useLimit == -10086 ? `无限张` : `${item.useLimit}张`}`, - `同享规则:${item.vipPriceShare ? '与限时折扣同享、与会员价同享' : '不与限时折扣同享、与会员价同享'}`, + `同享规则:${shareRuleText}`, `其它说明:${item.ruleDetails || '无'}` ];