wkiwi的博客

小程序苹果11适配

发布时间:9个月前热度: 891 ℃评论数:

目前苹果11上市后微信对苹果11还没有适配不能拿到iphone 11 标识

WechatIMG1.png

曲线救国


let that = this
wx.getSystemInfo({
      success: function (res) {
        // iphoneX 适配
        if (res.model.search('iPhone X') != -1) {
          that.globalData.isIphoneX = true;
        } else {
          that.globalData.isIphoneX = false;
        }
        //iphone11 适配
        if (res.platform.search('ios') != -1) {
          if (res.model.search('unknown') != -1) {
            that.globalData.isIphoneX = true;
          } else {
            that.globalData.isIphoneX = false;
          }
        }
       //后期微信兼容  iphone11 适配
        if (res.model.search('iPhone 11') != -1) {
          that.globalData.isIphoneX = true;
        } else {
          that.globalData.isIphoneX = false;
        }
      }
    })


小程序苹果11适配,iphoneX适配,iphone11适配

手机扫码访问