From c118e83a2be9e36f474a6bc16b8c6744dae51286 Mon Sep 17 00:00:00 2001 From: HUCHAOQI Date: Tue, 30 May 2023 10:14:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Daxios=E4=B8=ADresponseInterce?= =?UTF-8?q?ptorsCatch=E7=9A=84=E7=B1=BB=E5=9E=8B=20(#2811)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(table): 使用lodash 的merge来递归assign,优化在多对象嵌套情况下的结构 * fix(view): 修复登入页面点击其他登入方式后返回时视图异常的bug * fix(util): 修复类型错误 --- src/utils/http/axios/axiosTransform.ts | 2 +- src/utils/http/axios/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/http/axios/axiosTransform.ts b/src/utils/http/axios/axiosTransform.ts index b0cc0afe..a9974382 100644 --- a/src/utils/http/axios/axiosTransform.ts +++ b/src/utils/http/axios/axiosTransform.ts @@ -5,7 +5,7 @@ import type { AxiosInstance, AxiosRequestConfig, AxiosResponse, - InternalAxiosRequestConfig + InternalAxiosRequestConfig, } from 'axios'; import type { RequestOptions, Result } from '/#/axios'; diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index 872cd40e..2868c070 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 '/#/axios'; import type { AxiosTransform, CreateAxiosOptions } from './axiosTransform'; @@ -175,7 +175,7 @@ const transform: AxiosTransform = { /** * @description: 响应错误处理 */ - responseInterceptorsCatch: (axiosInstance: AxiosResponse, error: any) => { + responseInterceptorsCatch: (axiosInstance: AxiosInstance, error: any) => { const { t } = useI18n(); const errorLogStore = useErrorLogStoreWithOut(); errorLogStore.addAjaxErrorInfo(error);