将url中localhost端口改为当前host端口
This commit is contained in:
@ -14,6 +14,7 @@ import { getTheme, setTheme } from "../Obj/Element/theme";
|
||||
import { setActiveViewer as setMultiViewportActiveViewer } from './MultiViewportMode'
|
||||
import { setActiveViewer as setSplitActiveViewer, getSdk } from './SplitScreen'
|
||||
import { updateCluster } from './cluster/cluster'
|
||||
import { getHost } from "../on";
|
||||
|
||||
let coordinateSystem = 'EPSG:4326'
|
||||
let _cartesian
|
||||
@ -244,6 +245,16 @@ function setBillboardDefaultUrl(url, name) {
|
||||
else {
|
||||
name = 'billboard_default_url'
|
||||
}
|
||||
let host = getHost()
|
||||
if (!url.startsWith("http")) {
|
||||
//说明是本地的json,在磁盘中存在的
|
||||
if (!url.includes(":")) {
|
||||
if (host) {
|
||||
let o = new URL(url, host)
|
||||
url = o.href
|
||||
}
|
||||
}
|
||||
}
|
||||
localStorage.setItem(name, url);
|
||||
}
|
||||
/*获取广告牌默认图标*/
|
||||
|
Reference in New Issue
Block a user