|
@@ -190,15 +190,18 @@
|
|
|
if(res.status == 200 && res.data){
|
|
|
this.$u.vuex('vuex_LuckDraw',res.data)
|
|
|
// 判断活动是否过期
|
|
|
-
|
|
|
- findCustomerTimes({id:res.data.luckyDrawNo}).then(res => {
|
|
|
- let reTimes = 0
|
|
|
- if(res.status == 200){
|
|
|
- reTimes = res.data.timesSurplus || 0
|
|
|
- }
|
|
|
- this.$u.vuex('vuex_LuckDrawTimes',reTimes)
|
|
|
- this.showLottery = reTimes > 0
|
|
|
- })
|
|
|
+ let a = moment().isBetween(res.data.activeStartTime,res.data.activeEndTime,'days','[]')
|
|
|
+ if(a){
|
|
|
+ // 判断是否有免费抽奖次数
|
|
|
+ findCustomerTimes({id:res.data.luckyDrawNo}).then(res => {
|
|
|
+ let reTimes = 0
|
|
|
+ if(res.status == 200){
|
|
|
+ reTimes = res.data.timesSurplus || 0
|
|
|
+ }
|
|
|
+ this.$u.vuex('vuex_LuckDrawTimes',reTimes)
|
|
|
+ this.showLottery = reTimes > 0
|
|
|
+ })
|
|
|
+ }
|
|
|
}else{
|
|
|
this.$u.vuex('vuex_LuckDraw',null)
|
|
|
}
|