mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-06 03:58:04 +08:00
fix: 修改 axios 类型错误
This commit is contained in:
parent
adf7004727
commit
952e61bbba
@ -1,4 +1,4 @@
|
||||
import axios, { AxiosResponse, AxiosRequestConfig } from 'axios'
|
||||
import axios, { AxiosResponse, InternalAxiosRequestConfig, AxiosError } from 'axios'
|
||||
import { ResultEnum } from "@/enums/httpEnum"
|
||||
import { ErrorPageNameMap } from "@/enums/pageEnum"
|
||||
import { redirectErrorPage } from '@/utils'
|
||||
@ -9,10 +9,10 @@ const axiosInstance = axios.create({
|
||||
})
|
||||
|
||||
axiosInstance.interceptors.request.use(
|
||||
(config: AxiosRequestConfig) => {
|
||||
(config: InternalAxiosRequestConfig) => {
|
||||
return config
|
||||
},
|
||||
(error: AxiosRequestConfig) => {
|
||||
(error: AxiosError) => {
|
||||
Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user