From e03be13c4a3f5f89487a01b47e0582f617325865 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Sat, 29 Mar 2025 10:27:11 +0800
Subject: [PATCH] fix: cesium 静态资源路径调整

---
 src/utils/cesium-tsa.js |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/utils/cesium-tsa.js b/src/utils/cesium-tsa.js
index 60cd4ba..cad09ed 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 = [];

--
Gitblit v1.9.3