diff --git a/src/views/account/ForgetPwd.vue b/src/views/account/ForgetPwd.vue index d04e61c..583caf4 100644 --- a/src/views/account/ForgetPwd.vue +++ b/src/views/account/ForgetPwd.vue @@ -32,6 +32,7 @@ @@ -73,6 +74,12 @@ +
+

+ 我们已向你的邮箱中发送了重置密码的邮件,请查看并点击邮件中的链接。 + 没有收到邮件?请检查您的垃圾邮件或者重新发送 +

+
{ if (!err) { this.emailValidateCodeBtn = true - this.$api.get(`/retrieve/password/phone/code?phoneNumber=${this.retrieveAccountForm.phoneNumber}&slideCode=${slideCode}`).then(() => { + this.$api.request({ + url: '/retrieve/password/phone/code', + method: 'get', + params: {slideCode: slideCode, phoneNumber: phoneNumber} + }).then(() => { this.msgSuccess('验证码发送成功,5分钟内有效') this.emailValidateCodeBtn = true let count = 60 @@ -200,7 +224,9 @@ export default { this.$api.post('/retrieve/password/reset', this.resetPwdForm).then(res => { if (res.data) { this.msgSuccess('密码重置成功,快去登录吧') - this.$router.push({path: '/login'}) + setTimeout(() => { + this.$router.push({path: '/login'}) + }, 2000) } }) } @@ -213,10 +239,17 @@ export default { } }) }, - sendEmailValidate() { - this.$refs['emailForm'].validateField('email', err => { - if (!err) { - this.$refs.verify.show() + sendEmailValidate(params) { + let slideCode = params.captchaVerification + this.$refs['emailForm'].validate(valid => { + if (valid) { + this.$api.request({ + url: '/retrieve/password/email', + method: 'get', + params: {slideCode: slideCode, email: this.retrieveAccountForm.email} + }).then(() => { + this.retrieveStep = 3 + }) } }) }, @@ -268,4 +301,11 @@ export default { width: 80%; } } +.msg-view { + @include position-center(xy); + + text-align: center; + color: #929292; + width: 30%; +} diff --git a/src/views/official/index.vue b/src/views/official/index.vue index 4f3eb67..ee32c36 100644 --- a/src/views/official/index.vue +++ b/src/views/official/index.vue @@ -1,5 +1,5 @@