hookehuyr

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

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