From deb5e90800887f2c1d755e27147e9920978bd130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Mon, 6 Feb 2023 23:22:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9B=BE=E7=89=87=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/index.js | 10 +++- src/api/mdp/arc/image.js | 5 +- src/components/Image/ImageCategoryTree.vue | 10 ++-- src/components/Image/UploadImage.vue | 53 +++++++++------------- src/components/Tinymce/index.vue | 20 +++++--- 5 files changed, 54 insertions(+), 44 deletions(-) diff --git a/config/index.js b/config/index.js index eaa3c001..b9702285 100644 --- a/config/index.js +++ b/config/index.js @@ -18,7 +18,15 @@ module.exports = { '^/api/m1/xm': '/xm' } }, - /** + /** + '/api/m1/arc': { + target: 'http://localhost:7012', + changeOrigin: true, + pathRewrite: { + '^/api/m1/arc': '/arc' + } + }, + '/api/m1/sys': { target: 'http://localhost:7015', changeOrigin: true, diff --git a/src/api/mdp/arc/image.js b/src/api/mdp/arc/image.js index 480a0827..2235eaa4 100644 --- a/src/api/mdp/arc/image.js +++ b/src/api/mdp/arc/image.js @@ -31,4 +31,7 @@ export const addImage = params => { return axios.post(`${base}/mdp/arc/image/add //获取图片分类名 export const listTags = params => { return axios.get(`${base}/mdp/arc/image/listTags`, params); }; -export const uploadBase64 = params => { return axios.post(`${base}/mdp/arc/image/upload/base64`, params); }; \ No newline at end of file +export const uploadBase64 = params => { return axios.post(`${base}/mdp/arc/image/upload/base64`, params); }; + +export const upload = params => { return axios.post(`${base}/mdp/arc/image/upload`, params,{ + 'Content-type' : 'multipart/form-data'}); }; \ No newline at end of file diff --git a/src/components/Image/ImageCategoryTree.vue b/src/components/Image/ImageCategoryTree.vue index 1b9010ab..a2d798ed 100644 --- a/src/components/Image/ImageCategoryTree.vue +++ b/src/components/Image/ImageCategoryTree.vue @@ -1,5 +1,8 @@