From 0be314cdbf33d8dba06ac20896edc965944ca6c7 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Sun, 27 Sep 2020 15:20:09 +0800 Subject: [PATCH] sompe update --- client/src/views/login/index.vue | 14 +++++++------- client/src/views/system/user.vue | 27 ++++++++++++++++++++++----- server/apps/system/serializers.py | 11 +++++++++-- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/client/src/views/login/index.vue b/client/src/views/login/index.vue index bb4d84a..a6132da 100644 --- a/client/src/views/login/index.vue +++ b/client/src/views/login/index.vue @@ -42,10 +42,10 @@ auto-complete="on" @keyup.enter.native="handleLogin" /> - - + + - + @@ -139,7 +139,7 @@ export default { timer:null, disabled:false, buttonmsg:'发送验证码', - count:20, + count:60, activeName: "msg", loginForm: { username: "", @@ -196,7 +196,7 @@ export default { }); }, sendMsg(){ - if(this.loginForm2.mail.length){ + if(this.loginForm2.mail.length&&this.buttonmsg=='发送验证码'){ this.getTimer() sendMsg({'mail':this.loginForm2.mail}).then(res=>{ this.$message.success('验证码已发送至该邮箱,请注意查收') @@ -206,14 +206,14 @@ export default { } }, getTimer(){ - const TIME_COUNT = 20; + const TIME_COUNT = 60; if (!this.timer) { this.count = TIME_COUNT; this.disabled = true; this.timer = setInterval(() => { if (this.count > 0 && this.count <= TIME_COUNT) { this.count--; - this.buttonmsg = this.count + this.buttonmsg = this.count + '秒' } else { this.disabled = false; clearInterval(this.timer); diff --git a/client/src/views/system/user.vue b/client/src/views/system/user.vue index dbbdc44..4d32479 100644 --- a/client/src/views/system/user.vue +++ b/client/src/views/system/user.vue @@ -1,10 +1,13 @@ + + +