From 295eb3cc87aaa5176d64a4ef985cdad0bfefae9a Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Mon, 31 Mar 2025 08:35:00 +0800
Subject: [PATCH] 增加单个机巢页面
---
src/utils/cesium-tsa.js | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/utils/cesium-tsa.js b/src/utils/cesium-tsa.js
index 60cd4ba..06bb067 100644
--- a/src/utils/cesium-tsa.js
+++ b/src/utils/cesium-tsa.js
@@ -3,7 +3,12 @@
import store from '@/store';
import { Terrain } from 'cesium';
-window.CESIUM_BASE_URL = '/cesiumPu';
+
+// vite env
+const { VITE_APP_BASE } = import.meta.env;
+
+
+window.CESIUM_BASE_URL = `${VITE_APP_BASE}cesiumPu`;
// 定义全局的viewer变量防止重复生成
let viewer = null;
let globalBaseMapLayers = [];
@@ -214,7 +219,6 @@
if (item.mapLayer) item.mapLayer.show = false;
});
- console.log(store.state.common);
// 高德影像地图数据图层
if (store.state.common.mapSetting.mode === 3) {
@@ -986,6 +990,7 @@
const viewerDestory = () => {
viewer && viewer.destroy();
viewer = null;
+ window.$viewer = null
};
let tilesetArr = [];
--
Gitblit v1.9.3