Commit fa7436f0 by zhangzhen

细节优化

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