import axios from "axios";
import { requestLogger, responseLogger } from "axios-logger";
const request = axios.create({
	baseURL: import.meta.env.MODE === "production" ? "/prod-api" : "/dev-api",
});
request.interceptors.request.use(config=>{
	// let token = window.localStorage.getItem("token")
	if (config.headers.isToken !== false) {
	//	config.headers["Authorization"] = "Bearer " +token; // 让每个请求携带自定义token 请根据实际情况自行修改
		config.headers["Authorization"]=""
	}
	return config;

})
request.interceptors.response.use((res) => {
	// console.log(res)
	return res;
});

export default request;


