From 10ecfd0b60442d209d1ab4b749580ffb638d1992 Mon Sep 17 00:00:00 2001 From: lixuliang <lixuliang_hd@126.com> Date: 星期三, 08 五月 2024 14:44:04 +0800 Subject: [PATCH] 数字人更新 --- src/components/map/viewer1.vue | 25 ++++++++++++++++--------- 1 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/components/map/viewer1.vue b/src/components/map/viewer1.vue index 52090a8..2621191 100644 --- a/src/components/map/viewer1.vue +++ b/src/components/map/viewer1.vue @@ -285,6 +285,13 @@ }, }, mounted() { + let pathName = window.location.pathname.split("/"); + let StaticFileBaseUrl; + if (pathName.length != 2) { + StaticFileBaseUrl = `../../../${pathName[1]}/static/CimSDK/`; + } else { + StaticFileBaseUrl = `../../../static/CimSDK/`; + } let size = this.detectZoom(); this.scale = (100 / size).toFixed(2); this.offset = "-" + ((size - 100) / 2).toFixed(2) + "%"; @@ -308,9 +315,7 @@ window.sgworld1 = new SmartEarth.EarthCtrl( "sdkContainer1", { - StaticFileBaseUrl: "../../static/CimSDK/", - // StaticFileBaseUrl: "../../../SW/static/CimSDK/", - // StaticFileBaseUrl: "../../../YZXNCS/static/CimSDK/", + StaticFileBaseUrl: StaticFileBaseUrl, }, {}, null, @@ -548,11 +553,12 @@ } axios .get( - "http://10.10.4.115:8022/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" + - p.lon + - "&lat=" + - p.lat + - "&geom=true&requesttype=json" + `http://10.10.4.116:8089/cs/geowinmap_xncs/ds?lng=${p.lon}&lat=${p.lat}` + // "http://10.10.4.115:8022/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" + + // p.lon + + // "&lat=" + + // p.lat + + // "&geom=true&requesttype=json" ) .then((response) => { let center = { lon: 0, lat: 0 }; @@ -596,7 +602,8 @@ if (center.lon != 0 && center.lat != 0) { axios .get( - "http://10.10.4.115:8022//poisearch/guihuacon/getInfo?ydbm=" + + "http://10.10.4.116:8089/cs/poisearch/guihuacon/getInfo?ydbm=" + + // "http://10.10.4.115:8022//poisearch/guihuacon/getInfo?ydbm=" + response.data.NO ) .then( -- Gitblit v1.9.3