微信小程序测量手机屏幕大小-微信有没有测量距离的小程序-微信小程序ibeacon
1.
首先获取适配器信息,用getSystemInfoSync()然后.windowHeight获取高度,.windowWindth获取宽度。
varsysInfowx.getSystemInfoSync();console.log(sysInfo);varwinHeightsysInfo.windowHeight;varwinLengthsysInfo.windowWidth;console.log(winHeight);console.log(winLength);2.这个运行的结果是:
3.我这个是iPhone6的适配,屏幕信息就console出来了,高为603宽为375。
4.关键在于测量设备信息是用wx.getSystemInfoSync()。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

