appData里面有值,为什么打印是null
发布于 5 年前 作者 min60 8890 次浏览 来自 问答

onReady: function () {

var that = this;

wx.getStorage({

key: ‘driver’,

success: function (res) {

that.setData({

driver: res.data,

groupId: res.data.groupId

})

},

})

console.log(this.data.groupId);

wx.request({

url: http://localhost:8082/wx/getVideoList/,

data: {

groupId: that.data.groupId

},

success(res) {

console.log(res)

}

})

},

2 回复

可以使用 await async   了解下es的异步吧

异步的问题

回到顶部