1.在onReady()中执行计算方法 设置scrll-view高度
- 思路:计算实际高度=窗口高度(wx.getSystemInfoSync().windowHeight)- 不滑动界面的高度
var obj = wx.createSelectorQuery();
obj.selectAll('.head,.bottom').boundingClientRect(function(rect) {
let height = wx.globalData.windowHeight - rect[0].height - rect[1].height + "px"
that.setData({
height: height
})
})
obj.exec();