// import axios from 'axios';
// axios.defaults.timeout = 15000
// export const request = axios.create({
//   baseURL: 'http://52.83.230.236:9001/yszh/1/api/',
// });
import axios from "axios";
// import { bind } from "file-loader";
axios.defaults.timeout = 15000
console.log(window.localStorage.getItem('token'));
//设置请求得基准地址
axios.defaults.baseURL = 'http://52.83.230.236:8084/yszh-antibody'
const request = axios.create();
//设置请求头

axios.defaults.headers['content-type'] ='application/json';
request.interceptors.request.use(config => {
    // 给请求头加token的字段,值为token

    config.headers.accessToken = window.localStorage.getItem('token')
   

    return config
})
  
//导出
export default request;
