像下面这样写两个互相依赖的ajax操作,refreshStatus函数内部没有拿到getDesktopList的返回结果:
var promise = Promise.resolve()
promise
.then(this.getDesktopList())
.then(this.refreshStatus())
.catch(function() {})
像下面这样写两个互相依赖的ajax操作,refreshStatus函数内部没有拿到getDesktopList的返回结果:
var promise = Promise.resolve()
promise
.then(this.getDesktopList())
.then(this.refreshStatus())
.catch(function() {})
this.getDesktopList()也要返回promise对象哦。