Browse Source

bug 修复

lilei 4 years ago
parent
commit
3e45c8feea
2 changed files with 13 additions and 10 deletions
  1. 12 9
      pages/index/index.vue
  2. 1 1
      pagesA/luckDraw/luckDraw.vue

+ 12 - 9
pages/index/index.vue

@@ -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)
 					}

+ 1 - 1
pagesA/luckDraw/luckDraw.vue

@@ -280,7 +280,7 @@ export default {
 					prizeList.map(item => {
 						temp.push({
 							prizeId: item.id,
-							name: item.prizeDesc,
+							name: item.prizeType == 'GOLD' ? (item.prizeDesc + '乐豆') : item.prizeDesc,
 							stock: item.prizeNum,
 							weight: item.prizeRate,
 							prizeImage: item.prizeImage,