获取设备信息时得到的窗口高度宽度是px为单位的。  在实际使用时,一般使用rpx ,中间要有个转换过程.

代码如下:

wx.getSystemInfo({
success:function (res) {
console.log(res.windowHeight) // 获取可使用窗口高度
let windowHeight = (res.windowHeight * (750 / res.windowWidth));
console.log(windowHeight) //获得rpx单位的窗口高度
}
})