feat: 默认测试环境并优化出仓与网络提示
This commit is contained in:
@@ -26,14 +26,16 @@ const config = {
|
||||
// 开发环境API URL选项(仅替换 //域名/ 后第一个路径段 hcscm → hcscm_weave,不改域名)
|
||||
devApiUrlOptions: [
|
||||
{ label: '测试环境', value: 'https://hcscmtest.zzfzyc.com/hcscm_weave/pda/v1' },
|
||||
{ label: '正式环境', value: process.env.VUE_APP_DEV_API_URL || process.env.VUE_APP_PRODUCTION_API_URL || 'https://www.haotopai.com/hcscm_weave/mes/server/pda/v1' },
|
||||
{ label: '本地环境', value: 'http://192.168.1.66:7010/hcscm_weave/pda/v1' },
|
||||
{ label: '正式环境', value: process.env.VUE_APP_DEV_API_URL || 'https://www.haotopai.com/hcscm_weave/mes/server/pda/v1' },
|
||||
{ label: '自定义', value: 'custom' }
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
// 设置后台接口服务的基础地址 - 使用动态API URL
|
||||
// config.baseUrl = 'https://aidex.vip/api'; // 注释掉固定的baseUrl
|
||||
export function getTestApiUrl() {
|
||||
const test = config.devApiUrlOptions.find(item => item.label === '测试环境');
|
||||
return (test && test.value) || 'https://hcscmtest.zzfzyc.com/hcscm_weave/pda/v1';
|
||||
}
|
||||
|
||||
export default config;
|
||||
|
||||
Reference in New Issue
Block a user