Commit 32f41f10 authored by spc's avatar spc

fixed

parent a8ed2c02
......@@ -120,7 +120,7 @@
<button class="modal-btn cancel-btn" @click="closeModal">取消</button>
<button class="modal-btn confirm-btn" @click="confirmExchange">确定</button>
</view>
<view class="modal-disclaimer">已发货商品非质量问题不退不换</view>
<view class="modal-disclaimer">{{ isPhysicalGoods() ? '已发货商品非质量问题不退不换' : '兑换完成后不退不换' }}</view>
</view>
<!-- 关闭按钮 -->
<view class="modal-close-btn" @click="closeModal">
......@@ -215,7 +215,7 @@ export default {
return true; // 未登录时按钮仍然可点击,会跳转到登录页
}
// 已登录用户:只有state=1时才能兑换
// 已登录用户:只有state=1时才能兑换,其他状态(包括状态3-已下架)都禁用按钮
return this.goodsData.goodsState === 1;
},
......@@ -621,6 +621,10 @@ export default {
// 积分不足:灰色背景
classes['insufficient-points'] = true;
break;
case 3:
// 商品已下架:灰色背景
classes['sold-out'] = true;
break;
case 7:
// 等级不足:灰色背景
classes['insufficient-level'] = true;
......@@ -654,6 +658,8 @@ export default {
return '立即兑换';
case 2:
return '积分不足';
case 3:
return '商品已下架';
case 7:
return '等级不足';
case 6:
......@@ -661,6 +667,10 @@ export default {
case 4:
return '已抢完';
default:
// 如果有自定义按钮文本,优先使用
if (this.goodsData.buttonText && this.goodsData.buttonText !== '立即兑换') {
return this.goodsData.buttonText;
}
return '立即兑换';
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment