From 9b4c9854d5b179e335b34e4c5a4f3562a4cfe509 Mon Sep 17 00:00:00 2001 From: duzhichao <1098974448@qq.com> Date: Sun, 4 Jan 2026 21:14:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BB=8F=E7=BA=AC=E5=BA=A6=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=E5=92=8C=E7=A7=9F=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/MapContainer/3d/hooks/useTilesetLoader.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zlt-web/yingyan/src/pages/map3d/components/MapContainer/3d/hooks/useTilesetLoader.ts b/zlt-web/yingyan/src/pages/map3d/components/MapContainer/3d/hooks/useTilesetLoader.ts index f9f87898..6b177598 100644 --- a/zlt-web/yingyan/src/pages/map3d/components/MapContainer/3d/hooks/useTilesetLoader.ts +++ b/zlt-web/yingyan/src/pages/map3d/components/MapContainer/3d/hooks/useTilesetLoader.ts @@ -93,12 +93,12 @@ export const useTilesetLoader = (): UseTilesetLoaderResult => { }); try { - // 处理跨域问题:非 localhost 访问时将 CDN URL 转换为代理路径 + // 处理跨域问题:开发环境 (localhost) 将 CDN URL 转换为代理路径 let tilesetUrl = config.url; const isLocalhost = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1'; - if (!isLocalhost && tilesetUrl.includes('minicdn.goflytec.com')) { + if (isLocalhost && tilesetUrl.includes('minicdn.goflytec.com')) { tilesetUrl = tilesetUrl.replace('https://minicdn.goflytec.com', ''); - console.log('[Tileset] 使用代理路径:', tilesetUrl); + console.log('[Tileset] 开发环境使用代理路径:', tilesetUrl); } // 创建3DTileset - 高清晰度渲染配置