844610
var Promise = require('bluebird')
var obj = {
func1: function () {
return 'hehe'
},
func2: function () {
return 'xix'
}
}
console.log("==================================")
Promise.promisifyAll(obj)
obj.func1Async().then(function (result) {
console.log(result)
})
定义一个obj对象,把它promise化,本来想通过异步函数func1Async再调用then可以得到fun1的返回值,结果程序什么输出也没有? 是我理解错了么?求大神解答