1.axios中get和post,config的位置,get请求在第二个,post请求在第三个
2.api和method中写法
//事件导出
exportAllEvent:params=>axiosBaseInstance.get('/url', params),
//method中
api.exportAllEvent(
{
headers: {
'Content-Type': 'application/vnd.ms-excel;charset=utf-8'
},
responseType: 'blob' //设置响应的数据类型为一个包含二进制数据的 Blob 对象,必须设置
}).then(res =>
3.get请求中传@RequestParam,axios中如何传参
finishEvent: params => axiosBaseInstance.get('/api', { params }),
api.finishEvent({ eventId }).then((res) =>