1 回复
var query = wx.createSelectorQuery()
query.selectViewport().scrollOffset();
query.exec(function (res) { //res返回值为null
console.info(res);
scrollTop = res[0].scrollTop // 显示区域的竖直滚动位置
that.data.scrollTop = scrollTop;
})