ananzhusen 1 місяць тому
батько
коміт
becf225bb6
3 змінених файлів з 13 додано та 12 видалено
  1. 4 4
      src/services/project.ts
  2. 1 1
      src/views/components/Header.vue
  3. 8 7
      vite.config.ts

+ 4 - 4
src/services/project.ts

@@ -1595,7 +1595,7 @@ const getImgList = async (meta2dData) => {
     }
   }
   //图片图元(image strokeImage backgroundImage)
-  const imageKeys = ['image', 'strokeImage', 'backgroundImage'];
+  const imageKeys = ['image', 'strokeImage', 'backgroundImage','activeBgImage','bgImage'];
   const images: string[] = [];
   for (const pen of meta2dData.pens) {
     for (const i of imageKeys) {
@@ -1607,7 +1607,7 @@ const getImgList = async (meta2dData) => {
           image.startsWith(img_upCdn)
         ) {
           // 只考虑相对路径下的 image ,绝对路径图片无需下载
-          let _img = image.replace(img_cdn, '').replace(img_upCdn, '');
+          let _img = image.replace(img_cdn, '').replace(img_upCdn, '').split('?')[0];
           if (_img.startsWith('/v/')) {
             _img = _img.slice(2);
           }
@@ -1636,7 +1636,7 @@ const getImgList = async (meta2dData) => {
                 image.startsWith(img_upCdn)
               ) {
                 // 只考虑相对路径下的 image ,绝对路径图片无需下载
-                let _img = image.replace(img_cdn, '').replace(img_upCdn, '');
+                let _img = image.replace(img_cdn, '').replace(img_upCdn, '').split('?')[0];
                 if (_img.startsWith('/v/')) {
                   _img = _img.slice(2);
                 }
@@ -1668,7 +1668,7 @@ const getImgList = async (meta2dData) => {
                   image.startsWith(img_upCdn)
                 ) {
                   // 只考虑相对路径下的 image ,绝对路径图片无需下载
-                  let _img = image.replace(img_cdn, '').replace(img_upCdn, '');
+                  let _img = image.replace(img_cdn, '').replace(img_upCdn, '').split('?')[0];
                   if (_img.startsWith('/v/')) {
                     _img = _img.slice(2);
                   }

+ 1 - 1
src/views/components/Header.vue

@@ -13,7 +13,7 @@
         <t-dropdown-item @click="loadProject" divider="true">
           <a>
             <div class="flex">
-                打开工程 <span class="flex-grow"></span>
+                导入工程 <span class="flex-grow"></span>
             </div>
           </a>
         </t-dropdown-item>

+ 8 - 7
vite.config.ts

@@ -50,13 +50,14 @@ export default defineConfig({
     proxy: {
       // '/image': 'https://v.le5le.com/',
       // '/file': 'https://v.le5le.com/',
-      // '/api': 'http://192.168.110.141:7000/',
-      '/api': 'https://v.le5le.com/',
-      '/v/material': 'https://v.le5le.com/',
-      '/png': 'https://v.le5le.com/',
-      '/svg': 'https://v.le5le.com/',
-      // '/view': 'https://v.le5le.com/',
-      '/api/tools':'https://v.le5le.com/'
+      '/api': 'http://192.168.110.141:7000/',
+      '/file': 'http://192.168.110.141:7000/',
+      // '/api': 'https://v.le5le.com/',
+      // '/v/material': 'https://v.le5le.com/',
+      // '/png': 'https://v.le5le.com/',
+      // '/svg': 'https://v.le5le.com/',
+      // // '/view': 'https://v.le5le.com/',
+      // '/api/tools':'https://v.le5le.com/'
     },
   },
 });