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>
|
</i>
|
||||||
<div class="rc-userfont" :style="(item.validTo?'visibility:visible':'visibility:hidden')">
|
<div class="rc-userfont" :style="(item.validTo?'visibility:visible':'visibility:hidden')">
|
||||||
<strong>有效期</strong>
|
<strong>有效期</strong>
|
||||||
<span>{{item.validFrom}}至</span>
|
<span>{{item.validFrom}}</span>
|
||||||
|
<span>至</span>
|
||||||
<em>{{item.validTo}}</em>
|
<em>{{item.validTo}}</em>
|
||||||
</div>
|
</div>
|
||||||
<nuxt-link :to="`/productdetails/productlist`" v-if="activeIndex==0">
|
<nuxt-link :to="`/productdetails/productlist`" v-if="item.canUse">
|
||||||
<div class="ts-standard-btn">
|
<div class="ts-standard-btn">
|
||||||
立即使用
|
立即使用
|
||||||
</div>
|
</div>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -153,6 +154,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.fullCouponList = list;
|
this.fullCouponList = list;
|
||||||
|
this.selectGoods('',UNUSE);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectGoods(item, index) {
|
selectGoods(item, index) {
|
||||||
@ -197,6 +199,7 @@ export default {
|
|||||||
valDateToTime = new Date(coupon.fValidTo).getTime();
|
valDateToTime = new Date(coupon.fValidTo).getTime();
|
||||||
}
|
}
|
||||||
if(curTime > valDateToTime && coupon.status==0) {
|
if(curTime > valDateToTime && coupon.status==0) {
|
||||||
|
coupon.canUse=false;
|
||||||
this.newlist.push(coupon);
|
this.newlist.push(coupon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -209,11 +212,13 @@ export default {
|
|||||||
valDateToTime = new Date(coupon.fValidTo).getTime();
|
valDateToTime = new Date(coupon.fValidTo).getTime();
|
||||||
}
|
}
|
||||||
if(valDateFromTime && valDateToTime && curTime >= valDateFromTime && curTime <= valDateToTime && coupon.status == 0) {
|
if(valDateFromTime && valDateToTime && curTime >= valDateFromTime && curTime <= valDateToTime && coupon.status == 0) {
|
||||||
|
coupon.canUse=true;
|
||||||
this.newlist.push(coupon);
|
this.newlist.push(coupon);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case USED:
|
case USED:
|
||||||
if(coupon.status == 1) {
|
if(coupon.status == 1) {
|
||||||
|
coupon.canUse=false;
|
||||||
this.newlist.push(coupon);
|
this.newlist.push(coupon);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -243,7 +248,6 @@ export default {
|
|||||||
this.$router.push({ path: "/userlogin/login"})
|
this.$router.push({ path: "/userlogin/login"})
|
||||||
}
|
}
|
||||||
this.userdraw(this.usermessage.data.mobile);
|
this.userdraw(this.usermessage.data.mobile);
|
||||||
this.selectGoods('',0);
|
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Myheader,
|
Myheader,
|
||||||
|
Loading…
Reference in New Issue
Block a user