|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="lottery-container">
|
|
|
- <van-swipe :autoplay="3000" class="lottery-swipe" vertical :show-indicators="false">
|
|
|
+ <van-swipe v-if="carousel.length" :autoplay="3000" class="lottery-swipe" vertical :show-indicators="false">
|
|
|
<van-swipe-item v-for="item in carousel" :key="item.mealId">有{{item.count}}个用户 {{['', '抽奖', '购买'][item.type]}}{{item.title}}</van-swipe-item>
|
|
|
</van-swipe>
|
|
|
<img class="w51h26" src="~/assets/image/activity/lottery/rule.png" alt="" @click="showRule=true;makePoint('activity_购买协议')">
|
|
@@ -162,7 +162,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async fetch() {
|
|
|
- if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
|
|
|
+ if (this.$userAgent.isAndroid) {
|
|
|
this.token = await window.native.getToken();
|
|
|
} else {
|
|
|
this.token = this.$route.query.token;
|
|
@@ -323,7 +323,9 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
// 成功后次数减少一次
|
|
|
- this.num--;
|
|
|
+ if (this.num > 1) {
|
|
|
+ this.num--;
|
|
|
+ }
|
|
|
// 告诉子组件,开始转动了
|
|
|
this.$refs.roundTurntable.rotate(this.prizeIndex);
|
|
|
},
|