微信小程序 | 隐藏底部菜单栏 json中的tabBar


个人记录

微信小程序 | 隐藏json中的tabBar


一、小程序的app.json中的底部菜单设置

底部菜单栏:
在这里插入图片描述
代码:

{
  "pages": [
    "pages/index/index",
    "pages/login/login"
  ],
  "window": {
    "backgroundTextStyle": "light",
    "navigationBarBackgroundColor": "#fff",
    "navigationBarTitleText": "微信小程序",
    "navigationBarTextStyle": "black"
  },
  "tabBar": {
    "color": "#AAAAAA",
    "selectedColor": "#26BAEE",
    "backgroundColor": "#fff",
    "borderStyle": "white",
    "list": [
      {
        "selectedIconPath": "image/index/ic_home-select.png",
        "iconPath": "image/index/ic_home@2x.png",
        "pagePath": "pages/index/index",
        "text": "首页"
      },
      {
        "selectedIconPath": "image/index/ic_market-select.png",
        "iconPath": "image/index/ic_market@2x.png",
        "pagePath": "pages/market/market",
        "text": "广告超市"
      },
      {
        "selectedIconPath": "image/index/ic_order-select.png",
        "iconPath": "image/index/ic_order@2x.png",
        "pagePath": "pages/order/order",
        "text": "订单"
      },
      {
        "selectedIconPath": "image/index/ic_user-select.png",
        "iconPath": "image/index/ic_user@2x.png",
        "pagePath": "pages/user/user",
        "text": "我的"
      }
    ]
  },
  "sitemapLocation": "sitemap.json",
  "permission": {
    "scope.userLocation": {
      "desc": "你的位置信息将用于小程序位置接口的效果展示"
    }
  },
  "networkTimeout": {
    "request": 5000
  }
}


二、隐藏tabBar

代码:

wx.hideTabBar()-- 隐藏底部按钮

使用微信小程序API中的 wx.hideTabBar() 方法,直接调用即可
在这里插入图片描述


三、效果图

在这里插入图片描述


欢迎关注公众号:慌途L
后面会慢慢将文章迁移至公众号,也是方便在没有电脑的情况下可以进行翻阅,更新的话会两边同时更新,大家不用担心!
在这里插入图片描述


  • 2
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值