小程序监听当前的设备是ios,还是 安卓设备名称以及型号

时间:2020-05-29 17:15:52   收藏:0   阅读:92

微信开发文档提供监听 当前得设备,通过

//方法 1
const curPhone = wx.getSystemInfo();//获取当前得设备
console.log(curPhone)

  //方法 2

const res = wx.getSystemInfoSync();
console.log(res)//res对象中对应得具体属性值 可参考 微信开发者文档

  

原文:https://www.cnblogs.com/lvxisha/p/12987998.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!