Procházet zdrojové kódy

Merge branch 'pgsql' of https://github.com/le5le-com/visualization-design into pgsql

ananzhusen před 1 rokem
rodič
revize
5774c00894
1 změnil soubory, kde provedl 6 přidání a 2 odebrání
  1. 6 2
      src/views/components/Graphics.vue

+ 6 - 2
src/views/components/Graphics.vue

@@ -1672,7 +1672,9 @@ const onMenu = async (val: string) => {
         if (imageDrive && path.startsWith(imageDrive)) {
           path = path.slice(imageDrive.length);
         }
-        if(!path.startsWith('/api/file')) {
+        if(path.startsWith('/file')) {
+          path = '/api' + path;
+        } else if(!path.startsWith('/api/file')) {
           path = '/api/file' + path;
         }
         await axios.patch(`${path}`, {
@@ -1767,7 +1769,9 @@ const onMenu = async (val: string) => {
       if (imageDrive && path.startsWith(imageDrive)) {
         path = path.slice(imageDrive.length);
       }
-      if(!path.startsWith('/api/file')) {
+      if(path.startsWith('/file')) {
+        path = '/api' + path;
+      } else if(!path.startsWith('/api/file')) {
         path = '/api/file' + path;
       }
       await axios.patch(`${path}`, {