mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-12-26 17:38:20 +01:00
fix path bug
This commit is contained in:
parent
43f96af920
commit
9d5a0b404c
Binary file not shown.
@ -123,10 +123,16 @@ namespace OS {
|
|||||||
*/
|
*/
|
||||||
export var HOST: string =
|
export var HOST: string =
|
||||||
loc.hostname + (loc.port ? `:${loc.port}` : "");
|
loc.hostname + (loc.port ? `:${loc.port}` : "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base URI of the server-side API
|
||||||
|
*/
|
||||||
|
export var BASE_URI: string = `${HOST}${loc.pathname}`;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base REST URI of the server-side API
|
* The base REST URI of the server-side API
|
||||||
*/
|
*/
|
||||||
export var REST: string = `${loc.protocol}//${HOST}${loc.pathname}`;
|
export var REST: string = `${loc.protocol}//${BASE_URI}`;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The namespace `handle` contains some low level API to
|
* The namespace `handle` contains some low level API to
|
||||||
@ -344,7 +350,7 @@ namespace OS {
|
|||||||
if (ws) {
|
if (ws) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
try {
|
try {
|
||||||
const path = `${API.HOST}/system/apigateway?ws=1`;
|
const path = `${API.BASE_URI}/system/apigateway?ws=1`;
|
||||||
const proto =
|
const proto =
|
||||||
window.location.protocol === "https:"
|
window.location.protocol === "https:"
|
||||||
? "wss://"
|
? "wss://"
|
||||||
|
Loading…
Reference in New Issue
Block a user