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 || '无'}` ];