小程序判断ios还是android

const info = wx.getSystemInfoSync()
if (info.platform === 'android') {
  // android 需要执行的代码
} else {
  // ios 需要执行的代码
}

相关文章: