添加不可用原因
This commit is contained in:
@@ -21,18 +21,28 @@
|
|||||||
</view>
|
</view>
|
||||||
<text
|
<text
|
||||||
style="display: block;font-size: 20rpx;color: #999;margin-top: 10rpx;">到期时间:{{item.effectType == 0 ? '永久有效' : item.endTime}}</text>
|
style="display: block;font-size: 20rpx;color: #999;margin-top: 10rpx;">到期时间:{{item.effectType == 0 ? '永久有效' : item.endTime}}</text>
|
||||||
<text
|
<template v-if="item.canUse == 0" >
|
||||||
|
<view class="" style="font-size:20rpx; display: inline-block; padding:0 10rpx ; background-color: #d9d9d9; border-radius: 10rpx;">
|
||||||
|
<text
|
||||||
|
style="color: #999; "
|
||||||
|
>不可用:</text>
|
||||||
|
<text
|
||||||
|
style="color: #999; "
|
||||||
|
>{{item.canUseReason}}</text>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<text v-else
|
||||||
style="display: block;font-size: 20rpx;color: #999;margin-top: 4rpx;">说明:{{item.couponEntity.remark}}</text>
|
style="display: block;font-size: 20rpx;color: #999;margin-top: 4rpx;">说明:{{item.couponEntity.remark}}</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view style="width: 7%;">
|
<view style="width: 7%;">
|
||||||
<view class="" style="background-color: #d9d9d9; border-radius: 10rpx; 0 0 10rpx; text-align: center;" v-if="item.canUse == 0">
|
<!-- <view class="" style="background-color: #d9d9d9; border-radius: 10rpx; 0 0 10rpx; text-align: center;" v-if="item.canUse == 0">
|
||||||
<text
|
<text
|
||||||
style="color: #999; "
|
style="color: #999; "
|
||||||
>不可用</text>
|
>不可用</text>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<template v-else>
|
<template v-if="item.canUse == 1">
|
||||||
<text
|
<text
|
||||||
style="border: 1px solid #d9d9d9;width: 35rpx;height:35rpx;display:inline-block;border-radius: 30rpx;"
|
style="border: 1px solid #d9d9d9;width: 35rpx;height:35rpx;display:inline-block;border-radius: 30rpx;"
|
||||||
v-if="youhuiIndex !== index"></text>
|
v-if="youhuiIndex !== index"></text>
|
||||||
|
|||||||
@@ -716,7 +716,8 @@
|
|||||||
console.log("可用优惠券列表", res);
|
console.log("可用优惠券列表", res);
|
||||||
res.couponHistoryList.forEach( item =>{
|
res.couponHistoryList.forEach( item =>{
|
||||||
if(item.couponEntity.useLevel > this.totalPrice){
|
if(item.couponEntity.useLevel > this.totalPrice){
|
||||||
item.canUse = 0
|
item.canUse = 0
|
||||||
|
item.canUseReason = "未到使用门槛"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.couponHistoryList = res.couponHistoryList
|
this.couponHistoryList = res.couponHistoryList
|
||||||
|
|||||||
Reference in New Issue
Block a user