import axios from "axios";
import store from "@/store";

const request = axios.create({
  baseURL: "/prod-api",
});

request.interceptors.request.use((config) => {
  // 是否需要设置 token
  if (config.headers.isToken !== false) {
    config.headers["Authorization"] = "Bearer " + store.getters.getToken; // 让每个请求携带自定义token 请根据实际情况自行修改
  }
  return config;
});


export default request;
