Files
template-10260/config/env.ts
赵忠林 a3d7309fc7 feat(pages): 添加多个页面配置和实现文章管理功能
- 添加 .editorconfig、.eslintrc 和 .gitignore 配置文件
- 添加管理员文章管理页面配置和实现
- 添加医生申请、银行卡、客户管理页面配置和实现
- 添加用户地址和聊天消息页面配置
- 实现文章新增编辑功能,包括表单验证和图片上传
- 实现医生注册功能,包含头像上传和手机号获取
- 实现银行卡管理功能,支持默认地址设置
- 实现客户报备功能,包含7天保护期逻辑
- 实现在线开方页面配置
- 修复页面标题和样式配置问题
2025-12-25 14:07:47 +08:00

43 lines
894 B
TypeScript

// 环境变量配置
export const ENV_CONFIG = {
// 开发环境
development: {
API_BASE_URL: 'https://cms-api.websoft.top/api',
APP_NAME: '开发环境',
DEBUG: 'true',
},
// 生产环境
production: {
API_BASE_URL: 'https://cms-api.websoft.top/api',
APP_NAME: 'WebSoft Inc.',
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()