hookehuyr

fix: 更新优惠券详情页的显示和兑换逻辑

将积分显示改为直接显示优惠券标题,并修改兑换提示语为核销操作
...@@ -11,9 +11,8 @@ ...@@ -11,9 +11,8 @@
11 <!-- Points and Title --> 11 <!-- Points and Title -->
12 <view class="text-center mb-8"> 12 <view class="text-center mb-8">
13 <view class="text-4xl font-bold text-blue-500 mb-2"> 13 <view class="text-4xl font-bold text-blue-500 mb-2">
14 - <text class="text-2xl">{{ reward.points }} 积分</text> 14 + <text class="text-2xl">{{ reward.title }}</text>
15 </view> 15 </view>
16 - <h1 class="text-xl font-bold">{{ reward.title }}</h1>
17 </view> 16 </view>
18 17
19 <!-- Details Sections --> 18 <!-- Details Sections -->
...@@ -95,16 +94,16 @@ const reward = ref({ ...@@ -95,16 +94,16 @@ const reward = ref({
95 const handleRedeem = () => { 94 const handleRedeem = () => {
96 // Show a confirmation modal 95 // Show a confirmation modal
97 Taro.showModal({ 96 Taro.showModal({
98 - title: '确认兑换', 97 + title: '温馨提示',
99 - content: `将消耗 ${reward.value.points} 积分兑换此优惠券,是否确认?`, 98 + content: `将核销此优惠券,是否确认?`,
100 success: (res) => { 99 success: (res) => {
101 if (res.confirm) { 100 if (res.confirm) {
102 // Simulate API call for redemption 101 // Simulate API call for redemption
103 - Taro.showLoading({ title: '兑换中...' }); 102 + Taro.showLoading({ title: '核销中...' });
104 setTimeout(() => { 103 setTimeout(() => {
105 Taro.hideLoading(); 104 Taro.hideLoading();
106 Taro.showToast({ 105 Taro.showToast({
107 - title: '兑换成功', 106 + title: '核销成功',
108 icon: 'success', 107 icon: 'success',
109 duration: 2000 108 duration: 2000
110 }); 109 });
......