【功能修复】Editor 无法刷新令牌的问题

This commit is contained in:
YunaiV 2024-12-28 20:02:09 +08:00
parent aa37021a68
commit e985b2507a

View File

@ -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()
},