Selaa lähdekoodia

bugfix:处理已知bug

leo 1 vuosi sitten
vanhempi
commit
ab3cc07267

+ 8 - 7
pages/claimCloudPhone/chooseCloudPhone.vue

@@ -98,6 +98,14 @@ export default {
     if (localStorage.getItem('bargainingStatusInfo')) {
       this.info = JSON.parse(localStorage.getItem('bargainingStatusInfo'));
     }
+    // 用来监听微信返回上一页的
+    const { exit } = this.$route.query;
+    if (exit) {
+      this.wxIntercept(() => {
+        this.leaveFun();
+      });
+    }
+    
     if (+sessionStorage.getItem('activityEmd')) {
       this.dialogVisible = false;
       this.$toast('活动已到期');
@@ -110,13 +118,6 @@ export default {
     }
     this.isNavBar = !+localStorage.getItem('auth.inviteeNum');
     _self = this;
-    // 用来监听微信返回上一页的
-    const { exit } = this.$route.query;
-    if (exit) {
-      this.wxIntercept(() => {
-        this.leaveFun();
-      });
-    }
     this.getRenewalPackage();
   },
   methods: {

+ 1 - 1
pages/claimCloudPhone/components/bargainingAssistance.vue

@@ -681,7 +681,7 @@ export default {
             ) {
               window.native.webBackStatus && window.native.webBackStatus(false);
             }
-            this.$router.replace('/claimCloudPhone/chooseCloudPhone?exit=1');
+            this.$router.replace('/claimCloudPhone?exit=1');
           }
         })
         .catch((error) => {

+ 3 - 1
pages/claimCloudPhone/index.vue

@@ -90,7 +90,9 @@ export default {
                   'activityEmd',
                   res.data.bargainingStatus,
                 );
-                this.$router.replace('/claimCloudPhone/chooseCloudPhone');
+                let url = '/claimCloudPhone/chooseCloudPhone'
+                if(+this.$route.query.exit) url += '?exit=1'
+                this.$router.replace(url);
                 break;
               case 5:
                 this.visible = true;