Heim > Fragen und Antworten > Hauptteil
sms_code(userInfo).then(function(data){
return res.json(data);
})
.then(function(data){
return res.json(data);
})
.catch(next);
Warum
catch(function(err){
next(err)
})
kann mit
abgekürzt werden.catch(next);
phpcn_u15822017-05-16 13:27:13
catch(function(err){
next(err)
})
等于
catch(next)
function next(err){
}
你说可以么?
阿神2017-05-16 13:27:13
setTimeout(function(){
doSomeSth()
},1000)
setTimeout(doSomeSth,1000);