| 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;">
|
| xqd
@@ -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>
|
|
|
|
|
|
|
| xqd
@@ -148,7 +150,8 @@
|
|
|
drawRecord:[],
|
|
|
drawResult:{},
|
|
|
drawResultProduct: {},
|
|
|
- bigWheelConfig:{}
|
|
|
+ bigWheelConfig:{},
|
|
|
+ isValid: true
|
|
|
}
|
|
|
},
|
|
|
onLoad(params){
|
| xqd
@@ -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()
|
| xqd
@@ -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:"网络繁忙",
|