From c9f40d75a7123bfe06b7bd20355a47a49f5cbf75 Mon Sep 17 00:00:00 2001 From: wangqing <250543222@qq.com> Date: Tue, 15 Dec 2020 23:04:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=98=E8=AE=B0=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/account/ForgetPwd.vue | 56 ++++++++++++++++++++++++++++----- src/views/official/index.vue | 20 +++++++++--- 2 files changed, 64 insertions(+), 12 deletions(-) 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 @@