业务要求:需要在多次请求都有返回后再进行页面渲染
function fn() {
const arr1 = [a:1,b:2,c:3]
const arr = arr1.map((val,index) => {
return xxxapi(val.id,{flag:val.flag})
})
Promise.all(arr).then((res) => {
res.map((result,idx) => {
this.$set(a,index,b)
})
}).catch()
}