Browse Source

Merge branch 'feature/99年卡活动' of Software/android-cloud-H5 into develop

huangxiaojing 2 years ago
parent
commit
66c39c08e9
1 changed files with 5 additions and 3 deletions
  1. 5 3
      pages/activity/lottery/index.vue

+ 5 - 3
pages/activity/lottery/index.vue

@@ -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);
     },