wx.getSystemInfo
接口:
getSystemPlatform:function(){ var that = this; wx.getSystemInfo({ success:function(res){ if(res.platform == "devtools"){ //PC }else if(res.platform == "ios"){ //IOS }else if(res.platform == "android"){ //android } } }) },官方文档:https://developers.weixin.qq.com/miniprogram/dev/api/base/system/system-info/wx.getSystemInfo.html
部分素材资源来源网站,本站提供免费下载,如有侵权请联系站长马上删除!