wx.getSystemInfo({ success: (res) => { wx.createSelectorQuery().select(‘#scrollbox‘).boundingClientRect((rect) => { this.setData({ height: res.windowHeight - rect.top }) }).exec() } })
微信小程序获得高度
原文:https://www.cnblogs.com/wanf/p/11232859.html