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