From b014e82f5b4c3df454fd61d3d9572a45d22f80f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=91=E7=BF=94?= <971366405@qq.com> Date: Wed, 18 Sep 2024 11:31:46 +0800 Subject: [PATCH] =?UTF-8?q?revert:=20:rewind:=20=E5=9B=9E=E9=80=80?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E9=AA=8C=E8=AF=81=E7=A0=81=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 回退关闭验证码功能 --- src/api/auth.ts | 10 ---------- src/views/login/index.vue | 15 ++------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/api/auth.ts b/src/api/auth.ts index 1ac19be0..eb904d87 100644 --- a/src/api/auth.ts +++ b/src/api/auth.ts @@ -35,16 +35,6 @@ class AuthAPI { method: "get", }); } - - /** - * 获取验证码规则 - */ - static getCaptchaRule() { - return request({ - url: `${AUTH_BASE_URL}/captcha/unable`, - method: "get", - }); - } } export default AuthAPI; diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 1c58a41b..7222319e 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -107,7 +107,7 @@ - +
(); -// 是否关闭验证码 -const closeCaptcha = ref(false); const logo = ref(new URL(`../../assets/logo.png`, import.meta.url).href); @@ -343,17 +341,8 @@ const setLoginCredentials = (username: string, password: string) => { loginData.value.password = password; }; -function getCaptchaRule() { - AuthAPI.getCaptchaRule().then((data) => { - closeCaptcha.value = data; - if (!closeCaptcha.value) { - getCaptcha(); - } - }); -} - onMounted(() => { - getCaptchaRule(); + getCaptcha(); });