import axios from 'axios'
if (process.env.NODE_ENV === 'development') {
    axios.defaults.baseURL = '/api'
} else if (process.env.NODE_ENV === 'production') {
    axios.defaults.baseURL = '/api'
}
// 设置请求头参数 common 为设置所有的接口  post为设置post请求的接口
// axios.defaults.headers.common['Authorization'] = `Bearer ${localStorage.getItem('access_token')}`;

//查询数据
export const getData = (params) => {
    return axios.get('/Handler/Data.ashx', {
        params
    })
};
