标签:flag eject mis return res ISE amp console turn
1 save1(){ 2 return new Promise((resolve, reject)=> { 3 console.log(‘ajax1‘) 4 }) 5 } 6 7 save2(){ 8 return new Promise((resolve, reject)=> { 9 console.log(‘ajax2‘) 10 resolve(true) 11 }) 12 } 13 14 同时发送两个ajax请求: 15 async saveAll() { 16 const flag1 = await this.save1() 17 const flag2 = await this.save2() 18 if (flag1 && flag2) { 19 console.log(‘allSuccess‘) 20 console.log(‘nextAjax‘) 21 } 22 }
标签:flag eject mis return res ISE amp console turn
原文地址:https://www.cnblogs.com/wuting/p/9820856.html