From c9f7314cd0e02201940a7800e5668bb4bbd932be Mon Sep 17 00:00:00 2001 From: 孤舟烟雨 <494979+gzyy@user.noreply.gitee.com> Date: 星期五, 13 八月 2021 10:03:46 +0800 Subject: [PATCH] !77 update 对象存储配置 重构到数据库 动态配置 * 增加对象存储配置sql * 修改对象存储配置 * Merge branch 'dev' of https://gitee.com/JavaLionLi/RuoYi-Vue-Plus into dev * 增加对象存储配置 * 增加对象存储配置 --- ruoyi-ui/src/components/ImageUpload/index.vue | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ruoyi-ui/src/components/ImageUpload/index.vue b/ruoyi-ui/src/components/ImageUpload/index.vue index 31940af..e074b38 100644 --- a/ruoyi-ui/src/components/ImageUpload/index.vue +++ b/ruoyi-ui/src/components/ImageUpload/index.vue @@ -74,7 +74,7 @@ dialogVisible: false, hideUpload: false, baseUrl: process.env.VUE_APP_BASE_API, - uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 涓婁紶鐨勫浘鐗囨湇鍔″櫒鍦板潃 + uploadImgUrl: process.env.VUE_APP_BASE_API + "/system/oss/upload", // 涓婁紶鐨勫浘鐗囨湇鍔″櫒鍦板潃 headers: { Authorization: "Bearer " + getToken(), }, @@ -90,11 +90,7 @@ // 鐒跺悗灏嗘暟缁勮浆涓哄璞℃暟缁� this.fileList = list.map(item => { if (typeof item === "string") { - if (item.indexOf(this.baseUrl) === -1) { - item = { name: this.baseUrl + item, url: this.baseUrl + item }; - } else { - item = { name: item, url: item }; - } + item = { name: item, url: item }; } return item; }); @@ -122,7 +118,7 @@ }, // 涓婁紶鎴愬姛鍥炶皟 handleUploadSuccess(res) { - this.fileList.push({ name: res.data.fileName, url: res.data.fileName }); + this.fileList.push({ name: res.data.fileName, url: res.data.url }); this.$emit("input", this.listToString(this.fileList)); this.loading.close(); }, -- Gitblit v1.9.3