From ece81bf89e2508584429deb156f1a56f96065eb7 Mon Sep 17 00:00:00 2001 From: Baobhan Sith <80159437+Heavrnl@users.noreply.github.com> Date: Sat, 26 Apr 2025 11:22:03 +0800 Subject: [PATCH] update --- packages/frontend/src/stores/auth.store.ts | 6 +++++- packages/frontend/src/views/LoginView.vue | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/stores/auth.store.ts b/packages/frontend/src/stores/auth.store.ts index 02d0388..13ab6e5 100644 --- a/packages/frontend/src/stores/auth.store.ts +++ b/packages/frontend/src/stores/auth.store.ts @@ -293,8 +293,12 @@ export const useAuthStore = defineStore('auth', { // NEW: 获取公共 CAPTCHA 配置 (修改为从 /settings/captcha 获取) async fetchCaptchaConfig() { + console.log('[AuthStore] fetchCaptchaConfig called. Current publicCaptchaConfig:', JSON.stringify(this.publicCaptchaConfig)); // 添加日志 // Avoid refetching if already loaded - if (this.publicCaptchaConfig !== null) return; + if (this.publicCaptchaConfig !== null) { + console.log('[AuthStore] publicCaptchaConfig is not null, returning early.'); // 添加日志 + return; + } // Don't set isLoading for this, it should be quick background fetch try { diff --git a/packages/frontend/src/views/LoginView.vue b/packages/frontend/src/views/LoginView.vue index 3dcb297..95d9594 100644 --- a/packages/frontend/src/views/LoginView.vue +++ b/packages/frontend/src/views/LoginView.vue @@ -93,6 +93,7 @@ const handleSubmit = async () => { // Fetch CAPTCHA config on component mount onMounted(() => { + console.log('[LoginView] Component mounted, calling fetchCaptchaConfig...'); // 添加日志 authStore.fetchCaptchaConfig(); });