接收Promise的返回值的方法

第一种:使用.then(res=>{ },err=>{ });

Promise对象.then(res=>{   

},err=>{

});

第二种:使用.then(res=>{ }).catch(err=>{ });

Promise对象.then(res=>{

}).catch(err=>{

});

第三种:使用async、await

async 函数名(){
    await Promise对象;
};

第四种:使用try{ } catch(error) { } + async、await

async 函数名(){
    try{
        await Promise对象;   

    } catch(error){

    }
};