1. get请求
let base = ' ' ;
const getRequest = (url,params) =>{
return axios({
url: `${base}${url}`,
method: 'get',
params: params
})
}
2. post请求
const postRequest = (url,params) =>{
return axios({
url: url,
method: 'post',
params: params
})
}