From ed197ce7acddf4183b8459b57f0c39b0284b98b5 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期二, 20 七月 2021 17:26:20 +0800 Subject: [PATCH] update 完成OSS模块页面功能 --- 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