// 为axios工具添加类型声明
declare module '@/utils/axios' {
  import axios from 'axios'

  interface CustomAxiosInstance extends axios.AxiosInstance {
    get<T = any>(url: string, config?: axios.AxiosRequestConfig): Promise<T>
    post<T = any>(url: string, data?: any, config?: axios.AxiosRequestConfig): Promise<T>
    put<T = any>(url: string, data?: any, config?: axios.AxiosRequestConfig): Promise<T>
    delete<T = any>(url: string, config?: axios.AxiosRequestConfig): Promise<T>
  }

  const request: CustomAxiosInstance
  export default request
  export const get: CustomAxiosInstance['get']
  export const post: CustomAxiosInstance['post']
  export const put: CustomAxiosInstance['put']
  export const del: CustomAxiosInstance['delete']
}