From 4bc0d3e1611da659c853a3589d84cf41d91f13d2 Mon Sep 17 00:00:00 2001
From: zhouwenxuan <1175765986@qq.com>
Date: Wed, 10 Apr 2024 09:55:08 +0800
Subject: [PATCH] bug修改
---
src/components/Tinymce/Tinymce.vue | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/components/Tinymce/Tinymce.vue b/src/components/Tinymce/Tinymce.vue
index 5ea8a09..a544c53 100644
--- a/src/components/Tinymce/Tinymce.vue
+++ b/src/components/Tinymce/Tinymce.vue
@@ -73,13 +73,14 @@
let res = await upload(formData); // 调取 接口
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 = '/api/' + res.data.path
+ // }
success(path);
} else {
@@ -93,15 +94,14 @@
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
+ // }
- 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
- // const path = '/api/' + res.data.path
success(path,res.data);
} else {
console.log("上传失败");
--
Gitblit v1.9.2