From 61f68cdbc1f62ca580c971af9c0b187aab725241 Mon Sep 17 00:00:00 2001
From: GuLiMmo <2820890765@qq.com>
Date: Thu, 25 Jan 2024 09:34:11 +0800
Subject: [PATCH] chore:航线库文件路径拼接去除

---
 src/pages/page-web/projects/wayline.vue |    4 ++--
 src/components/waylinetool/index.vue    |    5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/components/waylinetool/index.vue b/src/components/waylinetool/index.vue
index df3854d..14c21d3 100644
--- a/src/components/waylinetool/index.vue
+++ b/src/components/waylinetool/index.vue
@@ -61,6 +61,8 @@
 
 const store = useMyStore()
 
+const prefix = import.meta.env.VITE_MEDIAPANEL_API_URL
+
 const getResource = (name: string) => {
   return new URL(`/src/assets/icons/${name}`, import.meta.url).href
 }
@@ -515,8 +517,7 @@
  * @return {*} void
  */
 const readKmzFile = (kmzPath: string) => {
-  const [, address] = kmzPath.split('cloud-bucket')
-  return axios.get(import.meta.env.VITE_MEDIAPANEL_API_URL + address, { responseType: 'arraybuffer' })
+  return axios.get(kmzPath, { responseType: 'arraybuffer' })
     .then(fileRes => fileRes.data)
     .then(kmzData => JsZip.loadAsync(kmzData)) // 解压kmz文件
     .then(kmzZip => kmzZip)
diff --git a/src/pages/page-web/projects/wayline.vue b/src/pages/page-web/projects/wayline.vue
index f6ce2e6..9435c54 100644
--- a/src/pages/page-web/projects/wayline.vue
+++ b/src/pages/page-web/projects/wayline.vue
@@ -355,8 +355,8 @@
  * @param file
  */
 function initKmlFile (file: string) {
-  const [, address] = file.split('cloud-bucket')
-  file = import.meta.env.VITE_MEDIAPANEL_API_URL + address
+  // const [, address] = file.split('cloud-bucket')
+  // file = import.meta.env.VITE_MEDIAPANEL_API_URL + address
   removeById('kmzLine')
   const options = {
     camera: global.$viewer.scene.camera,

--
Gitblit v1.9.3