diff --git a/ruoyi-ui/.env.development b/ruoyi-ui/.env.development index 4772195..85ac5e5 100644 --- a/ruoyi-ui/.env.development +++ b/ruoyi-ui/.env.development @@ -7,7 +7,6 @@ ENV = 'development' # 若依管理系统/开发环境 VUE_APP_BASE_API = '/prod-api' VUE_APP_API_TARGET_URL = 'http://47.121.27.78:8080/' -VUE_APP_IMAGE_PREVIEW_API = '/imagePreview/upload' # 应用访问路径 例如使用前缀 /admin/ VUE_APP_CONTEXT_PATH = '/' diff --git a/ruoyi-ui/src/components/Editor/index.vue b/ruoyi-ui/src/components/Editor/index.vue index 430bcb6..0e324e1 100644 --- a/ruoyi-ui/src/components/Editor/index.vue +++ b/ruoyi-ui/src/components/Editor/index.vue @@ -176,7 +176,7 @@ export default { // 获取光标所在位置 let length = quill.getSelection().index; // 插入图片 res.url为服务器返回的图片地址 - quill.insertEmbed(length, "image", this.$imagePreviewApi + '/' + res.data.url.split('/').pop()); + quill.insertEmbed(length, "image", res.data.url); // 调整光标到最后 quill.setSelection(length + 1); } else { diff --git a/ruoyi-ui/src/components/ImageUploadLochost/index.vue b/ruoyi-ui/src/components/ImageUploadLochost/index.vue index 9d45d9c..1581d5c 100644 --- a/ruoyi-ui/src/components/ImageUploadLochost/index.vue +++ b/ruoyi-ui/src/components/ImageUploadLochost/index.vue @@ -80,7 +80,7 @@ export default { fileList () { return (this.value ? this.value.split(',') : []).map(url => { return { - url: process.env.VUE_APP_IMAGE_PREVIEW_API + '/' + url.split('/').pop(), + url: url, name: url, }; }); diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index dbb821a..1a5afd2 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -45,7 +45,6 @@ import VueMeta from 'vue-meta' import DictData from '@/components/DictData' // 全局属性挂载 -Vue.prototype.$imagePreviewApi = process.env.VUE_APP_IMAGE_PREVIEW_API // 全局方法挂载 Vue.prototype.getDicts = getDicts diff --git a/ruoyi-ui/src/views/official/slideshow/index.vue b/ruoyi-ui/src/views/official/slideshow/index.vue index 3c87d02..1ab1e66 100644 --- a/ruoyi-ui/src/views/official/slideshow/index.vue +++ b/ruoyi-ui/src/views/official/slideshow/index.vue @@ -92,7 +92,7 @@ diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 6e0723a..396889d 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -41,13 +41,6 @@ module.exports = { // ['^' + process.env.VUE_APP_BASE_API]: '' // } }, - '/imagePreview': { - target: 'http://47.121.27.78:8008', - changeOrigin: true, - pathRewrite: { - '^/imagePreview': '', - }, - }, }, disableHostCheck: true },