We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6a1cce commit 5d54e05Copy full SHA for 5d54e05
src/utils/request.ts
@@ -1,4 +1,4 @@
1
-import type { AxiosError, AxiosRequestConfig } from 'axios'
+import type { AxiosError, InternalAxiosRequestConfig } from 'axios'
2
import axios from 'axios'
3
import { showNotify } from 'vant'
4
import { localStorage } from '@/utils/local-storage'
@@ -48,7 +48,7 @@ const errorHandler = (error: RequestError): Promise<any> => {
48
}
49
50
// 请求拦截器
51
-const requestHandler = (config: AxiosRequestConfig): AxiosRequestConfig | Promise<AxiosRequestConfig> => {
+const requestHandler = (config: InternalAxiosRequestConfig): InternalAxiosRequestConfig | Promise<InternalAxiosRequestConfig> => {
52
const savedToken = localStorage.get(STORAGE_TOKEN_KEY)
53
// 如果 token 存在
54
// 让每个请求携带自定义 token, 请根据实际情况修改
0 commit comments