From 0604595fc6853a4097830be46ff69c8d8e683f76 Mon Sep 17 00:00:00 2001 From: FatttSnake Date: Tue, 9 May 2023 23:14:44 +0800 Subject: [PATCH] Modified login logic --- ui/src/pages/Login.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/src/pages/Login.vue b/ui/src/pages/Login.vue index 349d885..e7aa071 100644 --- a/ui/src/pages/Login.vue +++ b/ui/src/pages/Login.vue @@ -103,6 +103,11 @@ export default { this.captchaSrc = getCaptchaSrc() }, login() { + if (this.loggingIn) { + return + } + this.loggingIn = true + const _this = this if (!this.userName) { ElMessage.error({ @@ -140,7 +145,6 @@ export default { dangerouslyUseHTMLString: true, message: '登录成功' }) - this.loggingIn = true setTimeout(function () { _this.$router.push('/') }, 1500) @@ -149,6 +153,8 @@ export default { dangerouslyUseHTMLString: true, message: '用户名密码 错误' }) + this.getNewCaptcha() + this.loggingIn = false } }) }