fix: type error
This commit is contained in:
parent
447313cb05
commit
4923c3b163
|
@ -1,4 +1,11 @@
|
||||||
import axios, { AxiosInstance, AxiosRequestHeaders, AxiosResponse, AxiosError } from 'axios'
|
import axios, {
|
||||||
|
AxiosInstance,
|
||||||
|
AxiosRequestHeaders,
|
||||||
|
AxiosResponse,
|
||||||
|
AxiosError,
|
||||||
|
InternalAxiosRequestConfig
|
||||||
|
} from 'axios'
|
||||||
|
|
||||||
import { ElMessage, ElMessageBox, ElNotification } from 'element-plus'
|
import { ElMessage, ElMessageBox, ElNotification } from 'element-plus'
|
||||||
import qs from 'qs'
|
import qs from 'qs'
|
||||||
import { config } from '@/config/axios/config'
|
import { config } from '@/config/axios/config'
|
||||||
|
@ -35,7 +42,7 @@ const service: AxiosInstance = axios.create({
|
||||||
|
|
||||||
// request拦截器
|
// request拦截器
|
||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
(config) => {
|
(config: InternalAxiosRequestConfig) => {
|
||||||
// 是否需要设置 token
|
// 是否需要设置 token
|
||||||
let isToken = (config!.headers || {}).isToken === false
|
let isToken = (config!.headers || {}).isToken === false
|
||||||
whiteList.some((v) => {
|
whiteList.some((v) => {
|
||||||
|
|
Loading…
Reference in New Issue