import axiosInstance from '@/service/request/axios';
import { request } from '@/service/request';

// 导出封装的axios实例（支持代理）
export const axios = axiosInstance;

// 导出项目封装的request实例
export { request };

// 便捷的HTTP方法
export const http = {
  get: axiosInstance.get.bind(axiosInstance),
  post: axiosInstance.post.bind(axiosInstance),
  put: axiosInstance.put.bind(axiosInstance),
  delete: axiosInstance.delete.bind(axiosInstance),
  patch: axiosInstance.patch.bind(axiosInstance),
  request: axiosInstance.request.bind(axiosInstance)
};

// 默认导出axios实例
export default axiosInstance;
