동시에 복수의 요청을 송신
Axios.all([request1, request2, request3]) .then( Axios.spread((res1, res2, res3) => { console.log('全部加载完成') }) ) .catch(err => { console.log(err.response) });
호출 모든 요청의 완료 후, 기능을 Axios.spread 및 데이터 매개 변수에 대응할 수있다 요청합니다.
불확실한 요청을 보낼 때
사용지도 Axios.all 결합
Axios.all(arr.map(function (data)=>{ return this.axios.post(....) })) .then( Axios.spread((...a) => { console.log('全部加载完成') }) ) .catch(err => { console.log(err.response) });
도착가요 배열 약속대로 복귀지도에있어서의 복수의 변경한다.