Forráskód Böngészése

邮箱地址判断是否登录

hangb 7 éve
szülő
commit
d921cd9a45

+ 7 - 8
pages/validation/emailValidation.vue

@@ -28,7 +28,6 @@
     layout (content) {
       return content.store.state.option.isMobile ? 'mobile' : 'default'
     },
-    middleware: 'authenticated',
     transition: {
       name: 'fade',
       mode: 'out-in'
@@ -65,13 +64,13 @@
           this.$router.push('/')
         }
       } else {
-        if (this.$route.query.step === '2') {
-          // this.$router.push(window.loaction.href)
-          this.step = 'new'
-        } else if (this.$route.query.step === '3') {
-          // this.$router.push(window.loaction.href)
-          this.step = 'last'
-          this.stepLast = 'last'
+        if (!this.logged.isLogin) {
+          if (this.$route.query.step === '2') {
+            this.step = 'new'
+          } else if (this.$route.query.step === '3') {
+            this.step = 'last'
+            this.stepLast = 'last'
+          }
         }
       }
     },

+ 12 - 2
pages/validation/phoneValidation.vue

@@ -28,7 +28,7 @@
     layout (context) {
       return context.store.state.option.isMobile ? 'mobile' : 'default'
     },
-    middleware: 'authenticated',
+    // middleware: 'authenticated',
     transition: {
       name: 'fade',
       mode: 'out-in'
@@ -63,7 +63,17 @@
       }
     },
     mounted () {
-      this.$route.query.token ? this.step = 'new' : this.step = 'select'
+      if (!this.$route.query.token) {
+        if (this.logged.isLogin) {
+          this.step = 'select'
+        } else {
+          this.$router.push('/')
+        }
+      } else {
+        if (!this.logged.isLogin) {
+          this.$route.query.token ? this.step = 'new' : this.step = 'select'
+        }
+      }
     },
     methods: {
       setStep (type) {