获取设备信息: wx.getSystemInfo
model:手机型号
pixelRatio:设备像素比
windowWidth:窗口宽度
windowHeight:窗口高度
language:语言
version:微信版本号
btnclick:function(){
wx.getSystemInfo({
success:function(res){
console.log(res);
console.log(res.model);
console.log(res.pixelRatio);
console.log(res.windowWidth);
};
});
}