import axios from "axios";
const service = axios.create({
    baseURL:'https://api.ijolijoli.com/',
    timeout: 5000,
});

// request拦截器
axios.interceptors.request.use(
    config => {
        return config;
    },
    error => {
        return Promise.resolve(err)
    }
);

// 响应拦截器
axios.interceptors.response.use(
    res => {
        console.log(res)
    },
    error => {
        console.log(error)
        return Promise.reject(error);
    }
);

export default service;