mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: type-check (#2629)
This commit is contained in:
parent
ea0ab5e3d2
commit
5baa141b89
|
|
@ -1,4 +1,4 @@
|
|||
import axios, { type AxiosRequestConfig } from 'axios'
|
||||
import axios, { type InternalAxiosRequestConfig, AxiosHeaders } from 'axios'
|
||||
import { MsgError } from '@/utils/message'
|
||||
import type { NProgress } from 'nprogress'
|
||||
import type { Ref } from 'vue'
|
||||
|
|
@ -19,9 +19,9 @@ const instance = axios.create(axiosConfig)
|
|||
|
||||
/* 设置请求拦截器 */
|
||||
instance.interceptors.request.use(
|
||||
(config: AxiosRequestConfig) => {
|
||||
(config: InternalAxiosRequestConfig) => {
|
||||
if (config.headers === undefined) {
|
||||
config.headers = {}
|
||||
config.headers = new AxiosHeaders()
|
||||
}
|
||||
const { user } = useStore()
|
||||
const token = user.getToken()
|
||||
|
|
|
|||
Loading…
Reference in New Issue