Files
template-10519/config/env.ts
赵忠林 7df71448c9 feat(passport): 更新登录页面交互逻辑
- 修改手机号输入框提示文案为“请输入账号”- 移除手机号格式校验逻辑
- 将短信验证码输入框改为密码类型,并修改提示文案为“请输入密码”- 移除获取验证码按钮及相关倒计时逻辑
- 调整用户协议勾选框文案,去除“勾选表示您”前缀-优化登录接口调用参数格式
2025-12-09 11:42:53 +08:00

43 lines
886 B
TypeScript

// 环境变量配置
export const ENV_CONFIG = {
// 开发环境
development: {
API_BASE_URL: 'https://yd-api.websoft.top/api',
APP_NAME: '开发环境',
DEBUG: 'true',
},
// 生产环境
production: {
API_BASE_URL: 'https://yd-api.websoft.top/api',
APP_NAME: '邕递+',
DEBUG: 'false',
},
// 测试环境
test: {
API_BASE_URL: 'https://yd-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()