revert: ⏪ 回退关闭验证码功能
回退关闭验证码功能
This commit is contained in:
@@ -35,16 +35,6 @@ class AuthAPI {
|
|||||||
method: "get",
|
method: "get",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取验证码规则
|
|
||||||
*/
|
|
||||||
static getCaptchaRule() {
|
|
||||||
return request<any, boolean>({
|
|
||||||
url: `${AUTH_BASE_URL}/captcha/unable`,
|
|
||||||
method: "get",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default AuthAPI;
|
export default AuthAPI;
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<!-- 验证码 -->
|
<!-- 验证码 -->
|
||||||
<el-form-item prop="captchaCode" v-if="!closeCaptcha">
|
<el-form-item prop="captchaCode">
|
||||||
<div class="input-wrapper">
|
<div class="input-wrapper">
|
||||||
<svg-icon icon-class="captcha" class="mx-2" />
|
<svg-icon icon-class="captcha" class="mx-2" />
|
||||||
<el-input
|
<el-input
|
||||||
@@ -218,8 +218,6 @@ const isCapslock = ref(false);
|
|||||||
const captchaBase64 = ref();
|
const captchaBase64 = ref();
|
||||||
// 登录表单ref
|
// 登录表单ref
|
||||||
const loginFormRef = ref<FormInstance>();
|
const loginFormRef = ref<FormInstance>();
|
||||||
// 是否关闭验证码
|
|
||||||
const closeCaptcha = ref(false);
|
|
||||||
|
|
||||||
const logo = ref(new URL(`../../assets/logo.png`, import.meta.url).href);
|
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;
|
loginData.value.password = password;
|
||||||
};
|
};
|
||||||
|
|
||||||
function getCaptchaRule() {
|
|
||||||
AuthAPI.getCaptchaRule().then((data) => {
|
|
||||||
closeCaptcha.value = data;
|
|
||||||
if (!closeCaptcha.value) {
|
|
||||||
getCaptcha();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getCaptchaRule();
|
getCaptcha();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user