From 4650d2a0f91d15a2d17b002bed1d946713591c5e Mon Sep 17 00:00:00 2001 From: caoqianming Date: Sat, 10 Oct 2020 14:42:23 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E5=8F=91=E9=80=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/views/ability/cma.vue | 4 ++-- client/src/views/ability/cma2.vue | 4 ++-- client/src/views/login/index.vue | 20 +++++++++++++++++++- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/client/src/views/ability/cma.vue b/client/src/views/ability/cma.vue index 87945d6..3cc81d8 100644 --- a/client/src/views/ability/cma.vue +++ b/client/src/views/ability/cma.vue @@ -101,7 +101,7 @@ @@ -126,7 +126,7 @@ @@ -114,7 +114,7 @@ diff --git a/client/src/views/login/index.vue b/client/src/views/login/index.vue index 758daec..957394a 100644 --- a/client/src/views/login/index.vue +++ b/client/src/views/login/index.vue @@ -176,6 +176,9 @@ export default { redirect: undefined, }; }, + created() { + this.getUP() + }, watch: { $route: { handler: function (route) { @@ -200,7 +203,13 @@ export default { this.getTimer() sendMsg({'mail':this.loginForm2.mail}).then(res=>{ this.$message.success('验证码已发送至该邮箱,请注意查收') - }).catch(e=>{}) + + }).catch(e=>{ + this.disabled = false; + clearInterval(this.timer); + this.timer = null; + this.buttonmsg = '发送验证码' + }) }else{ this.$message.warning('请输入邮箱号') } @@ -232,6 +241,8 @@ export default { .then(() => { this.$router.push({ path: this.redirect || "/" }); this.loading = false; + localStorage.setItem("rem_username", this.loginForm.username); + localStorage.setItem("rem_password", this.loginForm.password); }) .catch(() => { this.loading = false; @@ -251,6 +262,7 @@ export default { .then(() => { this.$router.push({ path: this.redirect || "/" }); this.loading2 = false; + localStorage.setItem("rem_mail", this.loginForm2.mail); }) .catch(() => { this.loading2 = false; @@ -261,6 +273,12 @@ export default { } }); }, + //读取cookie + getUP() { + this.loginForm2.mail = localStorage.getItem("rem_mail") + this.loginForm.username = localStorage.getItem("rem_username"); + this.loginForm.password = localStorage.getItem("rem_password"); + }, }, };