25 lines
613 B
JavaScript
25 lines
613 B
JavaScript
// 环境枚举
|
|
const ENV = {
|
|
DEV: 'development',
|
|
PROD: 'production',
|
|
};
|
|
|
|
const currentEnv = import.meta.env?.MODE || process.env.NODE_ENV;
|
|
|
|
// 环境配置映射
|
|
const envConfig = {
|
|
[ENV.DEV]: {
|
|
baseURL: 'http://192.168.2.59:8081',//http://192.168.2.56:8081
|
|
//baseURL: 'http://1.95.137.212:59015',//http://192.168.2.56:8081
|
|
WS_URL: 'ws://192.168.2.56:9002/ws/',
|
|
},
|
|
[ENV.PROD]: {
|
|
// baseURL: 'http://192.168.2.56:8081',
|
|
baseURL: 'https://serviceri.satabot.com',
|
|
WS_URL: 'wss://ri.satabot.com/ws/'
|
|
},
|
|
};
|
|
|
|
// 导出当前环境的配置
|
|
export default envConfig[currentEnv] || envConfig[ENV.DEV];
|