微信小程序获取屏幕高度和手机系统信息
1、获取手机系统函数是
wx.getSystemInfo
我们来测试一下他都能获取到什么?

2、res.model是手机的型号,
res.brand是手机的品牌,品牌必须真机测试。

3、手机屏幕宽度和高度。
console.log(res.screenWidth)//手机屏幕宽度
console.log(res.screenHeight)//手机屏幕高度

4、console.log(res.windowWidth)//手机屏幕可用宽度
console.log(res.windowHeight)//手机屏幕可用高度
手机可用屏幕宽度和可用高度。

5、console.log(res.statusBarHeight)//状态栏高度
console.log(res.system)//系统版本号

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:122
阅读量:46
阅读量:35
阅读量:78
阅读量:185