From e985b2507a3df70ad6c97b2d6e904ba28e13ad22 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 28 Dec 2024 20:02:09 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E3=80=91Editor=20=E6=97=A0=E6=B3=95=E5=88=B7=E6=96=B0=E4=BB=A4?= =?UTF-8?q?=E7=89=8C=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Editor/src/Editor.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Editor/src/Editor.vue b/src/components/Editor/src/Editor.vue index e16776c7..38c34e25 100644 --- a/src/components/Editor/src/Editor.vue +++ b/src/components/Editor/src/Editor.vue @@ -6,7 +6,7 @@ import { propTypes } from '@/utils/propTypes' import { isNumber } from '@/utils/is' import { ElMessage } from 'element-plus' import { useLocaleStore } from '@/store/modules/locale' -import { getAccessToken, getTenantId } from '@/utils/auth' +import { getRefreshToken, getTenantId } from '@/utils/auth' import { getUploadUrl } from '@/components/UploadFile/src/useUpload' defineOptions({ name: 'Editor' }) @@ -100,7 +100,7 @@ const editorConfig = computed((): IEditorConfig => { // 自定义增加 http header headers: { Accept: '*', - Authorization: 'Bearer ' + getAccessToken(), + Authorization: 'Bearer ' + getRefreshToken(), // 使用 getRefreshToken() 方法,而不使用 getAccessToken() 方法的原因:Editor 无法方便的刷新访问令牌 'tenant-id': getTenantId() }, @@ -148,7 +148,7 @@ const editorConfig = computed((): IEditorConfig => { // 自定义增加 http header headers: { Accept: '*', - Authorization: 'Bearer ' + getAccessToken(), + Authorization: 'Bearer ' + getRefreshToken(), // 使用 getRefreshToken() 方法,而不使用 getAccessToken() 方法的原因:Editor 无法方便的刷新访问令牌 'tenant-id': getTenantId() },