Promise的.then .catch

 

 定义一个promise

Promise的.then .catch

调用promise  如果promise的状态为resolve 则 执行 .then   否则执行.catch

Promise的.then .catch

 

 

可以有多个.then  会按顺序执行  

 

axios.post  可以后面跟多个then

 

Promise的.then .catch

 

相关文章: