设置tabbar,position为top:
"tabBar": { "borderStyle": "white", "backgroundColor": "#ffffff", "position": "top", "list": [ { "pagePath": "pages/index/index" }, { "pagePath": "pages/index/map" }, { "pagePath": "pages/team/index" }, { "pagePath": "pages/mine/index" } ] } |
在app.js的onLaunch方法中隐藏掉tabbar:
onLaunch: function(options) { // Do something initial when launch. var that = this; wx.hideTabBar() wx.getSystemInfo({ success: function(res) { var model = res.model; if (res.system.indexOf('iOS') > -1) { that.globalData.isiOS = true } if (model.indexOf('iPhone X') > -1) { that.globalData.isIpx = true } } }) }, |
在大部分手机中,tabbar都不占位,但是个别手机中,顶部会有空白占位(下图蓝色框的部分):
有问题的测试机信息为:

也出现了这个问题, iphone 7 微信版本:6.7.0
在oppo a73上的运行效果截图:
提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
机型和微信版本上面帖子里有,代码片段我有空写一点
代码片段:https://developers.weixin.qq.com/s/TqayMnm87w3S
反馈收到