怎么判断是苹果设备?

小程序 文章 2022-03-29 09:20 347 0 全屏看文

AI助手支持GPT4.0

怎么判断是苹果设备?How can you tell if it's an Apple device?

怎么判断是苹果设备?
wx.getSystemInfo({  success(res) {	if (res.platform == "ios" || res.system.indexOf('os') > 0 || res.system.indexOf('OS') > 0) {        	console.log('苹果')				} else {		console.log('安卓')			}    }})我的代码是这样判断苹果设备的,但是提交审核后,不在苹果中展示的业务,审核员端还是展示出来了,请问正确的判断方式是什么?

wx. getSystemInfo({ success(res) { if (res.platform == "ios" || res.system.indexOf('os') > 0 || res.system. indexOf('OS') > 0) { console. Log ('apple ') } else { console. Log ('android ') } }}) My code judges Apple Devices in this way, but after submitting for audit, the business that is not displayed in apple is still displayed on the auditor side. What is the correct judgment method?

回答:

brave:
  isDev() {    return wx.getSystemInfoSync().platform.toLowerCase().indexOf("devtools") > -1  }  isIOS() {    return wx.getSystemInfoSync().platform.toLowerCase().indexOf("ios") > -1  }  isAndroid() {    return wx.getSystemInfoSync().platform.toLowerCase().indexOf("android") > -1  }  isIPad() {    return wx.getSystemInfoSync().platform.toLowerCase().indexOf("ipad") > -1  }
老张:
initSys: function () {    console.log(app.globalData.systemInfo = wx.getSystemInfoSync())    app.globalData.isIOS = app.globalData.systemInfo.system.substring(0, 3) == 'iOS'  },
鲈鱼🐳:

审核人员用的是真机,还是模拟器?

-EOF-

AI助手支持GPT4.0


三叔工具箱

摸鱼人热门新闻聚合

开发者在线工具

第三方支付技术请加QQ群

相关文章
急!累计独立访客(UV)已过1000,无违规情况,但是流量主开通还是显示灰色?anxious! The cumulative number of unique visitors (UV) has exceeded 1000 and there is no violation, but the traffic master is still displayed in gray?
企业微信创建审批501 Not Implemented异常
收到联系人变更后,查询联系人信息,报错84061,过会儿时间再查询正常,是因为延迟?
getPhoneNumber:fail Access is denied是为什么,是否未认证?
请问一下,什么条件下才可以申请获取当前的地理位置、速度 权限?
随便看看
教育科技公司申请微信支付被拒绝? 3607
微信公众号免300认证教程 4897
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 3919
小程序广告组件通过审核,但是小程序内没有显示广告? 4091
企业微信通讯录账号被管理员误/恶意删除,怎么办? 7932
问题? 7158
如何快速搭建抽奖助手小程序(无需代码知识) 4965
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 5924
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5453
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5152