2023-02-06 17:14:16 +08:00
|
|
|
function getBaseApiUrl() {
|
|
|
|
|
let path = window.location.pathname;
|
|
|
|
|
if (path == '/') {
|
|
|
|
|
return window.location.host;
|
|
|
|
|
}
|
|
|
|
|
return window.location.host + path;
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-07 17:22:07 +08:00
|
|
|
const config = {
|
2023-02-06 17:14:16 +08:00
|
|
|
baseApiUrl: `${(window as any).globalConfig.BaseApiUrl || location.protocol + '//' + getBaseApiUrl()}/api`,
|
|
|
|
|
baseWsUrl: `${(window as any).globalConfig.BaseWsUrl || `${location.protocol == 'https:' ? 'wss:' : 'ws:'}//${getBaseApiUrl()}`}/api`,
|
2022-11-07 21:57:51 +08:00
|
|
|
|
|
|
|
|
// 系统版本
|
2023-06-28 21:35:03 +08:00
|
|
|
version: 'v1.4.4'
|
2021-06-07 17:22:07 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default config
|