fix:修复请求问题

This commit is contained in:
橙子
2023-04-02 00:17:07 +08:00
parent ad4fc6ea9b
commit b90962943a
3 changed files with 65 additions and 20 deletions

View File

@@ -116,6 +116,7 @@ function handleLogin() {
router.push({ path: redirect.value || "/" });
}).catch(() => {
loading.value = false;
// 重新获取验证码
if (captchaEnabled.value) {
getCode();
@@ -126,6 +127,7 @@ function handleLogin() {
}
function getCode() {
getCodeImg().then(res => {
captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled;
if (captchaEnabled.value) {