Promise.then()链式调用
new Promise(function(resolve, reject){
//异步调用成功
resolve(传递给then的参数);
//异步调用失败
reject(传递给catch的参数);
}).then(function(resolve传递过来的参数){
return new Promise(function(resolve, reject){
//异步调用成功
resolve(传递给then的参数);
//异步调用失败
reject(传递给catch的参数);
});
}).then(function(resolve传递过来的参数){
return new Promise(function(resolve, reject){
//异步调用成功
resolve(传递给then的参数);
//异步调用失败
reject(传递给catch的参数);
});
});