From 6551fb939c29dbfac87b78ffd39272fabd3c82d2 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期三, 10 四月 2024 11:10:43 +0800
Subject: [PATCH] 富文本上传路径修改

---
 src/components/Tinymce/Tinymce.vue |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/components/Tinymce/Tinymce.vue b/src/components/Tinymce/Tinymce.vue
index a544c53..830a531 100644
--- a/src/components/Tinymce/Tinymce.vue
+++ b/src/components/Tinymce/Tinymce.vue
@@ -74,13 +74,13 @@
                     console.log(res);
                     if (res.code == 200) {
 
-                        const path = import.meta.env.VITE_APP_BASE_API + '/' + res.data.path
-                        // let path = "";
-                        // if(import.meta.env.VITE_APP_ENV == 'development') {
-                        //     path = import.meta.env.VITE_APP_BASE_API + '/' + res.data.path
-                        // }else {
-                        //     path = '/api/' + res.data.path
-                        // }
+                        // const path = import.meta.env.VITE_APP_BASE_API + '/' + res.data.path
+                        let path = "";
+                        if(import.meta.env.VITE_APP_ENV == 'development') {
+                            path = import.meta.env.VITE_APP_BASE_API + '/' + res.data.path
+                        }else {
+                            path = 'http://106.15.95.149:8088/api/' + res.data.path
+                        }
 
                         success(path);
                     } else {
@@ -94,13 +94,13 @@
                     await upload(formData).then(res => {
                         console.log(res);
                         if (res.code == 200) {
-                          const path = import.meta.env.VITE_APP_BASE_API + '/' + res.data.path
-                            // let path = "";
-                            // if(import.meta.env.VITE_APP_ENV == 'development') {
-                            //     path = import.meta.env.VITE_APP_BASE_API + '/' + res.data.path
-                            // }else {
-                            //     path = '/api/' + res.data.path
-                            // }
+                          // const path = import.meta.env.VITE_APP_BASE_API + '/' + res.data.path
+                            let path = "";
+                            if(import.meta.env.VITE_APP_ENV == 'development') {
+                                path = import.meta.env.VITE_APP_BASE_API + '/' + res.data.path
+                            }else {
+                                path = 'http://106.15.95.149:8088/api/' + res.data.path
+                            }
 
                             success(path,res.data);
                         } else {

--
Gitblit v1.9.2