let res = my.getSystemInfoSync()
let clientHeight = res.windowHeight;
let clientWidth = res.windowWidth;
let ratio = 750 / clientWidth;
let height = clientHeight * ratio;
let width = clientWidth * ratio;
获取小程序设备宽高
最新推荐文章于 2024-01-03 10:12:28 发布