فهرست منبع

验证邮箱通过邮箱验证、验证失败返回页面

hangb 7 سال پیش
والد
کامیت
59f47e86fd

+ 111 - 0
components/mobile/validation/phoneValidationFail.vue

@@ -0,0 +1,111 @@
+<template>
+  <div class="validation">
+    <div class="container">
+      <div class="content">
+        <div class="content-bottom">
+          <p class="passed"><img src="/images/all/times.png" alt=""/>链接已失效</p>
+          <span class="close-tip">邮箱链接因超时未点击或其他原因已失效,请重新验证!</span>
+          <div class="close-btn" @click="goCloudCenter">返回云中心</div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'validation',
+    methods: {
+//      跳转至云中心页面
+      goCloudCenter () {
+        window.location.href = '/cloudcenter'
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .validation {
+    margin: 0 auto;
+    width: 100%;
+    background: #eee;
+
+  .container {
+    padding-top: .5rem;
+    margin: 0 auto;
+    width: .98rem;
+    text-align: center;
+
+  .content {
+    padding: 0 .5rem;
+    margin: .5rem auto 0;
+    width: 100%;
+    /*height: 540px;*/
+    text-align: center;
+    background: #fff;
+
+  .content-bottom {
+    margin: 0 auto;
+    padding-bottom: .5rem;
+    width: 3.6rem;
+
+  div.warp {
+    padding-bottom: .65rem;
+  }
+
+  p {
+    font-size: .24rem;
+    color: #323232;
+
+  img {
+    margin-right: .2rem;
+    width: .3rem;
+    height: .28rem;
+  }
+
+  }
+  p.pass {
+    font-size: .24rem;
+    color: #e77405;
+
+  img {
+    height: .3rem;
+  }
+
+  }
+  p.passed {
+    padding-top: .5rem;
+    color: #e77405;
+
+  img {
+    height: .3rem;
+  }
+
+  }
+  span {
+    display: inline-block;
+    font-size: 14px;
+    color: #8b8b8b;
+  }
+
+  span.close-tip {
+    margin: .15rem 0 1.4rem 0;
+  }
+
+  .close-btn {
+    margin: 0 auto;
+    width: 2rem;
+    height: .36rem;
+    line-height: .36rem;
+    font-size: .2rem;
+    text-align: center;
+    color: #323232;
+    border: 1px solid #d2d2d2;
+    border-radius: 3px;
+    cursor: pointer;
+  }
+
+  }
+  }
+  }
+  }
+</style>

+ 19 - 11
pages/validation/emailValidation.vue

@@ -5,7 +5,7 @@
       <validationEmail-stepMobile v-if="step === 'mobile'" @stepEvent="setStep" @tokenEvent="loadToken" :info="info"/>
       <validationEmail-stepEmail v-if="step === 'email'" @stepEvent="setStep" :info="info"/>
       <validationEmail-stepSecurity v-if="step === 'questions'" @stepEvent="setStep" @tokenEvent="loadToken"/>
-      <validationEmail-stepNew v-if="step === 'new'" @stepEvent="setStep" @lastEvent="setStepLast" :tokenId="tokenId"/>
+      <validationEmail-stepNew v-if="step === 'new'" @stepEvent="setStep" :tokenId="tokenId"/>
       <validationEmail-stepSuccess v-if="step === 'last'" @stepEvent="setStep" :stepLast="stepLast"/>
       <step-appeal v-if="step === 'appeal'" @stepEvent="setStep" @lastEvent="setStepLast"/>
     </template>
@@ -24,7 +24,6 @@
       // console.log(content, 'content')
       return content.store.state.option.isMobile ? 'mobile' : 'default'
     },
-    middleware: 'authenticated',
     transition: {
       name: 'fade',
       mode: 'out-in'
@@ -34,7 +33,7 @@
         step: 'select',
         info: '',
         tokenId: '',
-        stepLast: 'new'
+        stepLast: 'last'
       }
     },
     components: {
@@ -49,18 +48,22 @@
       StepAppeal
     },
     mounted () {
-      console.log('111')
-      if (this.logged.isLogin) {
-        if (this.$route.query.token) {
-          this.step = 'last'
-        } else {
+      if (!this.$route.query.token) {
+        if (this.logged.isLogin) {
           this.step = 'select'
+        } else {
+          this.$router.push('/')
         }
       } else {
-        if (this.$route.query.token) {
+        console.log(this.$route.query)
+        console.log('token', this.$route.query)
+        console.log('2', this.$route.query.step)
+        if (this.$route.query.step === '2') {
+          this.step = 'new'
+          console.log('new')
+        } else if (this.$route.query.step === '3') {
           this.step = 'last'
-        } else {
-          this.$router.push('/')
+          this.stepLast = 'last'
         }
       }
     },
@@ -74,7 +77,12 @@
       }
     },
     methods: {
+      setStepLast (type) {
+        console.log(type)
+        this.stepLast = type
+      },
       setStep (step) {
+        console.log(step)
         this.step = step
       },
       setInfo (info) {

+ 5 - 0
pages/validation/emailValidationSecondStep.vue

@@ -12,6 +12,11 @@
     components: {
       AccountCenterHeader,
       EmailValidationSecondStep
+    },
+    mounted () {
+      if (this.$store.state.option.isMobile) {
+        this.$router.push('/validation/emailValidation?token=' + this.$route.query.token + '&step=' + this.$route.query.step)
+      }
     }
   }
 </script>

+ 1 - 1
pages/validation/emailValidationThirdStep.vue

@@ -15,7 +15,7 @@
     },
     mounted () {
       if (this.$store.state.option.isMobile) {
-        this.$router.push('/validation/emailValidation?token=' + this.$route.query.token)
+        this.$router.push('/validation/emailValidation?token=' + this.$route.query.token + '&step=' + this.$route.query.step)
       }
     }
   }