1.promise.then返回值
then()的返回值:
1.回调函数return 任意数值 或者 不返回数据(返回ndefined) 时,then()方法返回的是一个状态为Fulfilled状态的promise对象
2.回调函数return promise* 返回一个promise对象时, then()方法返回的是这个promise对象 (状态由这个promise决定 可能是Fulfilled 也可能是Rejected)
3.回调函数throw error 抛出错误, then()方法返回的是一个状态为Rejected的promise对象
4.then()方法没有执行里面的任何一个回调函数时,返回当前这个promise对象
2.await async
https://www.bilibili.com/video/BV1mb4y1D7hH?p=1&share_medium=android&share_plat=android&share_session_id=66d5a9a4-f91a-4b9d-8080-ad8d60a62275&share_source=WEIXIN&share_tag=s_i×tamp=1638881090&unique_k=UcDhJlX