不支持canvas

promise链式调用

var that = this;
that.hello().then(res => { return that.world(res);
}).then(res => { console.log(res); }) function hello(){ var that = this; var p = new Promise((resolve,reject) => { resolve('hello '); }) return p; } function world(params){ var that = this; var p = new Promise((resolve, reject) => { resolve(`${params}world!`); }) return p; }


posted @   pycmsj  阅读(748)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示