diff --git a/mini-program/src/config/env.js b/mini-program/src/config/env.js index f851c19..d9007ee 100644 --- a/mini-program/src/config/env.js +++ b/mini-program/src/config/env.js @@ -39,6 +39,19 @@ const getConfig = () => { const debug = import.meta.env.VITE_DEBUG !== undefined ? import.meta.env.VITE_DEBUG === 'true' : base.DEBUG + + // 添加诊断日志 + if (debug) { + console.log('[ENV] 环境配置:', { + rawEnv: import.meta.env.VITE_APP_ENV, + normalizedEnv: currentEnv, + API_BASE_URL: apiBaseUrl, + WS_URL: wsUrl, + DEBUG: debug, + isFromEnvFile: import.meta.env.VITE_API_BASE_URL ? 'yes' : 'fallback-to-config' + }) + } + return { API_BASE_URL: apiBaseUrl, WS_URL: wsUrl,