From 5067fb6ed50f011f0734219881a67f4c19a93adc Mon Sep 17 00:00:00 2001
From: shinnosuke <tantao@1hoper.com>
Date: 星期一, 24 八月 2026 11:06:47 +0800
Subject: [PATCH] fix: unify merchant coupon labels

---
 rencaika/pages/merchant/merchant.uvue |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/rencaika/pages/merchant/merchant.uvue b/rencaika/pages/merchant/merchant.uvue
index 6d3509a..01f9bcc 100644
--- a/rencaika/pages/merchant/merchant.uvue
+++ b/rencaika/pages/merchant/merchant.uvue
@@ -33,7 +33,7 @@
 					</view>
 					<view v-else class="merchant-title-row">
 						<text class="merchant-title">{{merchantName}}</text>
-						<view class="merchant-tags"><text v-if="!isHotelMerchant && merchantHasCoupon" class="coupon-tag">券</text><text v-if="merchantDiscount != ''" class="discount-tag">{{merchantDiscount}}</text><text v-if="isHotelMerchant && merchantConsumeDiscount != ''" class="discount-tag">{{merchantConsumeDiscount}}</text></view>
+						<view class="merchant-tags"><text v-if="merchantHasCoupon" class="coupon-tag">券</text><text v-if="merchantDiscount != ''" class="discount-tag">{{merchantDiscount}}</text><text v-if="isHotelMerchant && merchantConsumeDiscount != ''" class="discount-tag">{{merchantConsumeDiscount}}</text></view>
 					</view>
 					<view class="service-tags"><text v-if="!isParkingMerchant && !isMedicalMerchant">{{merchantServiceLabel}}</text><text>{{applicableCards}}</text></view>
 					<view v-if="!isParkingMerchant && merchantType != 'apartment'" class="merchant-address-row">
@@ -73,7 +73,7 @@
 							<image class="package-image" :src="item.image" mode="aspectFill" @error="replaceImage(item)"></image>
 							<view class="package-info">
 								<text class="package-name">{{item.name}}</text>
-								<view class="package-tags"><text v-if="!isHotelMerchant && merchantHasCoupon" class="coupon-tag">券</text><text v-if="merchantDiscount != ''" class="discount-tag">{{merchantDiscount}}</text><text v-if="isHotelMerchant && merchantConsumeDiscount != ''" class="discount-tag">{{merchantConsumeDiscount}}</text></view>
+								<view class="package-tags"><text v-if="merchantHasCoupon" class="coupon-tag">券</text><text v-if="merchantDiscount != ''" class="discount-tag">{{merchantDiscount}}</text><text v-if="isHotelMerchant && merchantConsumeDiscount != ''" class="discount-tag">{{merchantConsumeDiscount}}</text></view>
 								<view class="package-bottom"><view class="price-row"><text class="price-symbol">¥</text><text class="price">{{item.price}}</text><text v-if="!isHotelMerchant" class="old-price">¥{{item.originalPrice}}</text></view><view class="buy-button"><text>{{item.available === false ? '已售罄' : (isHotelMerchant ? '预约' : '购买')}}</text></view></view>
 							</view>
 						</view>
@@ -385,7 +385,7 @@
 				merchantDiscount.value = routedDiscount
 				merchantConsumeDiscount.value = ''
 				hasFreeVoucher.value = false
-				merchantPrimaryTag.value = '惠'
+				merchantPrimaryTag.value = '券'
 				merchantAddress.value = routedAddress == '' ? '西区清香坪北街51号' : routedAddress
 				merchantLocation.value = { latitude: 26.5856, longitude: 101.7184, name: name, address: merchantAddress.value }
 				packages.value = hotelPackages
@@ -405,7 +405,7 @@
 					usageInstructions.value = '到达景区后出示人才码,根据景区后台配置的权益规则核验使用;开放时间、适用区域及预约要求以景区现场说明为准。'
 					merchantRightsText.value = '持卓越人才卡可享该景区配置的专属游览权益,具体优惠内容、开放时间、预约方式和使用限制以景区说明为准。'
 				} else if (routedMerchantType == 'apartment') {
-					merchantPrimaryTag.value = '惠'
+					merchantPrimaryTag.value = '券'
 					groupBuyingEnabled.value = false
 					merchantServiceLabel.value = '住宿服务'
 					usageInstructions.value = '到店后出示人才码并按人才公寓或驿站的后台配置提交入住申请,房源、入住时长及审核要求以服务方说明为准。'
@@ -614,7 +614,10 @@
 				if (normalizedCardLabel != '') applicableCards.value = normalizedCardLabel
 				const consumeType = data != null && data.consumeType != null ? String(data.consumeType) : ''
 				const consumeDiscount = data != null && data.consumeDiscount != null ? String(data.consumeDiscount).trim() : ''
-				merchantConsumeDiscount.value = consumeType == '折扣' && consumeDiscount != '' ? consumeDiscount + '折' : ''
+				const consumeCoupon = data != null && data.consumeCoupon != null ? String(data.consumeCoupon).trim() : ''
+				merchantConsumeDiscount.value = hotelStoreConsume && consumeType == '折扣' && consumeDiscount != ''
+					? consumeDiscount + '折'
+					: (hotelStoreConsume && consumeType == '优惠' && consumeCoupon != '' ? '减' + consumeCoupon : '')
 			}
 			hasFreeVoucher.value = isHotelMerchant.value && data != null && data.rightsStatus != null && String(data.rightsStatus) == 'AVAILABLE' && (data.freeVoucherEnabled === true || Number(data.freeVoucherEnabled) == 1)
 			if (hasFreeVoucher.value) {

--
Gitblit v1.7.1