微信小程序判断ios还是android

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

 

posted @ 2021-11-20 11:41  辉仔的前端之路  阅读(801)  评论(0)    收藏  举报