yfso 2 yıl önce
ebeveyn
işleme
38089f9b02
3 değiştirilmiş dosya ile 28 ekleme ve 13 silme
  1. 1 1
      pages.json
  2. 25 10
      pages/goods/goods-lucky/index.vue
  3. 2 2
      setting.js

+ 1 - 1
pages.json

xqd
@@ -331,7 +331,7 @@
 		"list": [{
 			"name": "goood-lucky", //模式名称
 			"path": "pages/goods/goods-lucky/index", //启动页面,必选
-			"query": "draw_no=EkryhbPL6fZW" //启动参数,在页面的onLoad函数里面得到
+			"query": "draw_no=BExbQ1EtBCXN" //启动参数,在页面的onLoad函数里面得到
 		}]
 	}
 }

+ 25 - 10
pages/goods/goods-lucky/index.vue

xqd xqd xqd xqd xqd
@@ -8,7 +8,7 @@
 			<view style="width:0px;height:0px;"><image src="http://t9.9026.com/imgs/step01.png" style="width: 285rpx;height: 341rpx;transform: translate(232rpx, 167rpx);"/></view>
 <!-- 			<q-turntable isRenderImage ref="turntable" :areaNumber='9' @start="turntableStart" @success="turntableSuccess">
 			</q-turntable> -->
-			<q-turntable ref="turntable" :isValid="drawInfo.id" @start="turntableStart" :big_wheel_disc="bigWheelConfig.big_wheel_disc" :big_wheel_button="bigWheelConfig.big_wheel_button"/>
+			<q-turntable ref="turntable" :isValid="drawInfo.id && isValid" @start="turntableStart" :big_wheel_disc="bigWheelConfig.big_wheel_disc" :big_wheel_button="bigWheelConfig.big_wheel_button"/>
 		</view>
 
 		<view style="background-color: #f9f9f9; padding-bottom: 136rpx;">
@@ -37,7 +37,9 @@
 						<text class="introduce-top-rule2"></text>
 					</view>
 					<view class="introduce-text">
-						<u-parse :content="bigWheelConfig.big_wheel_rule"></u-parse>
+						<u-parse 
+						:content="drawInfo.draw_template.rule"
+						></u-parse>
 					</view>
 					
 					
@@ -148,7 +150,8 @@
 				drawRecord:[],
 				drawResult:{},
 				drawResultProduct: {},
-				bigWheelConfig:{}
+				bigWheelConfig:{},
+				isValid: true
 			}
 		},
 		onLoad(params){
@@ -205,13 +208,24 @@
 				}).then(res=>{
 					if(res.code == 0){
 						this.drawInfo = res.data;
-						this.$refs.turntable.init(this.drawInfo.draw_template.draw_config);
-						// if(this.drawInfo.draw_template.draw_config.length == 0 || !this.drawInfo.draw_template.draw_config){
-						// 	this.error.info = "活动未开放";
-						// 	this.$refs.dialogError.open()
-						// }else{
-						// 	this.$refs.turntable.init(this.drawInfo.draw_template.draw_config);
-						// }
+						// this.$refs.turntable.init(this.drawInfo.draw_template.draw_config);
+						if(this.drawInfo.draw_template.draw_config && this.drawInfo.draw_template.draw_config.length > 3){
+							let tres = true;
+							this.drawInfo.draw_template.draw_config.forEach(item => {
+								if(!item.reward_odds){
+									tres = false;
+								}
+							})
+							if(tres){
+								this.$refs.turntable.init(this.drawInfo.draw_template.draw_config);
+							}else{
+								this.error.info = "活动未开启";
+								this.$refs.dialogError.open()
+							}
+						}else{
+							this.error.info = "活动未开放";
+							this.$refs.dialogError.open()
+						}
 					}else{
 						this.error.info = res.msg ? res.msg : "暂无权限";
 						this.$refs.dialogError.open()
@@ -275,6 +289,7 @@
 					draw_no: this.drawInfo.draw_no,
 				}).then(res => {
 					if(res.code != 0 || !res.data){
+						this.isValid = false;
 						uni.showToast({
 							icon: 'error',
 							title: res.msg?res.msg:"网络繁忙",

+ 2 - 2
setting.js

xqd
@@ -3,8 +3,8 @@
  */
 const IS_DEV = process.env.NODE_ENV === 'development'
 
-const URL = 'https://t9.9026.com'
-// const URL = 'https://ihg.9026.com'
+// const URL = 'https://t9.9026.com'
+const URL = 'https://ihg.9026.com'
 
 	
 module.exports = {