Browse Source
修复axios中responseInterceptorsCatch的类型 (#2811)
* fix(table): 使用lodash 的merge来递归assign,优化在多对象嵌套情况下的结构
* fix(view): 修复登入页面点击其他登入方式后返回时视图异常的bug
* fix(util): 修复类型错误
pull/2813/head
HUCHAOQI
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
3 deletions
-
src/utils/http/axios/axiosTransform.ts
-
src/utils/http/axios/index.ts
|
|
|
@ -5,7 +5,7 @@ import type { |
|
|
|
AxiosInstance, |
|
|
|
AxiosRequestConfig, |
|
|
|
AxiosResponse, |
|
|
|
InternalAxiosRequestConfig |
|
|
|
InternalAxiosRequestConfig, |
|
|
|
} from 'axios'; |
|
|
|
import type { RequestOptions, Result } from '/#/axios'; |
|
|
|
|
|
|
|
|
|
|
|
@ -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); |
|
|
|
|