Files
template-10560/config/env.ts
赵忠林 d9cd206da8 chore(config): 更新开发环境API基础URL
- 将开发环境的API基础URL从'http://127.0.0.1:9200/api'更改为'https://cms-api.websoft.top/api'

fix(withdraw): 修复提现页面表单重置逻辑

- 在提现成功后添加了await关键字以确保异步操作完成后再重置表单
2025-11-20 13:52:46 +08:00

43 lines
892 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: '九运售电云',
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()