From 67864e67b33e2c320e7ac5c8d5db48ab8124e1fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 26 Apr 2023 22:47:28 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20oss=20=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E6=BC=8F=E6=94=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Editor/index.vue | 2 +- src/components/FileUpload/index.vue | 2 +- src/components/ImageUpload/index.vue | 2 +- src/plugins/download.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index e250050..a0728eb 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -68,7 +68,7 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance; const upload = reactive({ headers: { Authorization: "Bearer " + getToken() }, - url: import.meta.env.VITE_APP_BASE_API + '/system/oss/upload' + url: import.meta.env.VITE_APP_BASE_API + '/resource/oss/upload' }) const myQuillEditor = ref(); diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 9d8f742..a46d5ee 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -78,7 +78,7 @@ const number = ref(0); const uploadList = ref([]); const baseUrl = import.meta.env.VITE_APP_BASE_API; -const uploadFileUrl = ref(baseUrl + "/system/oss/upload"); // 上传文件服务器地址 +const uploadFileUrl = ref(baseUrl + "/resource/oss/upload"); // 上传文件服务器地址 const headers = ref({ Authorization: "Bearer " + getToken() }); const fileList = ref([]); diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index 57697fa..0791f3e 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -76,7 +76,7 @@ const dialogImageUrl = ref(""); const dialogVisible = ref(false); const baseUrl = import.meta.env.VITE_APP_BASE_API; -const uploadImgUrl = ref(baseUrl + "/system/oss/upload"); // 上传的图片服务器地址 +const uploadImgUrl = ref(baseUrl + "/resource/oss/upload"); // 上传的图片服务器地址 const headers = ref({ Authorization: "Bearer " + getToken() }); const fileList = ref([]); diff --git a/src/plugins/download.ts b/src/plugins/download.ts index 2640763..e1c4414 100644 --- a/src/plugins/download.ts +++ b/src/plugins/download.ts @@ -9,7 +9,7 @@ const baseURL = import.meta.env.VITE_APP_BASE_API; let downloadLoadingInstance: LoadingInstance; export default { async oss(ossId: string | number) { - const url = baseURL + '/system/oss/download/' + ossId; + const url = baseURL + '/resource/oss/download/' + ossId; downloadLoadingInstance = ElLoading.service({ text: '正在下载数据,请稍候', background: 'rgba(0, 0, 0, 0.7)' }); try { const res = await axios({