We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49e5fc3 commit a0dcef4Copy full SHA for a0dcef4
src/views/mp/material/components/upload.ts
@@ -1,8 +1,8 @@
1
import type { UploadProps, UploadRawFile } from 'element-plus'
2
-import { getAccessToken } from '@/utils/auth'
+import { getRefreshToken } from '@/utils/auth'
3
import { UploadType, useBeforeUpload } from '@/views/mp/hooks/useUpload'
4
5
-const HEADERS = { Authorization: 'Bearer ' + getAccessToken() } // 请求头
+const HEADERS = { Authorization: 'Bearer ' + getRefreshToken() } // 请求头(解决 el-upload 上传过程中,无法刷新令牌的问题)
6
const UPLOAD_URL = import.meta.env.VITE_BASE_URL + '/admin-api/mp/material/upload-permanent' // 上传地址
7
8
interface UploadData {
0 commit comments