fix: 登录失效后回到登录页并只提示一次

This commit is contained in:
2026-10-25 07:37:08 +08:00
parent 07180b162b
commit 8a23318862
3 changed files with 18 additions and 2 deletions
+2
View File
@@ -6,6 +6,7 @@ import { ApiError } from "../../shared/http";
import { loadCaptcha, loadSaved, login, refreshCaptcha, resumeSaved, sendSms, type UserInfo } from "./api";
import { isDark, toggleTheme } from "../../shared/theme";
defineProps<{ notice?: string }>();
const emit = defineEmits<{ success: [user: UserInfo] }>();
const ready = ref(false);
@@ -186,6 +187,7 @@ onUnmounted(stopCountdown);
</div>
</div>
<n-alert v-if="notice" type="warning" style="margin-bottom: 12px">{{ notice }}</n-alert>
<n-spin :show="!ready && !offline">
<n-alert v-if="!ready" type="warning" style="margin-bottom: 12px">连接失败,正在重试。</n-alert>
<n-alert v-else-if="offline" type="warning" style="margin-bottom: 12px">{{ offline }}</n-alert>