Commit fa7436f0 by zhangzhen

细节优化

parent 29b1374e
......@@ -276,8 +276,11 @@
</view>
<view class="flex-between price use-coupon-box">
<text
class="text-black text-left">{{useCouponList[selectCouponIndex].couponType==2? '团购券':'优惠券'}}</text>
<view class="flex-row-center">
<text class="text-black text-left">{{useCouponList[selectCouponIndex].couponType==2? '团购券':'优惠券'}}</text>
<text v-if="couponExpireTip && selectCouponIndex < 0" class="text-red">(有即将过期券待使用)</text>
</view>
<view class="flex-1 flex-row" @tap="onNavToSelectCoupon">
<text class="" :class="useCouponList.length?'text-pink':'text-gray'">
{{ useCouponList.length && selectCouponIndex>=0? useCouponList[selectCouponIndex].name: useCouponList.length? '请选择':'暂无可用'}}</text>
......@@ -658,7 +661,8 @@
name:'次卡'
},
submitBtnStatus:false,
showMorePayWay: true
showMorePayWay: true,
couponExpireTip:false,//是否进行优惠券过期提醒
};
},
filters: {
......@@ -1331,10 +1335,20 @@
packageId: this.modeIndex2 >= 0 ? this.packageMode[this.modeIndex2].id : this.modeIndex>=0 && this.roomLabelList.length && this.roomLabelList[this.modeIndex].openPack==1? this.roomLabelList[this.modeIndex].packId : '',
roomLabelId: this.modeIndex >= 0 ? this.roomLabelList[this.modeIndex].id : ''
}).then(res => {
this.couponExpireTip = false;
if (res.data.code == 200) {
if (res.data && res.data.data.length) {
this.useCouponList = res.data.data ;
let i = this.useCouponList.findIndex(item => item.isAvailable ===0)
let i = this.useCouponList.findIndex(item => {
if(item.isAvailable ===0){
if(moment(item.endDate).valueOf() - moment().valueOf() < 7*24*3600*1000){
this.couponExpireTip = true
}
}
return item.isAvailable ===0
})
this.selectCouponIndex = i>=0? i: -1;
}else{
this.selectCouponIndex = -1;
......
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