array.push(api.post())
array.push(api.get())
Promise.all(array).then(resArr=>{
resArr.forEach(res=>{
console.log(res)
})
})
在.then后面判断做下一步操作
array.push(api.post())
array.push(api.get())
Promise.all(array).then(resArr=>{
resArr.forEach(res=>{
console.log(res)
})
})
在.then后面判断做下一步操作