标签:log console resolve ret 链式 params return ons ams
that.test1().then(res => {
return that.test2(res);
}).then(res => {
console.log(res);
})
test1(){
var that = this;
var p = new Promise((resolve,reject) => {
resolve(‘hello ‘);
})
return p;
},
test2(params){
var that = this;
var p = new Promise((resolve, reject) => {
resolve(`${params}world!`);
})
return p;
},
标签:log console resolve ret 链式 params return ons ams
原文地址:https://www.cnblogs.com/pycmsj/p/12118528.html