Browse Source

账户中心pc端验证手机页面

hangb 7 years ago
parent
commit
b98d97cea9

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

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

+ 5 - 1
components/validation/EmailStepSuccess.vue

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

+ 381 - 0
components/validation/PhoneStepEmail.vue

@@ -0,0 +1,381 @@
+<template>
+  <div class="validation">
+    <div class="container">
+      <div class="content">
+        <div class="content-top">
+          <h3>验证手机</h3>
+          <div class="step">
+            <img src="/images/all/step01.png" alt=""/>
+            <div class="step-item"><span class="active">账号验证</span><span>新手机号码</span><span>设置完成</span></div>
+            <a @click="chooseWay('select')"  class="return"><img src="/images/all/return.png" alt=""/></a>
+          </div>
+        </div>
+        <div class="content-bottom">
+          <span class="use">使用电子邮箱<em>{{info | hide}}</em>进行验证,有效期7天</span>
+          <div class="warp"
+               @click="firstStepValidEmail"
+               v-show="!emailSendSuccess">
+            <button class="btn">发送验证请求</button>
+          </div>
+          <div class="warp" v-show="emailSendSuccess">
+            <button class="btn" :disabled="emailSendSuccess">已发送验证邮件,请查收</button>
+          </div>
+        </div>
+      </div>
+      <loading v-show="isShowLoading"/>
+    </div>
+  </div>
+</template>
+
+<script>
+  import Loading from '~components/common/loading/Loading.vue'
+  export default {
+    name: 'validation',
+    props: ['info'],
+    components: {
+      Loading
+    },
+    filters: {
+      hide: function (value) {
+        let getEmailIndex = value.indexOf('@')
+        if (getEmailIndex > 3) {
+          let len = value.substring(3, getEmailIndex)
+          value = value.replace(len, '***')
+        }
+        return value
+      }
+    },
+    data () {
+      return {
+        isShowLoading: false,
+        emailSendSuccess: false
+      }
+    },
+    methods: {
+      // 选择方式
+      chooseWay (type) {
+        this.$emit('stepEvent', type)
+      },
+      // 第一步验证邮箱
+      firstStepValidEmail () {
+        this.isShowLoading = true
+        this.$http.get(`/update/user/check/email`, {params: {email: this.info, operate: 'mobile'}})
+          .then(response => {
+            this.isShowLoading = false
+            if (response.data.success) {
+              this.emailSendSuccess = true
+            } else {
+              this.emailSendSuccess = false
+              return Promise.reject(response.data)
+            }
+          }).catch(err => {
+            this.isShowLoading = false
+            this.$message.error(err.errMsg)
+          })
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .validation {
+    margin: 0 auto;
+    width: 100%;
+    background: #eee;
+    .container{
+      padding-top: 50px;
+      margin: 0 auto;
+      width: 980px;
+      text-align: center;
+      .content{
+        padding: 0 50px;
+        margin: 50px auto 0;
+        width: 100%;
+        /*height: 540px;*/
+        text-align: center;
+        background: #fff;
+          .content-top{
+            height: 80px;
+            line-height: 80px;
+            h3{
+              margin-bottom: 0;
+              font-size: 24px;
+              color: #000;
+              border-bottom: 1px solid #dcdcdc;
+            }
+            .step{
+              position: relative;
+              margin-top: 10px;
+              img{
+                width: 315px;
+                height: 46px;
+              }
+              .step-item{
+                position: absolute;
+                top: 45px;
+                left: 265px;
+                span{
+                  margin-right: 78px;
+                  font-size: 14px;
+                  color: #b4b4b4;
+                }
+                span.active {
+                  color: #0076ad;
+                }
+              }
+            }
+          }
+          form {
+            margin-top: 150px;
+            padding-bottom: 44px;
+              input{
+                padding: 0 0 0 18px;
+                width: 360px;
+                height: 44px;
+                line-height: 44px;
+                font-size: 14px;
+                color: #000;
+                border-radius: 0;
+              }
+              input.answer {
+                background: url("/images/all/more.png") no-repeat 325px center;
+                cursor: pointer;
+              }
+              ul{
+                display: none;
+                position: absolute;
+                top: 44px;
+                left: 0;
+                width: 360px;
+                background: #fff;
+                box-shadow: 0 0 5px rgba(0,0,0,.5);
+                -moz-box-shadow: 0 0 5px rgba(0,0,0,.5);
+                -o-box-shadow: 0 0 5px rgba(0,0,0,.5);
+                -webkit-box-shadow: 0 0 5px rgba(0,0,0,.5);
+                z-index: 10;
+                li{
+                  padding-left: 18px;
+                  width: 100%;
+                  height: 30px;
+                  line-height: 30px;
+                  text-align: left;
+                  font-size: 14px;
+                  color: #000;
+                  cursor: pointer;
+                  &:hover{
+                    background: #0076ad;
+                    color: #fff;
+                   }
+                }
+              }
+              span.tip{
+                position: absolute;
+                top: 0;
+                right: -238px;
+                font-size: 13px;
+                color: #8c8c8c;
+                a{
+                  font-size: 13px;
+                  color: #0076ad;
+                }
+              }
+              span.tip.codeError-tip{
+                position: absolute;
+                top: 3px;
+                left: 378px;
+                width: 200px;
+                text-align: left;
+                color: #ff4949;
+                font-size: 12px;
+              }
+              i{
+                position: absolute;
+                top: 13px;
+                left: 20px;
+                font-size: 20px;
+                color: #a0a0a0;
+              }
+            .btn {
+              margin: 34px 0 16px 0;
+              width: 360px;
+              height: 44px;
+              line-height: 44px;
+              font-size: 16px;
+              color: #fff;
+              background: #0076AD;
+              border-radius: 3px;
+            }
+          }
+          .content-bottom{
+            margin: 155px auto 0;
+            padding-bottom: 50px;
+            width: 360px;
+            div.warp{
+              padding-bottom: 65px;
+            }
+            p{
+              font-size: 24px;
+              color: #323232;
+              img{
+                margin-right: 20px;
+                width: 30px;
+                height: 28px;
+              }
+            }
+            p.pass{
+              font-size: 24px;
+              color: #e77405;
+              img{
+                height: 30px;
+              }
+            }
+            p.passed {
+              color: #2ab300;
+              img{
+                height: 30px;
+              }
+            }
+            span{
+              display: inline-block;
+              font-size: 14px;
+              color: #8b8b8b;
+            }
+            span.close-tip{
+              margin: 15px 0 140px 0;
+            }
+            .close-btn{
+              margin: 0 auto;
+              width: 200px;
+              height: 36px;
+              line-height: 36px;
+              font-size: 14px;
+              text-align: center;
+              color: #323232;
+              border: 1px solid #d2d2d2;
+              border-radius: 3px;
+              cursor: pointer ;
+            }
+            span.use{
+              display: inline-block;
+              margin-bottom: 30px;
+              width: 360px;
+              font-size: 14px;
+              color: #000;
+              text-align: left;
+              em{
+                font-size: 14px;
+                font-style: normal;
+                color: #000;
+              }
+            }
+            .form-group {
+              margin: 0 auto 16px;
+              position: relative;
+              width: 360px;
+              height: 44px;
+              line-height: 44px;
+              input{
+                padding: 0 0 0 18px;
+                width: 360px;
+                height: 44px;
+                line-height: 44px;
+                font-size: 14px;
+                color: #000;
+                border-radius: 0;
+              }
+              input.msg{
+                float: left;
+                width: 210px;
+                padding: 0 0 0 18px;
+                height: 44px;
+                line-height: 44px;
+                font-size: 14px;
+                color: #000;
+                border-radius: 0;
+              }
+              span.msg{
+                float: right;
+                margin: 0;
+                width: 130px;
+                height: 44px;
+                line-height: 44px;
+                text-align: center ;
+                font-size: 14px;
+                color: #5a5a5a;
+                background: #f4f4f4;
+                border: 1px solid #dcdcdc;
+                cursor: pointer;
+              }
+              span.msg.send{
+                background: #d2d2d2;
+                color: #fff;
+              }
+            }
+            .btn {
+              margin: 34px 0 10px 0;
+              width: 360px;
+              height: 44px;
+              line-height: 44px;
+              font-size: 16px;
+              color: #fff;
+              background: #0076AD;
+              border-radius: 3px;
+            }
+          }
+          .choose{
+            margin: 155px auto 0;
+            padding-bottom: 44px;
+            div{
+              padding: 0 15px;
+              margin: 0 auto 16px;
+              width: 360px;
+              height: 60px;
+              line-height: 60px;
+              text-align: left;
+              overflow: hidden;
+              border: 1px solid #d2d2d2;
+              cursor: pointer;
+              &:hover,&.active{
+                border-color: #0076ad;
+                span{
+                  color: #0076ad;
+                }
+                i.second {
+                  color: #0076ad;
+                }
+               }
+                img.first{
+                  float: left;
+                  margin: 24px 20px 0 0;
+                  font-size: 20px;
+                  color: #323232;
+                }
+                img.first.mob{
+                  margin: 22px 20px 0 5px;
+                  font-size: 28px;
+                }
+                i.second {
+                  float: right;
+                  margin: 20px 0 0 5px;
+                  font-size: 20px;
+                  color: #323232;
+                }
+                span{
+                  float: left;
+                  font-size: 14px;
+                  color: #323232;
+                }
+            }
+          }
+        a.return{
+          position: absolute;
+          left: 0;
+          top: -15px;
+          img{
+            width: 34px !important;
+            height: 34px !important;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 21 - 298
components/validation/PhoneValidation.vue → components/validation/PhoneStepMobile.vue

@@ -1,48 +1,17 @@
 <template>
   <div class="validation">
     <div class="container">
-      <div class="content" v-show="goFirstStep">
+      <div class="content">
         <div class="content-top">
           <h3>验证手机</h3>
           <div class="step">
             <img src="/images/all/step01.png" alt=""/>
             <div class="step-item"><span class="active">账号验证</span><span>新手机号码</span><span>设置完成</span></div>
-          </div>
-        </div>
-        <div class="choose">
-          <div v-show="hasValidPhoneWay"
-               @click="chooseWay(1)">
-            <img src="/images/all/icon01.png" alt="" class="first mob"/>
-            <span>通过验证手机</span><i class="fa fa-angle-right second"></i>
-          </div>
-          <div v-show="hasValidEmailWay"
-               @click="chooseWay(2)">
-            <img src="/images/all/icon02.png" alt="" class="first"/>
-            <span>通过验证邮箱</span><i class="fa fa-angle-right second"></i>
-          </div>
-          <div v-show="hasValidQuestionsWay"
-               @click="chooseWay(3)">
-            <img src="/images/all/icon03.png" alt="" class="first"/>
-            <span>通过验证密保</span><i class="fa fa-angle-right second"></i>
-          </div>
-          <div v-show="showManualAppeal"
-               @click="goAccountAppeal()">
-            <img src="/images/all/icon04.png" alt="" class="first"/>
-            <span>通过人工申诉</span><i class="fa fa-angle-right second"></i>
-          </div>
-        </div>
-      </div>
-      <div class="content" v-show="showPhoneValid">
-        <div class="content-top">
-          <h3>验证手机</h3>
-          <div class="step">
-            <img src="/images/all/step01.png" alt=""/>
-            <div class="step-item"><span class="active">账号验证</span><span>新手机号码</span><span>设置完成</span></div>
-            <a @click="goPreviousStep" class="return"><img src="/images/all/return.png" alt=""/></a>
+            <a @click="chooseWay('select')" class="return"><img src="/images/all/return.png" alt=""/></a>
           </div>
         </div>
         <div class="content-bottom">
-          <span class="use">使用手机号<em>{{secretMobile}}</em>接收验证码</span>
+          <span class="use">使用手机号<em>{{info | hide}}</em>接收验证码</span>
           <div>
             <el-form :model="valid" :rules="rules" ref="valid" label-width="100px" class="demo-ruleForm" style="margin-top: 0;">
               <el-form-item prop="code">
@@ -65,62 +34,6 @@
           </div>
         </div>
       </div>
-      <div class="content" v-show="showEmailValid">
-        <div class="content-top">
-          <h3>验证手机</h3>
-          <div class="step">
-            <img src="/images/all/step01.png" alt=""/>
-            <div class="step-item"><span class="active">账号验证</span><span>新手机号码</span><span>设置完成</span></div>
-            <a href="" class="return"><img src="/images/all/return.png" alt=""/></a>
-          </div>
-        </div>
-        <div class="content-bottom">
-          <span class="use">使用电子邮箱<em>{{secretEmail}}</em>进行验证,有效期7天</span>
-          <div class="warp"
-               @click="firstStepValidEmail"
-               v-show="!emailSendSuccess">
-            <button class="btn">发送验证请求</button>
-          </div>
-          <div class="warp" v-show="emailSendSuccess">
-            <button class="btn" :disabled="emailSendSuccess">已发送验证邮件,请查收</button>
-          </div>
-        </div>
-      </div>
-      <div class="content" v-show="showQuestionsValid">
-        <div class="content-top">
-          <h3>验证手机</h3>
-          <div class="step">
-            <img src="/images/all/step01.png" alt=""/>
-            <div class="step-item"><span class="active">账号验证</span><span>新手机号码</span><span>设置完成</span></div>
-            <a href="" class="return"><img src="/images/all/return.png" alt=""/></a>
-          </div>
-        </div>
-        <div>
-          <el-form :model="validQuestion" :rules="rulesQuestion" ref="valid" label-width="100px" class="demo-ruleForm">
-            <el-form-item class="questions">
-              <span class="question">问题:{{question1}}</span>
-            </el-form-item>
-            <el-form-item prop="answer1">
-              <el-input type="text" v-model="validQuestion.answer1"
-                        auto-complete="off"
-                        placeholder="答案一"></el-input>
-            </el-form-item>
-            <el-form-item class="questions">
-              <span class="question">问题:{{question2}}</span>
-            </el-form-item>
-            <el-form-item prop="answer2">
-              <el-input type="text" v-model="validQuestion.answer2"
-                        auto-complete="off"
-                        placeholder="答案二"></el-input>
-            </el-form-item>
-            <el-form-item>
-              <a class="btn finish"
-                 :disabled="!answer1SecondChecked || !answer2SecondChecked"
-                 @click="validQuestionSubmit">提交</a>
-            </el-form-item>
-          </el-form>
-        </div>
-      </div>
       <loading v-show="isShowLoading"/>
     </div>
   </div>
@@ -133,8 +46,9 @@
     components: {
       Loading
     },
+    props: ['info'],
     data () {
-//      第一步校验验证码
+      // 第一步校验验证码
       var validateFirstCode = (rule, value, callback) => {
         if (value === '') {
           callback(new Error('请填写正确的验证码'))
@@ -143,9 +57,9 @@
         } else {
           if (this.valid.code !== '') {
             if (this.token) {
-              if (this.valid.code !== '' && this.getMobile !== '') {
+              if (this.valid.code !== '' && this.info !== '') {
                 let param = new FormData()
-                param.append('mobile', this.getMobile)
+                param.append('mobile', this.info)
                 param.append('code', this.valid.code)
                 param.append('token', this.token)
                 let config = {
@@ -174,181 +88,39 @@
           callback()
         }
       }
-//      第二步验证密保
-      var validateSecondAnswer1 = (rule, value, callback) => {
-        if (value === '') {
-          callback(new Error('请填写正确的答案'))
-          this.answer1SecondChecked = false
-        } else {
-          if (this.validQuestion.answer1 !== '') {
-            this.answer1SecondChecked = true
-          }
-          callback()
-        }
-      }
-      var validateSecondAnswer2 = (rule, value, callback) => {
-        if (value === '') {
-          callback(new Error('请填写正确的答案'))
-          this.answer2SecondChecked = false
-        } else {
-          if (this.validQuestion.answer2 !== '') {
-            this.answer2SecondChecked = true
-          }
-          callback()
-        }
-      }
       return {
         isShowLoading: false,
-        goFirstStep: true,
-        hasValidPhoneWay: false,
-        hasValidQuestionsWay: false,
-        hasValidEmailWay: false,
-        showManualAppeal: false,
-        showQuestionsValid: false,
-        showEmailValid: false,
-        showPhoneValid: false,
         sendAccountCode: true,
         account_time: 0,
         codeErrorChecked: false,
         codeChecked: false,
-        secretMobile: '',
-        secretEmail: '',
-        getMobile: '',
-        getEmail: '',
-        getQuestions: '',
-        question1: '',
-        question2: '',
-        sort1: '',
-        sort2: '',
         codeErrorMsg: '',
-        firstStepToken: '',
-        answer1SecondChecked: false,
-        answer2SecondChecked: false,
-        emailSendSuccess: false,
+        token: '',
         valid: {
           code: ''
         },
-        validQuestion: {
-          answer1: '',
-          answer2: ''
-        },
         rules: {
           code: [
             {validator: validateFirstCode, trigger: 'blur'}
           ]
-        },
-        rulesQuestion: {
-          answer1: [
-            {validator: validateSecondAnswer1, trigger: 'blur'}
-          ],
-          answer2: [
-            {validator: validateSecondAnswer2, trigger: 'blur'}
-          ]
         }
       }
     },
-    computed: {
-      logged () {
-//        console.log(this.$store.state.option.isLogin.data.content)
-        return this.$store.state.option.isLogin.data.content
+    filters: {
+      hide: function (value) {
+        let reg = /^(\d{3})\d{6}(\d{2})$/
+        return value.replace(reg, '$1******$2')
       }
     },
-    mounted () {
-//      验证是否登录
-      this.$nextTick(() => {
-        this.isLogin()
-        // 刷新统计信息
-        setInterval(() => {
-          this.isLogin()
-        }, 10000)
-      })
-//      获取验证方式
-      this.$nextTick(() => {
-        this.getVerifyWay()
-      })
-    },
     methods: {
-//      判断用户是否登录
-      isLogin () {
-        if (!this.logged.isLogin) {
-//          console.log(this.logged.isLogin)
-//          未登录跳到登录页面
-          window.location.href = '/'
-        }
+      // 选择方式
+      chooseWay (type) {
+        this.$emit('stepEvent', type)
       },
-//      获取验证方式
-      getVerifyWay () {
-        this.$http.get('/update/user/checkType')
-          .then(response => {
-            if (response.data.success) {
-              if (!response.data.content) {
-                this.showManualAppeal = true
-              } else {
-                if (response.data.content.mobile) {
-                  this.hasValidPhoneWay = true
-                  this.showManualAppeal = true
-                  this.getMobile = response.data.content.mobile
-                  var reg = /^(\d{3})\d{6}(\d{2})$/
-                  this.secretMobile = this.getMobile.replace(reg, '$1******$2')
-                }
-                if (response.data.content.questions) {
-                  this.hasValidQuestionsWay = true
-                  this.showManualAppeal = true
-                  this.getQuestions = response.data.content.questions
-                  this.question1 = this.getQuestions[0].question || ''
-                  this.question2 = this.getQuestions[1].question || ''
-                  this.sort1 = this.getQuestions[0].sort || ''
-                  this.sort2 = this.getQuestions[1].sort || ''
-                }
-                if (response.data.content.email) {
-                  this.hasValidEmailWay = true
-                  this.showManualAppeal = true
-                  this.getEmail = response.data.content.email
-                  let getEmailIndex = this.getEmail.indexOf('@')
-                  if (getEmailIndex > 3) {
-                    let len = this.getEmail.substring(3, getEmailIndex)
-                    this.secretEmail = this.getEmail.replace(len, '*')
-                  } else {
-                    this.getEmailArr = this.getEmail.split('')
-                    this.getEmailSplit = this.getEmailArr.splice(getEmailIndex, 0, '*')
-                    this.secretEmail = this.getEmailArr.join('')
-                  }
-                }
-                this.goFirstStep = true
-              }
-            } else {
-              return Promise.reject(response.data)
-            }
-          }).catch(err => {
-            this.$message.error(err.errMsg)
-          })
-      },
-//      选择方式
-      chooseWay (flag) {
-        if (flag === 1) {
-          this.showPhoneValid = true
-        } else if (flag === 2) {
-          this.showEmailValid = true
-        } else if (flag === 3) {
-          this.showQuestionsValid = true
-        }
-        this.goFirstStep = false
-      },
-//      跳转到人工申诉页面
-      goAccountAppeal () {
-        window.location.href = '/appeals/accountAppeal'
-      },
-//      返回上一步
-      goPreviousStep () {
-        this.goFirstStep = true
-        this.showPhoneValid = false
-        this.showEmailValid = false
-        this.showQuestionsValid = false
-      },
-//      获取第一步手机验证码
+      // 获取第一步手机验证码
       getCheckCode () {
         this.isShowLoading = true
-        this.$http.get(`/update/user/check/mobile`, {params: {mobile: this.getMobile}})
+        this.$http.get(`/update/user/check/mobile`, {params: {mobile: this.info}})
           .then(response => {
             this.isShowLoading = false
             if (response.data.success) {
@@ -376,12 +148,12 @@
             this.$message.error(err.errMsg)
           })
       },
-//      手机号验证下一步
+      // 手机号验证下一步
       goNextStep () {
         if (this.codeChecked) {
           this.isShowLoading = true
           let param = new FormData()
-          param.append('mobile', this.getMobile)
+          param.append('mobile', this.info)
           param.append('code', this.valid.code)
           param.append('token', this.token)
           let config = {
@@ -391,58 +163,9 @@
             .then(response => {
               this.isShowLoading = false
               if (response.data.success) {
-                this.$store.commit('login/GET_TOKEN', response.data.content)
-                this.showPhoneValid = false
-                this.$router.push({ path: '/validation/phoneValidationSecondStep' })
-              } else {
-                this.showPhoneValid = true
-                return Promise.reject(response.data)
-              }
-            }).catch(err => {
-              this.isShowLoading = false
-              this.$message.error(err.errMsg)
-            })
-        }
-      },
-//      第一步验证邮箱
-      firstStepValidEmail () {
-        this.isShowLoading = true
-        this.$http.get(`/update/user/check/email`, {params: {email: this.getEmail, operate: 'mobile'}})
-          .then(response => {
-            this.isShowLoading = false
-            if (response.data.success) {
-              this.emailSendSuccess = true
-            } else {
-              this.emailSendSuccess = false
-              return Promise.reject(response.data)
-            }
-          }).catch(err => {
-            this.isShowLoading = false
-            // console.log(err)
-            this.$message.error(err.errMsg)
-          })
-      },
-//      第一步验证密保提交
-      validQuestionSubmit () {
-        if (this.answer1SecondChecked && this.answer2SecondChecked) {
-          this.isShowLoading = true
-          let param = new FormData()
-          let answer = []
-          answer.push({'answer': this.validQuestion.answer1, 'sort': this.sort1}, {'answer': this.validQuestion.answer2, 'sort': this.sort2})
-          let answers = JSON.stringify(answer)
-          param.append('answers', answers)
-          let config = {
-            headers: {'Content-Type': 'multipart/form-data'}
-          }
-          this.$http.post(`/update/user/check/question`, param, config)
-            .then(response => {
-              this.isShowLoading = false
-              if (response.data.success) {
-                this.$store.commit('login/GET_TOKEN', response.data.content.token)
-                this.showQuestionsValid = false
-                this.$router.push({ path: '/validation/phoneValidationSecondStep' })
+                this.$emit('stepEvent', 'new')
+                this.$emit('tokenEvent', response.data.content)
               } else {
-                this.showQuestionsValid = true
                 return Promise.reject(response.data)
               }
             }).catch(err => {

+ 6 - 29
components/validation/PhoneValidationSecondStep.vue → components/validation/PhoneStepNew.vue

@@ -52,6 +52,7 @@
     components: {
       Loading
     },
+    props: ['tokenId'],
     middleware: 'authenticated',
     data () {
 //      第二步验证手机
@@ -72,6 +73,7 @@
             } else {
               this.$http.get(`/update/user/mobile/hasRegister`, {params: {mobile: this.valid2.mobile}})
                 .then(response => {
+                  console.log(response.data.content.hasRegister, '111')
                   if (response.data.content.hasRegister) {
                     this.getCodeBtnIsDisabled = true
                     this.mobileSecondChecked = false
@@ -139,6 +141,7 @@
         getCodeBtnIsDisabled: true,
         showSecondStepCode: true,
         mobileSecondExit: false,
+        secondToken: '',
         valid2: {
           mobile: '',
           code: ''
@@ -153,22 +156,11 @@
         }
       }
     },
-    computed: {
-      firstStepToken () {
-        return this.$store.state.login.token.data
-      }
-    },
-    mounted () {
-//    获取邮箱token
-      this.$nextTick(() => {
-        this.getEmailLinkToken()
-      })
-    },
     methods: {
 //      获取第二步手机验证码
       getSecondCheckCode () {
         this.isShowLoading = true
-        this.$http.get(`/update/user/setMobile`, {params: {mobile: this.valid2.mobile, token: this.firstStepToken}})
+        this.$http.get(`/update/user/setMobile`, {params: {mobile: this.valid2.mobile, token: this.$route.query.token ? this.$route.query.token : this.tokenId}})
           .then(response => {
             this.isShowLoading = false
             if (response.data.success) {
@@ -211,7 +203,8 @@
             .then(response => {
               this.isShowLoading = false
               if (response.data.success) {
-                this.$router.push({ path: '/validation/phoneValidationThirdStep' })
+                this.$emit('stepEvent', 'last')
+                this.$emit('lastEvent', 'last')
               } else {
                 return Promise.reject(response.data)
               }
@@ -223,22 +216,6 @@
               this.second_step_time = 0
             })
         }
-      },
-//      获得邮箱token
-      getEmailLinkToken () {
-        var url = window.location.search
-        var request = {}
-        if (url.indexOf('?' !== -1)) {
-          var str = url.substr(1)
-          var strs = str.split('&')
-          for (var i = 0; i < strs.length; i++) {
-            request[strs[i].split('=')[0]] = decodeURI(strs[i].split('=')[1])
-          }
-        }
-        this.Token = request['token'] || ''
-        if (this.Token) {
-          this.$store.commit('login/GET_TOKEN', this.Token)
-        }
       }
     }
   }

+ 431 - 0
components/validation/PhoneStepSecurity.vue

@@ -0,0 +1,431 @@
+<template>
+  <div class="validation">
+    <div class="container">
+      <div class="content">
+        <div class="content-top">
+          <h3>验证手机</h3>
+          <div class="step">
+            <img src="/images/all/step01.png" alt=""/>
+            <div class="step-item"><span class="active">账号验证</span><span>新手机号码</span><span>设置完成</span></div>
+            <a @click="chooseWay('select')" class="return"><img src="/images/all/return.png" alt=""/></a>
+          </div>
+        </div>
+        <div>
+          <el-form :model="validQuestion" :rules="rulesQuestion" ref="valid" label-width="100px" class="demo-ruleForm">
+            <el-form-item class="questions">
+              <span class="question">问题:{{info[0].question}}</span>
+            </el-form-item>
+            <el-form-item prop="answer1">
+              <el-input type="text" v-model="validQuestion.answer1"
+                        auto-complete="off"
+                        placeholder="答案一"></el-input>
+            </el-form-item>
+            <el-form-item class="questions">
+              <span class="question">问题:{{info[1].question}}</span>
+            </el-form-item>
+            <el-form-item prop="answer2">
+              <el-input type="text" v-model="validQuestion.answer2"
+                        auto-complete="off"
+                        placeholder="答案二"></el-input>
+            </el-form-item>
+            <el-form-item>
+              <a class="btn finish"
+                 :disabled="!answer1SecondChecked || !answer2SecondChecked"
+                 @click="validQuestionSubmit('new')">提交</a>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <loading v-show="isShowLoading"/>
+    </div>
+  </div>
+</template>
+
+<script>
+  import Loading from '~components/common/loading/Loading.vue'
+  export default {
+    name: 'validation',
+    components: {
+      Loading
+    },
+    props: ['info'],
+    data () {
+      // 第二步验证密保
+      var validateSecondAnswer1 = (rule, value, callback) => {
+        if (value === '') {
+          callback(new Error('请填写正确的答案'))
+          this.answer1SecondChecked = false
+        } else {
+          if (this.validQuestion.answer1 !== '') {
+            this.answer1SecondChecked = true
+          }
+          callback()
+        }
+      }
+      var validateSecondAnswer2 = (rule, value, callback) => {
+        if (value === '') {
+          callback(new Error('请填写正确的答案'))
+          this.answer2SecondChecked = false
+        } else {
+          if (this.validQuestion.answer2 !== '') {
+            this.answer2SecondChecked = true
+          }
+          callback()
+        }
+      }
+      return {
+        isShowLoading: false,
+        answer1SecondChecked: false,
+        answer2SecondChecked: false,
+        validQuestion: {
+          answer1: '',
+          answer2: ''
+        },
+        rulesQuestion: {
+          answer1: [
+            {validator: validateSecondAnswer1, trigger: 'blur'}
+          ],
+          answer2: [
+            {validator: validateSecondAnswer2, trigger: 'blur'}
+          ]
+        }
+      }
+    },
+    methods: {
+      // 选择方式
+      chooseWay (type) {
+        this.$emit('stepEvent', type)
+      },
+      // 第一步验证密保提交
+      validQuestionSubmit (type) {
+        if (this.answer1SecondChecked && this.answer2SecondChecked) {
+          this.isShowLoading = true
+          let param = new FormData()
+          let answer = []
+          answer.push({'answer': this.validQuestion.answer1, 'sort': this.info[0].sort}, {'answer': this.validQuestion.answer2, 'sort': this.info[1].sort})
+          let answers = JSON.stringify(answer)
+          param.append('answers', answers)
+          let config = {
+            headers: {'Content-Type': 'multipart/form-data'}
+          }
+          this.$http.post(`/update/user/check/question`, param, config)
+            .then(response => {
+              this.isShowLoading = false
+              if (response.data.success) {
+                this.$emit('stepEvent', type)
+                this.$emit('tokenEvent', response.data.content.token)
+              } else {
+                return Promise.reject(response.data)
+              }
+            }).catch(err => {
+              this.isShowLoading = false
+              this.$message.error(err.errMsg)
+            })
+        }
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .validation {
+    margin: 0 auto;
+    width: 100%;
+    background: #eee;
+    .container{
+      padding-top: 50px;
+      margin: 0 auto;
+      width: 980px;
+      text-align: center;
+      .content{
+        padding: 0 50px;
+        margin: 50px auto 0;
+        width: 100%;
+        /*height: 540px;*/
+        text-align: center;
+        background: #fff;
+          .content-top{
+            height: 80px;
+            line-height: 80px;
+            h3{
+              margin-bottom: 0;
+              font-size: 24px;
+              color: #000;
+              border-bottom: 1px solid #dcdcdc;
+            }
+            .step{
+              position: relative;
+              margin-top: 10px;
+              img{
+                width: 315px;
+                height: 46px;
+              }
+              .step-item{
+                position: absolute;
+                top: 45px;
+                left: 265px;
+                span{
+                  margin-right: 78px;
+                  font-size: 14px;
+                  color: #b4b4b4;
+                }
+                span.active {
+                  color: #0076ad;
+                }
+              }
+            }
+          }
+          form {
+            margin-top: 150px;
+            padding-bottom: 44px;
+              input{
+                padding: 0 0 0 18px;
+                width: 360px;
+                height: 44px;
+                line-height: 44px;
+                font-size: 14px;
+                color: #000;
+                border-radius: 0;
+              }
+              input.answer {
+                background: url("/images/all/more.png") no-repeat 325px center;
+                cursor: pointer;
+              }
+              ul{
+                display: none;
+                position: absolute;
+                top: 44px;
+                left: 0;
+                width: 360px;
+                background: #fff;
+                box-shadow: 0 0 5px rgba(0,0,0,.5);
+                -moz-box-shadow: 0 0 5px rgba(0,0,0,.5);
+                -o-box-shadow: 0 0 5px rgba(0,0,0,.5);
+                -webkit-box-shadow: 0 0 5px rgba(0,0,0,.5);
+                z-index: 10;
+                li{
+                  padding-left: 18px;
+                  width: 100%;
+                  height: 30px;
+                  line-height: 30px;
+                  text-align: left;
+                  font-size: 14px;
+                  color: #000;
+                  cursor: pointer;
+                  &:hover{
+                    background: #0076ad;
+                    color: #fff;
+                   }
+                }
+              }
+              span.tip{
+                position: absolute;
+                top: 0;
+                right: -238px;
+                font-size: 13px;
+                color: #8c8c8c;
+                a{
+                  font-size: 13px;
+                  color: #0076ad;
+                }
+              }
+              span.tip.codeError-tip{
+                position: absolute;
+                top: 3px;
+                left: 378px;
+                width: 200px;
+                text-align: left;
+                color: #ff4949;
+                font-size: 12px;
+              }
+              i{
+                position: absolute;
+                top: 13px;
+                left: 20px;
+                font-size: 20px;
+                color: #a0a0a0;
+              }
+            .btn {
+              margin: 34px 0 16px 0;
+              width: 360px;
+              height: 44px;
+              line-height: 44px;
+              font-size: 16px;
+              color: #fff;
+              background: #0076AD;
+              border-radius: 3px;
+            }
+          }
+          .content-bottom{
+            margin: 155px auto 0;
+            padding-bottom: 50px;
+            width: 360px;
+            div.warp{
+              padding-bottom: 65px;
+            }
+            p{
+              font-size: 24px;
+              color: #323232;
+              img{
+                margin-right: 20px;
+                width: 30px;
+                height: 28px;
+              }
+            }
+            p.pass{
+              font-size: 24px;
+              color: #e77405;
+              img{
+                height: 30px;
+              }
+            }
+            p.passed {
+              color: #2ab300;
+              img{
+                height: 30px;
+              }
+            }
+            span{
+              display: inline-block;
+              font-size: 14px;
+              color: #8b8b8b;
+            }
+            span.close-tip{
+              margin: 15px 0 140px 0;
+            }
+            .close-btn{
+              margin: 0 auto;
+              width: 200px;
+              height: 36px;
+              line-height: 36px;
+              font-size: 14px;
+              text-align: center;
+              color: #323232;
+              border: 1px solid #d2d2d2;
+              border-radius: 3px;
+              cursor: pointer ;
+            }
+            span.use{
+              display: inline-block;
+              margin-bottom: 30px;
+              width: 360px;
+              font-size: 14px;
+              color: #000;
+              text-align: left;
+              em{
+                font-size: 14px;
+                font-style: normal;
+                color: #000;
+              }
+            }
+            .form-group {
+              margin: 0 auto 16px;
+              position: relative;
+              width: 360px;
+              height: 44px;
+              line-height: 44px;
+              input{
+                padding: 0 0 0 18px;
+                width: 360px;
+                height: 44px;
+                line-height: 44px;
+                font-size: 14px;
+                color: #000;
+                border-radius: 0;
+              }
+              input.msg{
+                float: left;
+                width: 210px;
+                padding: 0 0 0 18px;
+                height: 44px;
+                line-height: 44px;
+                font-size: 14px;
+                color: #000;
+                border-radius: 0;
+              }
+              span.msg{
+                float: right;
+                margin: 0;
+                width: 130px;
+                height: 44px;
+                line-height: 44px;
+                text-align: center ;
+                font-size: 14px;
+                color: #5a5a5a;
+                background: #f4f4f4;
+                border: 1px solid #dcdcdc;
+                cursor: pointer;
+              }
+              span.msg.send{
+                background: #d2d2d2;
+                color: #fff;
+              }
+            }
+            .btn {
+              margin: 34px 0 10px 0;
+              width: 360px;
+              height: 44px;
+              line-height: 44px;
+              font-size: 16px;
+              color: #fff;
+              background: #0076AD;
+              border-radius: 3px;
+            }
+          }
+          .choose{
+            margin: 155px auto 0;
+            padding-bottom: 44px;
+            div{
+              padding: 0 15px;
+              margin: 0 auto 16px;
+              width: 360px;
+              height: 60px;
+              line-height: 60px;
+              text-align: left;
+              overflow: hidden;
+              border: 1px solid #d2d2d2;
+              cursor: pointer;
+              &:hover,&.active{
+                border-color: #0076ad;
+                span{
+                  color: #0076ad;
+                }
+                i.second {
+                  color: #0076ad;
+                }
+               }
+                img.first{
+                  float: left;
+                  margin: 24px 20px 0 0;
+                  font-size: 20px;
+                  color: #323232;
+                }
+                img.first.mob{
+                  margin: 22px 20px 0 5px;
+                  font-size: 28px;
+                }
+                i.second {
+                  float: right;
+                  margin: 20px 0 0 5px;
+                  font-size: 20px;
+                  color: #323232;
+                }
+                span{
+                  float: left;
+                  font-size: 14px;
+                  color: #323232;
+                }
+            }
+          }
+        a.return{
+          position: absolute;
+          left: 0;
+          top: -15px;
+          img{
+            width: 34px !important;
+            height: 34px !important;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 408 - 0
components/validation/PhoneStepSelect.vue

@@ -0,0 +1,408 @@
+<template>
+  <div class="validation">
+    <div class="container">
+      <div class="content">
+        <div class="content-top">
+          <h3>验证手机</h3>
+          <div class="step">
+            <img src="/images/all/step01.png" alt=""/>
+            <div class="step-item"><span class="active">账号验证</span><span>新手机号码</span><span>设置完成</span></div>
+          </div>
+        </div>
+        <div class="choose">
+          <div v-show="hasValidPhoneWay"
+               @click="chooseWay('mobile')">
+            <img src="/images/all/icon01.png" alt="" class="first mob"/>
+            <span>通过验证手机</span><i class="fa fa-angle-right second"></i>
+          </div>
+          <div v-show="hasValidEmailWay"
+               @click="chooseWay('email')">
+            <img src="/images/all/icon02.png" alt="" class="first"/>
+            <span>通过验证邮箱</span><i class="fa fa-angle-right second"></i>
+          </div>
+          <div v-show="hasValidQuestionsWay"
+               @click="chooseWay('questions')">
+            <img src="/images/all/icon03.png" alt="" class="first"/>
+            <span>通过验证密保</span><i class="fa fa-angle-right second"></i>
+          </div>
+          <div @click="goAccountAppeal">
+            <img src="/images/all/icon04.png" alt="" class="first"/>
+            <span>通过人工申诉</span><i class="fa fa-angle-right second"></i>
+          </div>
+        </div>
+      </div>
+      <loading v-show="isShowLoading"/>
+    </div>
+  </div>
+</template>
+
+<script>
+  import Loading from '~components/common/loading/Loading.vue'
+  export default {
+    name: 'validation',
+    components: {
+      Loading
+    },
+    data () {
+      return {
+        isShowLoading: false,
+        hasValidPhoneWay: false,
+        hasValidQuestionsWay: false,
+        hasValidEmailWay: false,
+        mobile: '',
+        email: '',
+        questions: ''
+      }
+    },
+    mounted () {
+      // 获取验证方式
+      this.$nextTick(() => {
+        this.getVerifyWay()
+      })
+    },
+    methods: {
+      // 选择修改方式
+      chooseWay (type) {
+        this.$emit('stepEvent', type)
+        if (type === 'mobile') {
+          this.$emit('setDataEvent', this.mobile)
+        } else if (type === 'email') {
+          this.$emit('setDataEvent', this.email)
+        } else if (type === 'questions') {
+          this.$emit('setDataEvent', this.questions)
+        }
+      },
+      // 获取验证方式
+      getVerifyWay () {
+        this.$http.get('/update/user/checkType')
+          .then(response => {
+            if (response.data.success) {
+              if (response.data.content.mobile) {
+                this.mobile = response.data.content.mobile
+                this.hasValidPhoneWay = true
+              }
+              if (response.data.content.questions) {
+                this.questions = response.data.content.questions
+                this.hasValidQuestionsWay = true
+              }
+              if (response.data.content.email) {
+                this.email = response.data.content.email
+                this.hasValidEmailWay = true
+              }
+            } else {
+              return Promise.reject(response.data)
+            }
+          }).catch(err => {
+            this.$message.error(err.errMsg)
+          })
+      },
+      // 跳转到人工申诉页面
+      goAccountAppeal () {
+        window.location.href = '/appeals/accountAppeal'
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .validation {
+    margin: 0 auto;
+    width: 100%;
+    background: #eee;
+    .container{
+      padding-top: 50px;
+      margin: 0 auto;
+      width: 980px;
+      text-align: center;
+      .content{
+        padding: 0 50px;
+        margin: 50px auto 0;
+        width: 100%;
+        /*height: 540px;*/
+        text-align: center;
+        background: #fff;
+          .content-top{
+            height: 80px;
+            line-height: 80px;
+            h3{
+              margin-bottom: 0;
+              font-size: 24px;
+              color: #000;
+              border-bottom: 1px solid #dcdcdc;
+            }
+            .step{
+              position: relative;
+              margin-top: 10px;
+              img{
+                width: 315px;
+                height: 46px;
+              }
+              .step-item{
+                position: absolute;
+                top: 45px;
+                left: 265px;
+                span{
+                  margin-right: 78px;
+                  font-size: 14px;
+                  color: #b4b4b4;
+                }
+                span.active {
+                  color: #0076ad;
+                }
+              }
+            }
+          }
+          form {
+            margin-top: 150px;
+            padding-bottom: 44px;
+              input{
+                padding: 0 0 0 18px;
+                width: 360px;
+                height: 44px;
+                line-height: 44px;
+                font-size: 14px;
+                color: #000;
+                border-radius: 0;
+              }
+              input.answer {
+                background: url("/images/all/more.png") no-repeat 325px center;
+                cursor: pointer;
+              }
+              ul{
+                display: none;
+                position: absolute;
+                top: 44px;
+                left: 0;
+                width: 360px;
+                background: #fff;
+                box-shadow: 0 0 5px rgba(0,0,0,.5);
+                -moz-box-shadow: 0 0 5px rgba(0,0,0,.5);
+                -o-box-shadow: 0 0 5px rgba(0,0,0,.5);
+                -webkit-box-shadow: 0 0 5px rgba(0,0,0,.5);
+                z-index: 10;
+                li{
+                  padding-left: 18px;
+                  width: 100%;
+                  height: 30px;
+                  line-height: 30px;
+                  text-align: left;
+                  font-size: 14px;
+                  color: #000;
+                  cursor: pointer;
+                  &:hover{
+                    background: #0076ad;
+                    color: #fff;
+                   }
+                }
+              }
+              span.tip{
+                position: absolute;
+                top: 0;
+                right: -238px;
+                font-size: 13px;
+                color: #8c8c8c;
+                a{
+                  font-size: 13px;
+                  color: #0076ad;
+                }
+              }
+              span.tip.codeError-tip{
+                position: absolute;
+                top: 3px;
+                left: 378px;
+                width: 200px;
+                text-align: left;
+                color: #ff4949;
+                font-size: 12px;
+              }
+              i{
+                position: absolute;
+                top: 13px;
+                left: 20px;
+                font-size: 20px;
+                color: #a0a0a0;
+              }
+            .btn {
+              margin: 34px 0 16px 0;
+              width: 360px;
+              height: 44px;
+              line-height: 44px;
+              font-size: 16px;
+              color: #fff;
+              background: #0076AD;
+              border-radius: 3px;
+            }
+          }
+          .content-bottom{
+            margin: 155px auto 0;
+            padding-bottom: 50px;
+            width: 360px;
+            div.warp{
+              padding-bottom: 65px;
+            }
+            p{
+              font-size: 24px;
+              color: #323232;
+              img{
+                margin-right: 20px;
+                width: 30px;
+                height: 28px;
+              }
+            }
+            p.pass{
+              font-size: 24px;
+              color: #e77405;
+              img{
+                height: 30px;
+              }
+            }
+            p.passed {
+              color: #2ab300;
+              img{
+                height: 30px;
+              }
+            }
+            span{
+              display: inline-block;
+              font-size: 14px;
+              color: #8b8b8b;
+            }
+            span.close-tip{
+              margin: 15px 0 140px 0;
+            }
+            .close-btn{
+              margin: 0 auto;
+              width: 200px;
+              height: 36px;
+              line-height: 36px;
+              font-size: 14px;
+              text-align: center;
+              color: #323232;
+              border: 1px solid #d2d2d2;
+              border-radius: 3px;
+              cursor: pointer ;
+            }
+            span.use{
+              display: inline-block;
+              margin-bottom: 30px;
+              width: 360px;
+              font-size: 14px;
+              color: #000;
+              text-align: left;
+              em{
+                font-size: 14px;
+                font-style: normal;
+                color: #000;
+              }
+            }
+            .form-group {
+              margin: 0 auto 16px;
+              position: relative;
+              width: 360px;
+              height: 44px;
+              line-height: 44px;
+              input{
+                padding: 0 0 0 18px;
+                width: 360px;
+                height: 44px;
+                line-height: 44px;
+                font-size: 14px;
+                color: #000;
+                border-radius: 0;
+              }
+              input.msg{
+                float: left;
+                width: 210px;
+                padding: 0 0 0 18px;
+                height: 44px;
+                line-height: 44px;
+                font-size: 14px;
+                color: #000;
+                border-radius: 0;
+              }
+              span.msg{
+                float: right;
+                margin: 0;
+                width: 130px;
+                height: 44px;
+                line-height: 44px;
+                text-align: center ;
+                font-size: 14px;
+                color: #5a5a5a;
+                background: #f4f4f4;
+                border: 1px solid #dcdcdc;
+                cursor: pointer;
+              }
+              span.msg.send{
+                background: #d2d2d2;
+                color: #fff;
+              }
+            }
+            .btn {
+              margin: 34px 0 10px 0;
+              width: 360px;
+              height: 44px;
+              line-height: 44px;
+              font-size: 16px;
+              color: #fff;
+              background: #0076AD;
+              border-radius: 3px;
+            }
+          }
+          .choose{
+            margin: 155px auto 0;
+            padding-bottom: 44px;
+            div{
+              padding: 0 15px;
+              margin: 0 auto 16px;
+              width: 360px;
+              height: 60px;
+              line-height: 60px;
+              text-align: left;
+              overflow: hidden;
+              border: 1px solid #d2d2d2;
+              cursor: pointer;
+              &:hover,&.active{
+                border-color: #0076ad;
+                span{
+                  color: #0076ad;
+                }
+                i.second {
+                  color: #0076ad;
+                }
+               }
+                img.first{
+                  float: left;
+                  margin: 24px 20px 0 0;
+                  font-size: 20px;
+                  color: #323232;
+                }
+                img.first.mob{
+                  margin: 22px 20px 0 5px;
+                  font-size: 28px;
+                }
+                i.second {
+                  float: right;
+                  margin: 20px 0 0 5px;
+                  font-size: 20px;
+                  color: #323232;
+                }
+                span{
+                  float: left;
+                  font-size: 14px;
+                  color: #323232;
+                }
+            }
+          }
+        a.return{
+          position: absolute;
+          left: 0;
+          top: -15px;
+          img{
+            width: 34px !important;
+            height: 34px !important;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 5 - 1
components/validation/PhoneValidationThirdStep.vue → components/validation/PhoneStepSuccess.vue

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

+ 7 - 3
components/validation/index.js

@@ -1,5 +1,9 @@
-import PhoneValidation from './PhoneValidation.vue'
-import PhoneValidationSecondStep from './PhoneValidationSecondStep.vue'
+import PhoneStepSelect from './PhoneStepSelect.vue'
+import PhoneStepMobile from './PhoneStepMobile.vue'
+import PhoneStepEmail from './PhoneStepEmail.vue'
+import PhoneStepSecurity from './PhoneStepSecurity.vue'
+import PhoneStepNew from './PhoneStepNew.vue'
+import PhoneStepSuccess from './PhoneStepSuccess.vue'
 import EmailStepSelect from './EmailStepSelect.vue'
 import EmailStepMobile from './EmailStepMobile.vue'
 import EmailStepEmail from './EmailStepEmail.vue'
@@ -8,4 +12,4 @@ import EmailStepNew from './EmailStepNew.vue'
 import EmailStepSuccess from './EmailStepSuccess.vue'
 import ValidationFail from './ValidationFail.vue'
 
-export { PhoneValidation, PhoneValidationSecondStep, EmailStepSelect, EmailStepMobile, EmailStepEmail, EmailStepSecurity, EmailStepNew, EmailStepSuccess, ValidationFail }
+export { PhoneStepSelect, PhoneStepMobile, PhoneStepEmail, PhoneStepSecurity, PhoneStepNew, PhoneStepSuccess, EmailStepSelect, EmailStepMobile, EmailStepEmail, EmailStepSecurity, EmailStepNew, EmailStepSuccess, ValidationFail }

+ 16 - 3
pages/validation/phoneValidation.vue

@@ -11,13 +11,18 @@
     </template>
     <template v-else>
       <accountCenter-header/>
-      <phone-validation/>
+      <phone-stepSelect v-if="step === 'select'" @stepEvent="setStep" @setDataEvent="setInfo"/>
+      <phone-stepMobile v-if="step === 'mobile'" @stepEvent="setStep" @tokenEvent="loadToken" :info="info"/>
+      <phone-stepEmail v-if="step === 'email'" @stepEvent="setStep" :info="info"/>
+      <phone-stepSecurity v-if="step === 'questions'" @stepEvent="setStep" @tokenEvent="loadToken" :info="info"/>
+      <phone-stepNew v-if="step === 'new'" @stepEvent="setStep" @lastEvent="setStepLast" :tokenId="tokenId"/>
+      <phone-stepSuccess v-if="step === 'last'" @stepEvent="setStep"/>
     </template>
   </div>
 </template>
 <script>
   import AccountCenterHeader from '~components/default/AccountCenterHeader.vue'
-  import PhoneValidation from '~components/validation/PhoneValidation.vue'
+  import { PhoneStepSelect, PhoneStepMobile, PhoneStepEmail, PhoneStepSecurity, PhoneStepNew, PhoneStepSuccess } from '~components/validation'
   import {ValidationPhoneStepSelect, ValidationPhoneStepMobile, ValidationPhoneStepEmail, ValidationPhoneStepSecurity, ValidationPhoneStepNew, ValidationPhoneStepSuccess, StepAppeal} from '~components/mobile/validation'
   export default {
     layout (context) {
@@ -38,7 +43,12 @@
     },
     components: {
       AccountCenterHeader,
-      PhoneValidation,
+      PhoneStepSelect,
+      PhoneStepMobile,
+      PhoneStepEmail,
+      PhoneStepSecurity,
+      PhoneStepNew,
+      PhoneStepSuccess,
       ValidationPhoneStepSelect,
       ValidationPhoneStepMobile,
       ValidationPhoneStepEmail,
@@ -54,6 +64,9 @@
     },
     mounted () {
       this.$route.query.token ? this.step = 'new' : this.step = 'select'
+      if (this.$route.query.token) {
+        this.$router.push('/validation/phoneValidation?token=' + this.$route.query.token)
+      }
     },
     methods: {
       setStep (type) {

+ 0 - 22
pages/validation/phoneValidationSecondStep.vue

@@ -1,22 +0,0 @@
-<template>
-  <div>
-    <accountCenter-header/>
-    <phoneValidation-secondStep/>
-  </div>
-</template>
-<script>
-  import AccountCenterHeader from '~components/default/AccountCenterHeader.vue'
-  import PhoneValidationSecondStep from '~components/validation/PhoneValidationSecondStep.vue'
-  export default {
-    layout: 'default',
-    components: {
-      AccountCenterHeader,
-      PhoneValidationSecondStep
-    },
-    mounted () {
-      if (this.$store.state.option.isMobile) {
-        this.$router.push('/validation/phoneValidation?token=' + this.$route.query.token)
-      }
-    }
-  }
-</script>

+ 0 - 17
pages/validation/phoneValidationThirdStep.vue

@@ -1,17 +0,0 @@
-<template>
-  <div>
-    <accountCenter-header/>
-    <phoneValidation-thirdStep/>
-  </div>
-</template>
-<script>
-  import AccountCenterHeader from '~components/default/AccountCenterHeader.vue'
-  import PhoneValidationThirdStep from '~components/validation/PhoneValidationThirdStep.vue'
-  export default {
-    layout: 'default',
-    components: {
-      AccountCenterHeader,
-      PhoneValidationThirdStep
-    }
-  }
-</script>