Files
template-10560/config/env.ts
赵忠林 8b20d6c7c2 feat(dealer): 添加客户保护期逻辑并优化相关功能
- 在客户列表和添加页面增加保护期相关功能
- 优化客户数据获取和展示,添加保护天数计算
- 调整添加客户的逻辑,增加对保护期的判断
- 更新环境配置,使用本地API地址
2025-09-12 13:43:44 +08:00

43 lines
891 B
TypeScript

// 环境变量配置
export const ENV_CONFIG = {
// 开发环境
development: {
API_BASE_URL: 'http://127.0.0.1:9200/api',
APP_NAME: '开发环境',
DEBUG: 'true',
},
// 生产环境
production: {
API_BASE_URL: 'https://cms-api.websoft.top/api',
APP_NAME: '九运售电云',
DEBUG: 'false',
},
// 测试环境
test: {
API_BASE_URL: 'https://cms-api.s209.websoft.top/api',
APP_NAME: '测试环境',
DEBUG: 'true',
}
}
// 获取当前环境配置
export function getEnvConfig() {
const env = process.env.NODE_ENV || 'development'
if (env === 'production') {
return ENV_CONFIG.production
} else { // @ts-ignore
if (env === 'test') {
return ENV_CONFIG.test
} else {
return ENV_CONFIG.development
}
}
}
// 导出环境变量
export const {
API_BASE_URL,
APP_NAME,
DEBUG
} = getEnvConfig()