From afc6cf04a1bf31545c68984a28c1d8b96701e6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Sun, 28 May 2023 18:00:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=84=E7=90=86ts=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/axios.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/api/axios.ts b/src/api/axios.ts index af60ec58..f799f28c 100644 --- a/src/api/axios.ts +++ b/src/api/axios.ts @@ -35,10 +35,7 @@ axiosInstance.interceptors.request.use( return config } const userInfo = info[SystemStoreEnum.USER_INFO] - config.headers = { - ...config.headers, - [userInfo[SystemStoreUserInfoEnum.TOKEN_NAME] || 'token']: userInfo[SystemStoreUserInfoEnum.USER_TOKEN] || '' - } as InternalAxiosRequestConfig['headers'] + config.headers[userInfo[SystemStoreUserInfoEnum.TOKEN_NAME] || 'token'] = userInfo[SystemStoreUserInfoEnum.USER_TOKEN] || '' return config }, (err: AxiosError) => {