接口接入
This commit is contained in:
23
env.js
Normal file
23
env.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// 环境枚举
|
||||
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.56:8081',//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];
|
||||
Reference in New Issue
Block a user