微信小程序如何获取屏幕的高度和宽度?

let height = wx.getSystemInfoSync().windowHeight;
let width = wx.getSystemInfoSync().windowWidth;