Browse Source

邮箱跳转增加url

hangb 7 years ago
parent
commit
2e36ce53b7

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

@@ -66,7 +66,7 @@
                 this.$indicator.close()
                 if (response.data.success) {
                   this.$emit('stepEvent', type)
-                  this.$store.commit('login/GET_TOKEN', response.data.content.token)
+                  this.$emit('tokenEvent', response.data.content.token)
                 } else {
                   this.downToast(response.data.errMsg)
                 }

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

@@ -52,7 +52,7 @@
       // 发送邮件
       sureAccount () {
         this.$indicator.open('发送过程中...')
-        this.$http.get(`/sso/resetPwd/check/email`)
+        this.$http.get(`/sso/resetPwd/check/email`, {params: {url: window.location.href}})
           .then(response => {
             this.$indicator.close()
             if (response.data.success) {

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

@@ -38,8 +38,8 @@
     },
     methods: {
       sureAccount () {
-        if (this.$route.query.source === 'UU') {
-          window.location.href = 'http://sureCloseWeb.com'
+        if (this.$route.query.returnURL) {
+          window.location.href = this.$route.query.returnURL
         } else {
           this.$router.push('/')
         }

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

@@ -52,7 +52,7 @@
       // 发送邮件
       sureAccount () {
         this.$indicator.open('发送过程中...')
-        this.$http.get(`/update/user/check/email`, {params: {email: this.info, operate: 'email'}})
+        this.$http.get(`/update/user/check/email`, {params: {email: this.info, operate: 'email', url: window.location.href}})
           .then(response => {
             this.$indicator.close()
             if (response.data.success) {

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

@@ -78,7 +78,7 @@
           this.downToast('请确认填写是否有误')
         } else {
           this.$indicator.open('发送过程中...')
-          this.$http.get(`/update/user/setEmail`, {params: {email: this.valid.email, token: this.tokenId ? this.tokenId : this.$route.query.token}})
+          this.$http.get(`/update/user/setEmail`, {params: {email: this.valid.email, token: this.tokenId ? this.tokenId : this.$route.query.token, url: window.location.href}})
             .then(response => {
               this.$indicator.close()
               if (response.data.success) {

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

@@ -52,7 +52,7 @@
       // 发送邮件
       sureAccount () {
         this.$indicator.open('发送过程中...')
-        this.$http.get(`/update/user/check/email`, {params: {email: this.info, operate: 'mobile'}})
+        this.$http.get(`/update/user/check/email`, {params: {email: this.info, operate: 'mobile', url: window.location.href}})
           .then(response => {
             this.$indicator.close()
             if (response.data.success) {

+ 1 - 1
components/reset/PasswordStepEmail.vue

@@ -59,7 +59,7 @@
       // 第一步验证邮箱
       firstStepValidEmail () {
         this.isShowLoading = true
-        this.$http.get(`/sso/resetPwd/check/email`)
+        this.$http.get(`/sso/resetPwd/check/email`, {params: {url: window.location.href}})
           .then(response => {
             this.isShowLoading = false
             if (response.data.success) {

+ 1 - 1
components/reset/PasswordStepSecurity.vue

@@ -105,7 +105,7 @@
     methods: {
 //      获取密保问题
       getQuestion () {
-        this.$http.get('/sso/resetPwd/check/question', {params: {token: this.tokenId}})
+        this.$http.get('/sso/resetPwd/check/question', {params: {token: this.$route.query.token ? this.$route.query.token : this.tokenId}})
           .then(response => {
             if (response.data.success) {
               if (response.data.content.questions.length === 0) {

+ 5 - 1
components/reset/PasswordStepSuccess.vue

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

+ 1 - 1
components/validation/EmailStepEmail.vue

@@ -58,7 +58,7 @@
       // 第一步验证邮箱
       firstStepValidEmail () {
         this.isShowLoading = true
-        this.$http.get(`/update/user/check/email`, {params: {email: this.info, operate: 'email'}})
+        this.$http.get(`/update/user/check/email`, {params: {email: this.info, operate: 'email', url: window.location.href}})
           .then(response => {
             this.isShowLoading = false
             if (response.data.success) {

+ 1 - 1
components/validation/EmailStepNew.vue

@@ -94,7 +94,7 @@
       sendVerificationRequest () {
         if (this.emailSecondChecked) {
           this.isShowLoading = true
-          this.$http.get(`/update/user/setEmail`, {params: {email: this.valid2.email, token: this.tokenId ? this.tokenId : this.$route.query.token}})
+          this.$http.get(`/update/user/setEmail`, {params: {email: this.valid2.email, token: this.tokenId ? this.tokenId : this.$route.query.token, url: window.location.href}})
             .then(response => {
               this.isShowLoading = false
               if (response.data.success) {

+ 1 - 1
components/validation/PhoneStepEmail.vue

@@ -59,7 +59,7 @@
       // 第一步验证邮箱
       firstStepValidEmail () {
         this.isShowLoading = true
-        this.$http.get(`/update/user/check/email`, {params: {email: this.info, operate: 'mobile'}})
+        this.$http.get(`/update/user/check/email`, {params: {email: this.info, operate: 'mobile', url: window.location.href}})
           .then(response => {
             this.isShowLoading = false
             if (response.data.success) {

+ 1 - 1
nuxt.config.js

@@ -1,6 +1,6 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
-const baseUrl = process.env.BASE_URL || (isProdMode ? 'https://sso.ubtob.com/' : 'http://192.168.253.6:36066/')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'https://sso.ubtob.com/' : 'http://10.1.51.50:8081/')
 
 module.exports = {
   router: {

+ 2 - 2
pages/cloudcenter/index.vue

@@ -58,8 +58,8 @@
                     <span>登录密码</span>
                   </div>
                   <div class="bind-tip">安全性高的密码可以使账号更安全,建议您定期更换密码,并且设置一个包含数字和字母,长度超过8位以上的密码。</div>
-                  <a href="/reset/changePasswordChooseStyle" class="bind-btn" v-show="user.user.passwordLevel === 2 || user.user.passwordLevel === 3">修改</a>
-                  <a href="/reset/changePasswordChooseStyle" class="go-btn" v-show="user.user.passwordLevel === 1">设置</a>
+                  <a href="/reset/forgetPasswordValidationAccount" class="bind-btn" v-show="user.user.passwordLevel === 2 || user.user.passwordLevel === 3">修改</a>
+                  <a href="/reset/forgetPasswordValidationAccount" class="go-btn" v-show="user.user.passwordLevel === 1">设置</a>
                 </div>
               </div>
               <div class="item items">

+ 2 - 3
pages/reset/forgetPasswordValidationAccount.vue

@@ -3,7 +3,7 @@
     <template v-if="isMobile">
       <step-first v-if="step === 'first'" @stepEvent="setStep"/>
       <step-select v-if="step === 'select'" @stepEvent="setStep" @setDataEvent="setInfo"/>
-      <step-before v-if="step === 'before'" @stepEvent="setStep"/>
+      <step-before v-if="step === 'before'" @stepEvent="setStep" @tokenEvent="loadToken"/>
       <step-email v-if="step === 'email'" @stepEvent="setStep" :info="info"/>
       <step-mobile v-if="step === 'mobile'" @stepEvent="setStep" @tokenEvent="loadToken" :info="info"/>
       <!--<step-appeal v-if="step === 'appeal'" @stepEvent="setStep" @lastEvent="setStepLast"/>-->
@@ -65,10 +65,9 @@
       StepAppeal
     },
     mounted () {
-      console.log('logged', this.logged)
       if (this.$route.query.token) {
         this.step = 'security'
-        this.$router.push('/reset/forgetPasswordValidationAccount?token=' + this.$route.query.token)
+        // this.$router.push('/reset/forgetPasswordValidationAccount?token=' + this.$route.query.token)
       } else if (this.logged.isLogin) {
         this.step = 'select'
       } else {

+ 2 - 2
pages/validation/emailValidation.vue

@@ -66,10 +66,10 @@
         }
       } else {
         if (this.$route.query.step === '2') {
-          this.$router.push('/validation/emailValidation?token=' + this.$route.query.token + '&step=2')
+          // this.$router.push(window.loaction.href)
           this.step = 'new'
         } else if (this.$route.query.step === '3') {
-          this.$router.push('/validation/emailValidation?token=' + this.$route.query.token + '&step=3')
+          // this.$router.push(window.loaction.href)
           this.step = 'last'
           this.stepLast = 'last'
         }

+ 0 - 3
pages/validation/phoneValidation.vue

@@ -64,9 +64,6 @@
     },
     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) {