微信小程序小技巧《十九》实现图片高度自适应
发布时间:2019-12-16 21:40:59作者:admin点击:
文档出处:https://mp.weixin.qq.com/debug/wxadoc/dev/api/systeminfo.html#wxgetsysteminfoobject
运行于app.js,全局保存
// 设备信息
wx.getSystemInfo({
success: function(res) {
that.screenWidth = res.windowWidth;
}
});