diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index dd2587e29..f20418504 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -122,7 +122,7 @@ const transform: AxiosTransform = { requestInterceptors: (config, options) => { // 请求之前处理config const token = getToken(); - if (token && options?.requestOptions?.withToken !== false) { + if (token && (config as Recordable)?.requestOptions?.withToken !== false) { // jwt token config.headers.Authorization = options.authenticationScheme ? `${options.authenticationScheme} ${token}`