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
a0dcef49
authored
May 04, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:【MP 公众号】上传资源时,无法刷新令牌的问题
parent
49e5fc3e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/views/mp/material/components/upload.ts
+2
-2
No files found.
src/views/mp/material/components/upload.ts
View file @
a0dcef49
import
type
{
UploadProps
,
UploadRawFile
}
from
'element-plus'
import
type
{
UploadProps
,
UploadRawFile
}
from
'element-plus'
import
{
get
Access
Token
}
from
'@/utils/auth'
import
{
get
Refresh
Token
}
from
'@/utils/auth'
import
{
UploadType
,
useBeforeUpload
}
from
'@/views/mp/hooks/useUpload'
import
{
UploadType
,
useBeforeUpload
}
from
'@/views/mp/hooks/useUpload'
const
HEADERS
=
{
Authorization
:
'Bearer '
+
get
AccessToken
()
}
// 请求头
const
HEADERS
=
{
Authorization
:
'Bearer '
+
get
RefreshToken
()
}
// 请求头(解决 el-upload 上传过程中,无法刷新令牌的问题)
const
UPLOAD_URL
=
import
.
meta
.
env
.
VITE_BASE_URL
+
'/admin-api/mp/material/upload-permanent'
// 上传地址
const
UPLOAD_URL
=
import
.
meta
.
env
.
VITE_BASE_URL
+
'/admin-api/mp/material/upload-permanent'
// 上传地址
interface
UploadData
{
interface
UploadData
{
...
...
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