// 环境变量配置 // ============ 环境切换开关(修改这里即可切换环境)============ // 可选值: 'development' | 'test' | 'production' const CURRENT_ENV = 'production' as const // =========================================================== export const ENV_CONFIG = { // 开发环境 development: { API_BASE_URL: 'https://glt-dev-api.websoft.top/api', SERVER_API_URL: 'https://glt-dev-server.websoft.top/api', APP_NAME: '开发环境', DEBUG: 'true', }, // 测试环境 test: { API_BASE_URL: 'https://glt-dev-api.websoft.top/api', SERVER_API_URL: 'https://glt-dev-server.websoft.top/api', APP_NAME: '测试环境', DEBUG: 'true', }, // 生产环境 production: { API_BASE_URL: 'https://glt-api.websoft.top/api', SERVER_API_URL: 'https://glt-server.websoft.top/api', APP_NAME: '桂乐淘', DEBUG: 'false', }, } // 获取当前环境配置 export function getEnvConfig() { return ENV_CONFIG[CURRENT_ENV] } // 导出环境变量 export const { API_BASE_URL, SERVER_API_URL, APP_NAME, DEBUG } = getEnvConfig()