mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 02:06:38 +08:00
Coupon displaying issue updated
This commit is contained in:
parent
e7a57010fd
commit
4da64fd414
@ -48,13 +48,14 @@
|
||||
</i>
|
||||
<div class="rc-userfont" :style="(item.validTo?'visibility:visible':'visibility:hidden')">
|
||||
<strong>有效期</strong>
|
||||
<span>{{item.validFrom}}至</span>
|
||||
<span>{{item.validFrom}}</span>
|
||||
<span>至</span>
|
||||
<em>{{item.validTo}}</em>
|
||||
</div>
|
||||
<nuxt-link :to="`/productdetails/productlist`" v-if="activeIndex==0">
|
||||
<div class="ts-standard-btn">
|
||||
立即使用
|
||||
</div>
|
||||
<nuxt-link :to="`/productdetails/productlist`" v-if="item.canUse">
|
||||
<div class="ts-standard-btn">
|
||||
立即使用
|
||||
</div>
|
||||
</nuxt-link>
|
||||
</div>
|
||||
|
||||
@ -153,6 +154,7 @@ export default {
|
||||
}
|
||||
});
|
||||
this.fullCouponList = list;
|
||||
this.selectGoods('',UNUSE);
|
||||
}
|
||||
},
|
||||
selectGoods(item, index) {
|
||||
@ -197,6 +199,7 @@ export default {
|
||||
valDateToTime = new Date(coupon.fValidTo).getTime();
|
||||
}
|
||||
if(curTime > valDateToTime && coupon.status==0) {
|
||||
coupon.canUse=false;
|
||||
this.newlist.push(coupon);
|
||||
}
|
||||
}
|
||||
@ -209,11 +212,13 @@ export default {
|
||||
valDateToTime = new Date(coupon.fValidTo).getTime();
|
||||
}
|
||||
if(valDateFromTime && valDateToTime && curTime >= valDateFromTime && curTime <= valDateToTime && coupon.status == 0) {
|
||||
coupon.canUse=true;
|
||||
this.newlist.push(coupon);
|
||||
}
|
||||
break;
|
||||
case USED:
|
||||
if(coupon.status == 1) {
|
||||
coupon.canUse=false;
|
||||
this.newlist.push(coupon);
|
||||
}
|
||||
break;
|
||||
@ -243,7 +248,6 @@ export default {
|
||||
this.$router.push({ path: "/userlogin/login"})
|
||||
}
|
||||
this.userdraw(this.usermessage.data.mobile);
|
||||
this.selectGoods('',0);
|
||||
},
|
||||
components: {
|
||||
Myheader,
|
||||
|
Loading…
Reference in New Issue
Block a user