axios.all([
axios({
url:'',
params:{}
}),
axios({
url:'',
params:{}
})
]).then(res => {
//res 是一个数组
console.log(res);
})
-------------------
axios.all([
axios({
url:'',
params:{}
}),
axios({
url:'',
params:{}
})
]).then(axios.spread((res1,res2) => {
console.log(res1);
console.log(res2);
}))