소스 검색

bug 修复

lilei 4 년 전
부모
커밋
40e06b60f0
1개의 변경된 파일23개의 추가작업 그리고 9개의 파일을 삭제
  1. 23 9
      pagesA/luckDraw/luckDraw.vue

+ 23 - 9
pagesA/luckDraw/luckDraw.vue

@@ -18,8 +18,13 @@
 				:canvasMargin="canvasData.margin"
 				:canvasMargin="canvasData.margin"
 			/>
 			/>
 			<view class="synums">
 			<view class="synums">
-				抽奖剩余次数:
-				<text>{{ reTimes }}</text>
+				<view v-if="reTimes">
+					抽奖剩余次数:
+					<text>{{ reTimes }}</text>
+				</view>
+				<view v-else @click="showPayWin">
+					支付10乐豆继续抽奖 >
+				</view>
 			</view>
 			</view>
 		</view>
 		</view>
 		<!-- 获奖人员滚动列表 -->
 		<!-- 获奖人员滚动列表 -->
@@ -74,7 +79,7 @@
 				<view class="lottery-title">
 				<view class="lottery-title">
 					<image src="../../static/nozj.png"></image>
 					<image src="../../static/nozj.png"></image>
 				</view>
 				</view>
-				<view class="lottery-confrim-btn">
+				<view @click="showLottery=false" class="lottery-confrim-btn">
 					继续抽奖
 					继续抽奖
 				</view>
 				</view>
 			</view>
 			</view>
@@ -91,7 +96,7 @@
 					<image v-if="targetPrize.prizeImage" :src="targetPrize.prizeImage"></image>
 					<image v-if="targetPrize.prizeImage" :src="targetPrize.prizeImage"></image>
 					<view>{{targetPrize.name}}</view>
 					<view>{{targetPrize.name}}</view>
 				</view>
 				</view>
-				<view class="lottery-confrim-btn">
+				<view @click="viewMyJp" class="lottery-confrim-btn">
 					去领取
 					去领取
 				</view>
 				</view>
 			</view>
 			</view>
@@ -99,7 +104,7 @@
 				<view class="lottery-title">
 				<view class="lottery-title">
 					很抱歉,您来晚了,当前奖品已无库存
 					很抱歉,您来晚了,当前奖品已无库存
 				</view>
 				</view>
-				<view class="lottery-confrim-btn">
+				<view @click="showLottery=false" class="lottery-confrim-btn">
 					继续抽奖
 					继续抽奖
 				</view>
 				</view>
 			</view>
 			</view>
@@ -275,16 +280,20 @@ export default {
 		getPrizeSetting(){
 		getPrizeSetting(){
 			this.reTimes = 3
 			this.reTimes = 3
 		},
 		},
+		// 抽奖次数用完了
+		showPayWin(){
+			this.showLottery = true
+			this.winTypes = 'win_1'
+			this.prizeIndex = -1
+			clearCacheFile()
+		},
 		// 本次抽奖开始
 		// 本次抽奖开始
 		handleDrawStart() {
 		handleDrawStart() {
 			this.targetName = '';
 			this.targetName = '';
 			this.targetPrize = null;
 			this.targetPrize = null;
-			console.log(this.reTimes)
 			// 抽奖次数用完了
 			// 抽奖次数用完了
 			if(this.reTimes<=0){
 			if(this.reTimes<=0){
-				this.showLottery = true
-				this.winTypes = 'win_1'
-				this.prizeIndex = -1
+				this.showPayWin()
 				return
 				return
 			}
 			}
 			let list = [...this.prizeList];
 			let list = [...this.prizeList];
@@ -341,6 +350,10 @@ export default {
 			}
 			}
 			
 			
 			this.showLottery = true
 			this.showLottery = true
+			if(this.reTimes == 0){
+				this.prizeIndex = -1
+			}
+			console.log(this.reTimes)
 			console.log(this.targetName);
 			console.log(this.targetName);
 		},
 		},
 		// 抽奖转盘绘制完成
 		// 抽奖转盘绘制完成
@@ -387,6 +400,7 @@ export default {
 		},
 		},
 		// 我的奖品
 		// 我的奖品
 		viewMyJp(){
 		viewMyJp(){
+			this.showLottery=false
 			uni.navigateTo({
 			uni.navigateTo({
 				url: '/pagesA/luckDraw/myJp'
 				url: '/pagesA/luckDraw/myJp'
 			})
 			})