diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index b5b1526..b8ff029 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -50,7 +50,7 @@ const props = defineProps({ const { proxy } = getCurrentInstance() as ComponentInternalInstance; const upload = reactive({ - headers: { Authorization: "Bearer " + getToken() }, + headers: { Authorization: "Bearer " + getToken(), clientid: import.meta.env.VITE_APP_CLIENT_ID }, 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 32e871f..0718e31 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -66,7 +66,7 @@ const uploadList = ref([]); const baseUrl = import.meta.env.VITE_APP_BASE_API; const uploadFileUrl = ref(baseUrl + "/resource/oss/upload"); // 上传文件服务器地址 -const headers = ref({ Authorization: "Bearer " + getToken() }); +const headers = ref({ Authorization: "Bearer " + getToken(), clientid: import.meta.env.VITE_APP_CLIENT_ID }); const fileList = ref([]); const showTip = computed( diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index 01edc4f..985e1e1 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -70,7 +70,7 @@ const dialogVisible = ref(false); const baseUrl = import.meta.env.VITE_APP_BASE_API; const uploadImgUrl = ref(baseUrl + "/resource/oss/upload"); // 上传的图片服务器地址 -const headers = ref({ Authorization: "Bearer " + getToken() }); +const headers = ref({ Authorization: "Bearer " + getToken(), clientid: import.meta.env.VITE_APP_CLIENT_ID }); const fileList = ref([]); const showTip = computed( diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index f8aa2e8..9655cfc 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -334,7 +334,7 @@ const upload = reactive({ // 是否更新已经存在的用户数据 updateSupport: 0, // 设置上传的请求头部 - headers: { Authorization: "Bearer " + getToken() }, + headers: { Authorization: "Bearer " + getToken(), clientid: import.meta.env.VITE_APP_CLIENT_ID }, // 上传的地址 url: import.meta.env.VITE_APP_BASE_API + "/system/user/importData" })