From a0dcef4960338ec076b87966edbb9927d0c8caea Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 4 May 2025 20:20:49 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E3=80=90MP=20=E5=85=AC=E4=BC=97?= =?UTF-8?q?=E5=8F=B7=E3=80=91=E4=B8=8A=E4=BC=A0=E8=B5=84=E6=BA=90=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=97=A0=E6=B3=95=E5=88=B7=E6=96=B0=E4=BB=A4=E7=89=8C?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mp/material/components/upload.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/mp/material/components/upload.ts b/src/views/mp/material/components/upload.ts index e732fe70..724d5459 100644 --- a/src/views/mp/material/components/upload.ts +++ b/src/views/mp/material/components/upload.ts @@ -1,8 +1,8 @@ import type { UploadProps, UploadRawFile } from 'element-plus' -import { getAccessToken } from '@/utils/auth' +import { getRefreshToken } from '@/utils/auth' import { UploadType, useBeforeUpload } from '@/views/mp/hooks/useUpload' -const HEADERS = { Authorization: 'Bearer ' + getAccessToken() } // 请求头 +const HEADERS = { Authorization: 'Bearer ' + getRefreshToken() } // 请求头(解决 el-upload 上传过程中,无法刷新令牌的问题) const UPLOAD_URL = import.meta.env.VITE_BASE_URL + '/admin-api/mp/material/upload-permanent' // 上传地址 interface UploadData {