update 优化 封装全局统一请求头

This commit is contained in:
疯狂的狮子Li
2023-07-25 15:59:35 +08:00
parent 0082354aba
commit 0c791a1efc
6 changed files with 16 additions and 18 deletions

View File

@ -29,8 +29,8 @@
<script setup lang="ts">
import { QuillEditor, Quill } from '@vueup/vue-quill';
import '@vueup/vue-quill/dist/vue-quill.snow.css';
import { getToken } from "@/utils/auth";
import { propTypes } from '@/utils/propTypes';
import { globalHeaders } from "@/utils/request";
const props = defineProps({
/* 编辑器的内容 */
@ -50,7 +50,7 @@ const props = defineProps({
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const upload = reactive<UploadOption>({
headers: { Authorization: "Bearer " + getToken() },
headers: globalHeaders,
url: import.meta.env.VITE_APP_BASE_API + '/resource/oss/upload'
})
const myQuillEditor = ref();