收藏
回答

tabBar在iPhone6P兼容问题

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug tabBar 微信iOS客户端 7.0.5 2.7.7

录制了一个视频,里面有描述的问题,点击链接

iPhone6P,预览打开小程序,tabBar开始有的,然后授权登录再跳回到首页,tabBar不显示了,再次扫码进入小程序会显示,或者打开调试也显示tabBar。换成安卓机器或者iPhoneX都没有问题。请问,有遇到类似问题的吗?

最后一次编辑于  2019-07-30
回答关注问题邀请回答
收藏

2 个回答

  • 疯狂的小辣椒
    疯狂的小辣椒
    2019-07-30

    你好,麻烦提供复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)

    2019-07-30
    有用
    回复 2
    • Modi
      Modi
      2019-07-30

      首页,app.js里判断是否登录,未登录的话,wx.reLaunch 到登录页面,完成授权后wx.reLaunch 到首页pages/index/index 。就是这个过程后,回到首页,tabBar不显示了,只能重新编译一个新二维码的扫码进入才可以出现tabBar。

      这个是判断是否登录的方法:

      checkLogin: function() {
              this.globalData.openid = wx.getStorageSync('openid')
              if (!this.globalData.openid) {
                  wx.reLaunch({
                      url: '/pages/common/login'
                  })
              } else {
                  wx.request({
                      url: this.globalData.apiUrl + "&do=AppUserInfo",
                      data: {
                          openid: this.globalData.openid
                      },
                      method: 'post',
                      success: function(res) {
                          if(res.data == ""){
                              wx.clearStorage()
                              wx.reLaunch({
                                  url: '/pages/common/login'
                              })
                          }else{
                            wx.setStorageSync("userInfo", res.data.userInfo)
                                 
                          }
                      }
                  })
              }

          }


      onGotUserInfo: function (e) {

          if (e.detail.rawData) {
              wx.showLoading({
                  title: '正在登录……',
                  mask: true
              })
              wx.login({//login流程
                  success: function (res) {//登录成功
                      if (res.code) {
                          //请求服务器
                          var agent_openid = ""
                          if (wx.getStorageSync('agent_openid'))
                              agent_openid = wx.getStorageSync('agent_openid')
                          wx.request({
                              url: appInfo.globalData.apiUrl + "&do=AppWechatLogin",
                              data: {
                                  code: res.code,
                                  userInfo: e.detail.rawData,
                                  agent_openid: agent_openid
                              },
                              method: 'post',
                              success: function (res2) {
                                  // success
                                  wx.setStorageSync('openid', res2.data.openid)
                                  wx.hideLoading()
                                  wx.reLaunch({
                                      url: '/pages/index/index'
                                  })
                              }
                          });
                      } else {
                          wx.showToast({
                              title: '登陆失败!',
                              mask: true,
                              icon: 'none'
                          })
                      }
                  }
              });
          } else {
              wx.showToast({
                  title: '登陆失败!',
                  icon: 'none'
              })
          }
      },

      以上是登录的方法

      2019-07-30
      回复
    • 疯狂的小辣椒
      疯狂的小辣椒
      2019-07-30回复Modi

      先看下代码片段的介绍,然后提供可复现问题的demohttps://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

      2019-07-30
      回复
  • 铭锋科技
    铭锋科技
    2019-07-30

    刚用6P试了下没有复现

    2019-07-30
    有用
    回复 3
    • Modi
      Modi
      2019-07-30
      点击这个链接,问题显示。https://v.youku.com/v_show/id_XNDI5MzI0NTY0NA==.html?spm=a2h3j.8428770.3416059.1
      2019-07-30
      回复
    • Modi
      Modi
      2019-07-30

      问题复现 ,点击查看


      2019-07-30
      回复
    • 浪里格啷
      浪里格啷
      2019-09-16回复Modi
      您好,请问这个问题解决了吗?我现在也遇到这个问题
      2019-09-16
      回复
登录 后发表内容