let p1=new Promise((resolve,reject)=>{
this.getList(1).then((res)=>{
resolve(res)
})
})
let p2=new Promise((resolve,reject)=>{
this.getGroupListAll().then((res)=>{
resolve(res)
})
})
let p3=new Promise((resolve,reject)=>{
this.getIotDriverListAll().then((res)=>{
resolve(res)
})
})
Promise.all([p1,p2,p3]).then((results)=>{
console.log("success")
})
js中Promise的使用
最新推荐文章于 2024-07-28 21:06:01 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)