Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e985b250
authored
Dec 28, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【功能修复】Editor 无法刷新令牌的问题
parent
aa37021a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/components/Editor/src/Editor.vue
+3
-3
No files found.
src/components/Editor/src/Editor.vue
View file @
e985b250
...
@@ -6,7 +6,7 @@ import { propTypes } from '@/utils/propTypes'
...
@@ -6,7 +6,7 @@ import { propTypes } from '@/utils/propTypes'
import
{
isNumber
}
from
'@/utils/is'
import
{
isNumber
}
from
'@/utils/is'
import
{
ElMessage
}
from
'element-plus'
import
{
ElMessage
}
from
'element-plus'
import
{
useLocaleStore
}
from
'@/store/modules/locale'
import
{
useLocaleStore
}
from
'@/store/modules/locale'
import
{
get
Access
Token
,
getTenantId
}
from
'@/utils/auth'
import
{
get
Refresh
Token
,
getTenantId
}
from
'@/utils/auth'
import
{
getUploadUrl
}
from
'@/components/UploadFile/src/useUpload'
import
{
getUploadUrl
}
from
'@/components/UploadFile/src/useUpload'
defineOptions
({
name
:
'Editor'
})
defineOptions
({
name
:
'Editor'
})
...
@@ -100,7 +100,7 @@ const editorConfig = computed((): IEditorConfig => {
...
@@ -100,7 +100,7 @@ const editorConfig = computed((): IEditorConfig => {
// 自定义增加 http header
// 自定义增加 http header
headers
:
{
headers
:
{
Accept
:
'*'
,
Accept
:
'*'
,
Authorization
:
'Bearer '
+
get
AccessToken
(),
Authorization
:
'Bearer '
+
get
RefreshToken
(),
// 使用 getRefreshToken() 方法,而不使用 getAccessToken() 方法的原因:Editor 无法方便的刷新访问令牌
'tenant-id'
:
getTenantId
()
'tenant-id'
:
getTenantId
()
},
},
...
@@ -148,7 +148,7 @@ const editorConfig = computed((): IEditorConfig => {
...
@@ -148,7 +148,7 @@ const editorConfig = computed((): IEditorConfig => {
// 自定义增加 http header
// 自定义增加 http header
headers
:
{
headers
:
{
Accept
:
'*'
,
Accept
:
'*'
,
Authorization
:
'Bearer '
+
get
AccessToken
(),
Authorization
:
'Bearer '
+
get
RefreshToken
(),
// 使用 getRefreshToken() 方法,而不使用 getAccessToken() 方法的原因:Editor 无法方便的刷新访问令牌
'tenant-id'
:
getTenantId
()
'tenant-id'
:
getTenantId
()
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment