File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/components/Editor/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { propTypes } from '@/utils/propTypes'
6
6
import { isNumber } from ' @/utils/is'
7
7
import { ElMessage } from ' element-plus'
8
8
import { useLocaleStore } from ' @/store/modules/locale'
9
- import { getAccessToken , getTenantId } from ' @/utils/auth'
9
+ import { getRefreshToken , getTenantId } from ' @/utils/auth'
10
10
import { getUploadUrl } from ' @/components/UploadFile/src/useUpload'
11
11
12
12
defineOptions ({ name: ' Editor' })
@@ -100,7 +100,7 @@ const editorConfig = computed((): IEditorConfig => {
100
100
// 自定义增加 http header
101
101
headers: {
102
102
Accept: ' *' ,
103
- Authorization: ' Bearer ' + getAccessToken (),
103
+ Authorization: ' Bearer ' + getRefreshToken (), // 使用 getRefreshToken() 方法,而不使用 getAccessToken() 方法的原因:Editor 无法方便的刷新访问令牌
104
104
' tenant-id' : getTenantId ()
105
105
},
106
106
@@ -148,7 +148,7 @@ const editorConfig = computed((): IEditorConfig => {
148
148
// 自定义增加 http header
149
149
headers: {
150
150
Accept: ' *' ,
151
- Authorization: ' Bearer ' + getAccessToken (),
151
+ Authorization: ' Bearer ' + getRefreshToken (), // 使用 getRefreshToken() 方法,而不使用 getAccessToken() 方法的原因:Editor 无法方便的刷新访问令牌
152
152
' tenant-id' : getTenantId ()
153
153
},
154
154
You can’t perform that action at this time.
0 commit comments