3,143
社区成员
发帖
与我相关
我的任务
分享
wx.getSystemInfo({
success: function(res) {
console.log(res.windowWidth);
console.log(res.windowHeight);
},
})
如果需要同步获取则用getSystemInfoSync(方式不同)
两者详细用法如下:https://developers.weixin.qq.com/miniprogram/dev/api/systeminfo.html