From 34106d1cfe677e38c66ed76df2b0c677fc932ff1 Mon Sep 17 00:00:00 2001 From: xingyu Date: Sun, 14 May 2023 17:31:23 +0800 Subject: [PATCH] fix: axios responseInterceptorsCatch --- src/utils/http/axios/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index 165f06f1..c4794df1 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -1,7 +1,7 @@ // axios配置 可自行根据项目进行更改,只需更改该文件即可,其他文件可以不动 // The axios configuration can be changed according to the project, just change the file, other files can be left unchanged -import type { AxiosResponse } from 'axios' +import type { AxiosInstance, AxiosResponse } from 'axios' import { clone } from 'lodash-es' import type { RequestOptions, Result } from '@/types/axios' import type { AxiosTransform, CreateAxiosOptions } from './axiosTransform' @@ -205,7 +205,7 @@ const transform: AxiosTransform = { /** * @description: 响应错误处理 */ - responseInterceptorsCatch: (axiosInstance: AxiosResponse, error: any) => { + responseInterceptorsCatch: (axiosInstance: AxiosInstance, error: any) => { const { t } = useI18n() const errorLogStore = useErrorLogStoreWithOut() errorLogStore.addAjaxErrorInfo(error)