The applet gets the width and height of the device

wx.getSystemInfoSync()//获取设备信息
wx.getSystemInfoSync().windowWidth//获取设备宽度

Guess you like

Origin blog.csdn.net/xiaokangna/article/details/124959554