Files
glt-taro/config/env.ts
赵忠林 6fb8be275a chore(config): 为环境配置添加类型注解并初始化专家历史记录
- 为 CURRENT_ENV 变量添加 'production' 类型注解
- 初始化 .workbuddy/expert-history.json 文件
- 添加 Will 专家配置信息
- 记录专家使用时间和行业信息
2026-04-02 20:21:01 +08:00

44 lines
1.1 KiB
TypeScript

// 环境变量配置
// ============ 环境切换开关(修改这里即可切换环境)============
// 可选值: 'development' | 'test' | 'production'
const CURRENT_ENV: 'production' = 'production'
// ===========================================================
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()