import axios from "axios";
const service = axios.create({
    baseURL:process.env.VUE_APP_BASE_URL,
    timeout:3000,
    withCredentials: false,// 是否跨站点访问控制请求
    headers:{
        "Content-Type":'application/x-www-form-urlencoded'
    }
})

//请求拦截器
service.interceptors.request.use(config =>{
    console.log('请求',config)
    return config
},(error)=>{
    error.data = {}
	return Promise.resolve(error)
})


service.interceptors.response.use(response=>{
    return response
},error=>{
    console.log('错误码',error)
})


export {
	service as axios
}
console.log(process.env,'process.env')
console.log(process.env, "VUE_APP_URL");