| xqd
@@ -15,7 +15,7 @@
|
|
|
<view class="produce">
|
|
|
<view class="produce-title">奖品信息</view>
|
|
|
<view class="produce-main" v-for="(item,index) in drawInfo.draw_template.draw_config" :key="item.id">
|
|
|
- <image style="width: 132rpx;height: 132rpx;border-radius: 10rpx;" :src="item.product.img_urls"
|
|
|
+ <image style="width: 132rpx;height: 132rpx;border-radius: 10rpx;" :src="item.product.img_urls?item.product.img_urls:item.prize_img"
|
|
|
mode=""></image>
|
|
|
<view class="produce-main-text">
|
|
|
<text class="produce-main-text-top">{{item.name}}</text>
|
| xqd
@@ -96,7 +96,27 @@
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
|
|
|
-
|
|
|
+ <uni-popup ref="dialogError" type="center">
|
|
|
+ <view style="
|
|
|
+ width: 600rpx;
|
|
|
+ max-width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ background: #fff;
|
|
|
+ height: 300rpx;
|
|
|
+ border-radius: 20rpx
|
|
|
+ ">
|
|
|
+ <view style="
|
|
|
+ height: 70%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
+ ">
|
|
|
+ {{error.info}}
|
|
|
+ </view>
|
|
|
+ <navigator style="height: 30%;display: flex;justify-content: center;align-items: center;" open-type="exit" target="miniProgram">退出</navigator>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
|
|
|
</view>
|
|
|
</template>
|
| xqd
@@ -109,40 +129,15 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ error:{
|
|
|
+ info: ""
|
|
|
+ },
|
|
|
big_wheel:{},
|
|
|
//中奖等级
|
|
|
prizeLevel:'',
|
|
|
isexchange: true,
|
|
|
backImageUrl: 'http://t9.9026.com/imgs/banner02.png',
|
|
|
- award: 1,
|
|
|
- // awardList: [{
|
|
|
- // title: '一等奖'
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: '四等奖'
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: '谢谢参与'
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: '一等奖'
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: '谢谢参与'
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: '三等奖'
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: '三等奖'
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: '二等奖'
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: '一等奖'
|
|
|
- // }
|
|
|
- // ],
|
|
|
+ award: 1,
|
|
|
// 顺时针对应每个奖项
|
|
|
drawInfo:{
|
|
|
draw_no: ''
|
| xqd
@@ -209,10 +204,8 @@
|
|
|
this.drawInfo = res.data;
|
|
|
this.$refs.turntable.init(this.drawInfo.draw_template.draw_config);
|
|
|
}else{
|
|
|
- uni.showToast({
|
|
|
- icon: 'error',
|
|
|
- title: res.msg ? res.msg : "暂无权限"
|
|
|
- })
|
|
|
+ this.error.info = res.msg ? res.msg : "暂无权限";
|
|
|
+ this.$refs.dialogError.open()
|
|
|
}
|
|
|
}).catch(err=>{
|
|
|
uni.showToast({
|
| xqd
@@ -231,7 +224,7 @@
|
|
|
if(res.code == 0){
|
|
|
res.data.data.forEach(item => {
|
|
|
if(item.source == 2 && (item.integral>0 || item.product_id>0)){
|
|
|
- this.drawRecord.push(item);
|
|
|
+ this.drawRecord.push(item);
|
|
|
}
|
|
|
})
|
|
|
if(res.data.length >= 15){
|
| xqd
@@ -286,7 +279,6 @@
|
|
|
if(draw_config[i].id == this.drawResult.draw_config_id){
|
|
|
this.drawResultProduct = draw_config[i];
|
|
|
setTimeout(()=>{
|
|
|
- console.log(i)
|
|
|
this.$refs.turntable.end(i).then(_=>{
|
|
|
if(this.drawResultProduct.integral<=0 && !this.drawResultProduct.product){
|
|
|
this.$refs.codePurchaseNone.open()
|
| xqd
@@ -294,6 +286,9 @@
|
|
|
this.$refs.codePurchase.open()
|
|
|
}
|
|
|
});
|
|
|
+ if(this.drawResult.draw_type){
|
|
|
+ this.getDrawRecord(1)
|
|
|
+ }
|
|
|
}, 5000)
|
|
|
break;
|
|
|
}
|