1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| const p1 = new Promise((resolve, reject) => { setTimeout(() => { resolve('start') }, 1000); });
p1.then((result) => { console.log('a', result); return Promise.reject('中断后续调用'); }).then(result => { console.log('b', result); }).then(result => { console.log('c', result); }).catch(err => { console.log(err); });
|