const promiseArray = [
Service.getComprehensive(),
Service.getWorkFormStatistics()
]
// 容错处理
const handlePromise = Promise.all(
promiseArray.map((promiseItem: any) => {
return promiseItem.catch((err: Error) => {
return err
})
})
)
handlePromise
.then((res: any) => {
})
.catch((err: Error) => {
$this._tipErr(err)
})
}
网友评论