Browse Source

Merge remote-tracking branch 'origin/dev' into feature-hb

hangb 7 years ago
parent
commit
6dc9dd59f6

+ 1 - 1
components/mobile/reset/stepLast.vue

@@ -39,7 +39,7 @@
     methods: {
       sureAccount () {
         if (this.$route.query.returnURL) {
-          window.location.href = this.$route.query.returnURL
+          window.location.href = decodeURIComponent(this.$route.query.returnURL)
         } else {
           this.$router.push('/')
         }

+ 1 - 1
components/mobile/validation/ValidationEmailStepSuccess.vue

@@ -34,7 +34,7 @@
     methods: {
       sureAccount () {
         if (this.$route.query.returnURL) {
-          window.location.href = this.$route.query.returnURL
+          window.location.href = decodeURIComponent(this.$route.query.returnURL)
         } else {
           this.$router.push('/cloudcenter')
         }

+ 1 - 1
components/mobile/validation/ValidationPhoneStepSuccess.vue

@@ -34,7 +34,7 @@
     methods: {
       sureAccount () {
         if (this.$route.query.returnURL) {
-          window.location.href = this.$route.query.returnURL
+          window.location.href = decodeURIComponent(this.$route.query.returnURL)
         } else {
           this.$router.push('/')
         }

+ 1 - 1
components/reset/PasswordStepSuccess.vue

@@ -26,7 +26,7 @@
 //      跳转个人中心
       goCloudCenter () {
         if (this.$route.query.returnURL) {
-          window.location.href = this.$route.query.returnURL
+          window.location.href = decodeURIComponent(this.$route.query.returnURL)
         } else {
           this.$router.push('/')
         }

+ 1 - 1
components/validation/EmailStepSuccess.vue

@@ -26,7 +26,7 @@
 //      跳转至云中心页面
       goCloudCenter () {
         if (this.$route.query.returnURL) {
-          window.location.href = this.$route.query.returnURL
+          window.location.href = decodeURIComponent(this.$route.query.returnURL)
         } else {
           this.$router.push('/cloudcenter')
         }

+ 1 - 1
components/validation/PhoneStepSuccess.vue

@@ -26,7 +26,7 @@
 //      跳转至云中心页面
       goCloudCenter () {
         if (this.$route.query.returnURL) {
-          window.location.href = this.$route.query.returnURL
+          window.location.href = decodeURIComponent(this.$route.query.returnURL)
         } else {
           this.$router.push('/')
         }

+ 5 - 4
pages/reset/forgetPasswordValidationAccount.vue

@@ -67,11 +67,12 @@
     mounted () {
       if (this.$route.query.token) {
         this.step = 'security'
-        // this.$router.push('/reset/forgetPasswordValidationAccount?token=' + this.$route.query.token)
-      } else if (this.logged.isLogin) {
-        this.step = 'select'
       } else {
-        this.step = 'first'
+        if (this.logged.isLogin) {
+          this.step = 'select'
+        } else {
+          this.step = 'first'
+        }
       }
     },
     computed: {

+ 10 - 11
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'
@@ -58,25 +57,25 @@
       StepAppeal
     },
     mounted () {
-      if (!this.$route.query.token) {
-        if (this.logged.isLogin) {
-          this.step = 'select'
-        } else {
-          this.$router.push('/')
-        }
-      } else {
+      if (this.$route.query.token) {
         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)
+        }
+        if (this.$route.query.step === '3') {
           this.step = 'last'
           this.stepLast = 'last'
         }
+      } else {
+        if (this.logged.isLogin) {
+          this.step = 'select'
+        } else {
+          this.$router.push('/')
+        }
       }
     },
     computed: {
       logged () {
+        console.log('12', this.$store.state.option.isLogin.data.content)
         return this.$store.state.option.isLogin.data.content
       },
       isMobile () {

+ 10 - 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,15 @@
       }
     },
     mounted () {
-      this.$route.query.token ? this.step = 'new' : this.step = 'select'
+      if (this.$route.query.token) {
+        this.step = 'new'
+      } else {
+        if (this.logged.isLogin) {
+          this.step = 'select'
+        } else {
+          this.$router.push('/')
+        }
+      }
     },
     methods: {
       setStep (type) {