Files
template-10560/config/env.ts
赵忠林 c3044c6ea7 feat(dealer): 更新订单页面用户选择逻辑
- 修改开发环境 API 地址为本地地址
- 在 shopDealerReferee 模型中新增 roleId 和 isAdmin 字段
- 新增 users2 状态用于存储渠道员数据
- 调整 fetchUsers 方法,区分业务员和渠道员的数据获取逻辑
- 优化用户选择器,将渠道员选择绑定到 users2 数据源
- 修复渠道员选择按钮的显示逻辑和点击事件绑定问题
2025-11-20 10:27:11 +08:00

43 lines
886 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.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()