2024-04-25 18:02:30 +08:00
|
|
|
let BASE_URL
|
2024-06-24 18:40:03 +08:00
|
|
|
let WSS_URL
|
2024-04-28 18:08:57 +08:00
|
|
|
import store from "@/store/user.js"
|
2024-04-25 18:02:30 +08:00
|
|
|
// 环境
|
2024-09-03 17:14:27 +08:00
|
|
|
// let env = "dev"
|
2024-09-17 11:32:33 +08:00
|
|
|
// let env = "prod"
|
2024-06-27 17:39:25 +08:00
|
|
|
// let env = "release";
|
2024-09-17 11:32:33 +08:00
|
|
|
let env = "local";
|
2024-04-25 18:02:30 +08:00
|
|
|
|
2024-05-13 18:05:23 +08:00
|
|
|
switch (env) {
|
2024-06-11 15:12:49 +08:00
|
|
|
case 'dev':
|
2024-06-27 09:15:45 +08:00
|
|
|
BASE_URL = 'https://test-multi-store.lihaink.cn';
|
|
|
|
WSS_URL = 'wss://test-multi-store.lihaink.cn/pull'
|
2024-06-11 15:12:49 +08:00
|
|
|
break;
|
2024-06-27 17:39:25 +08:00
|
|
|
case 'release':
|
2024-06-26 19:19:58 +08:00
|
|
|
BASE_URL = 'https://ceshi-multi-store.lihaink.cn';
|
2024-06-26 18:55:10 +08:00
|
|
|
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
|
2024-06-03 18:25:34 +08:00
|
|
|
break;
|
2024-06-27 17:39:25 +08:00
|
|
|
case 'local':
|
2024-09-23 18:46:46 +08:00
|
|
|
BASE_URL = 'http://192.168.1.22:8545';
|
2024-06-27 17:39:25 +08:00
|
|
|
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
|
|
|
|
break;
|
2024-05-13 18:05:23 +08:00
|
|
|
default:
|
2024-06-11 15:12:49 +08:00
|
|
|
BASE_URL = 'https://multi-store.lihaink.cn';
|
2024-06-26 18:55:10 +08:00
|
|
|
WSS_URL = 'wss://multi-store.lihaink.cn/pull'
|
2024-04-28 18:08:57 +08:00
|
|
|
}
|
2024-04-25 18:02:30 +08:00
|
|
|
|
|
|
|
let HTTP_REQUEST_URL
|
|
|
|
let HEADER
|
2024-04-28 18:08:57 +08:00
|
|
|
|
2024-04-25 18:02:30 +08:00
|
|
|
let config = {
|
|
|
|
HTTP_REQUEST_URL: BASE_URL,
|
2024-06-24 18:40:03 +08:00
|
|
|
WSS_URL: WSS_URL,
|
2024-04-25 18:02:30 +08:00
|
|
|
HEADER: {
|
|
|
|
'content-type': 'application/json',
|
2024-09-03 17:14:27 +08:00
|
|
|
'accept':'json',
|
2024-04-25 18:02:30 +08:00
|
|
|
//#ifdef MP
|
|
|
|
'Form-type': 'routine',
|
|
|
|
//#endif
|
|
|
|
//#ifdef APP-PLUS
|
2024-06-26 20:14:05 +08:00
|
|
|
'Form-type': 'app',
|
2024-04-25 18:02:30 +08:00
|
|
|
//#endif
|
|
|
|
'TOKEN': ''
|
2024-04-28 18:08:57 +08:00
|
|
|
},
|
2024-05-13 18:05:23 +08:00
|
|
|
ENV: env,
|
2024-04-25 18:02:30 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export {
|
|
|
|
config
|
|
|
|
};
|