const baseurl = "https://interface.huihenduo.com.cn/hhd-pat/";
const uploadUrl = `${baseurl}cos/upload`;
import axios from "axios";

axios.interceptors.response.use(
  function (response) {
    return response;
  },
  function (error) {
    return Promise.reject(error);
  }
);
export const $http = function (method, url, data) {
  return axios({
    method,
    url: baseurl + url,
    data,
    withCredentials: true,
  });
};

export default { baseurl, uploadUrl, $http };
