浏览代码

修改bug

huangxiaojing 2 年之前
父节点
当前提交
b1dcebe618
共有 2 个文件被更改,包括 25 次插入26 次删除
  1. 13 13
      pages/activity/lottery/index.vue
  2. 12 13
      pages/activity/lottery/pc.vue

+ 13 - 13
pages/activity/lottery/index.vue

@@ -477,19 +477,6 @@ export default {
         this.actualPrice = res.data.actualPrice;
         this.yearActualPrice = res.data.actualPrice;
         this.luckDrawType = res.data.luckDrawType;
-        if (res.data.luckDrawType === 1) {
-          this.makePoint('activity_15.9年卡');
-          if (Number(localStorage.getItem('year-15-9')) !== 2) {
-            localStorage.setItem('year-15-9', 1);
-          }
-        }
-        if (res.data.luckDrawType === 2) {
-          this.makePoint('activity_9.9年卡');
-          if (Number(localStorage.getItem('year-9-9')) !== 2) {
-            localStorage.setItem('year-9-9', 1);
-          }
-        }
-
         this.mealId = res.data.mealId
         this.selMealId = res.data.mealId
         this.getMealInfo()
@@ -548,6 +535,19 @@ export default {
       if (this.$userAgent.isAndroid) {
         window.native.isMembersLotto(true)
       }
+
+      if (this.luckDrawType === 1) {
+        this.makePoint('activity_15.9年卡');
+        if (Number(localStorage.getItem('year-15-9')) !== 2) {
+          localStorage.setItem('year-15-9', 1);
+        }
+      }
+      if (this.luckDrawType === 2) {
+        this.makePoint('activity_9.9年卡');
+        if (Number(localStorage.getItem('year-9-9')) !== 2) {
+          localStorage.setItem('year-9-9', 1);
+        }
+      }
     },
     // 判断是否可以转动
     canBeRotated() {

+ 12 - 13
pages/activity/lottery/pc.vue

@@ -433,19 +433,6 @@ export default {
         this.actualPrice = res.data.actualPrice;
         this.yearActualPrice = res.data.actualPrice;
         this.luckDrawType = res.data.luckDrawType;
-        if (res.data.luckDrawType === 1) {
-          this.makePoint('activity_15.9年卡');
-          if (Number(localStorage.getItem('year-15-9')) !== 2) {
-            localStorage.setItem('year-15-9', 1);
-          }
-        }
-        if (res.data.luckDrawType === 2) {
-          this.makePoint('activity_9.9年卡');
-          if (Number(localStorage.getItem('year-9-9')) !== 2) {
-            localStorage.setItem('year-9-9', 1);
-          }
-        }
-
         this.mealId = res.data.mealId
         this.selMealId = res.data.mealId
         this.getMealInfo()
@@ -489,6 +476,18 @@ export default {
       this.showPay = true;
       // 解锁
       this.isLocking = false;
+      if (res.data.luckDrawType === 1) {
+        this.makePoint('activity_15.9年卡');
+        if (Number(localStorage.getItem('year-15-9')) !== 2) {
+          localStorage.setItem('year-15-9', 1);
+        }
+      }
+      if (res.data.luckDrawType === 2) {
+        this.makePoint('activity_9.9年卡');
+        if (Number(localStorage.getItem('year-9-9')) !== 2) {
+          localStorage.setItem('year-9-9', 1);
+        }
+      }
     },
     // 判断是否可以转动
     canBeRotated() {