|
@@ -518,6 +518,13 @@ function addGeoJsonLayer(url, name, callback) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 如果是/profile/路径,添加API基础路径以路由到后端
|
|
|
|
|
+ if (url.startsWith('/profile/') || url.startsWith('profile/')) {
|
|
|
|
|
+ const baseURL = window.globalRequestConfig?.baseURL || import.meta.env.VITE_APP_BASE_API || '';
|
|
|
|
|
+ url = baseURL + (url.startsWith('/') ? url : '/' + url);
|
|
|
|
|
+ console.log('/profile/路径添加API前缀后:', url);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 外部URL直接加载
|
|
// 外部URL直接加载
|
|
|
console.log('外部URL直接加载:', url);
|
|
console.log('外部URL直接加载:', url);
|
|
|
const loadPromise = Cesium.GeoJsonDataSource.load(url, {
|
|
const loadPromise = Cesium.GeoJsonDataSource.load(url, {
|
|
@@ -576,6 +583,13 @@ function addGeoJsonLayerWithStyle(url, name, style, callback) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 如果是/profile/路径,添加API基础路径以路由到后端
|
|
|
|
|
+ if (url.startsWith('/profile/') || url.startsWith('profile/')) {
|
|
|
|
|
+ const baseURL = window.globalRequestConfig?.baseURL || import.meta.env.VITE_APP_BASE_API || '';
|
|
|
|
|
+ url = baseURL + (url.startsWith('/') ? url : '/' + url);
|
|
|
|
|
+ console.log('/profile/路径添加API前缀后:', url);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 外部URL直接加载
|
|
// 外部URL直接加载
|
|
|
console.log('外部URL直接加载:', url);
|
|
console.log('外部URL直接加载:', url);
|
|
|
const fillColor = Cesium.Color.fromCssColorString(style.fillColor || '#00FF00').withAlpha(style.fillOpacity || 0.4);
|
|
const fillColor = Cesium.Color.fromCssColorString(style.fillColor || '#00FF00').withAlpha(style.fillOpacity || 0.4);
|