小程序首页不显示tabbar


代码:

{
  "pages":[
    "pages/index/index",
    "pages/swipe/swipe",
    "pages/movies/movies",
    "pages/swipe/swipe-detail/swipe-detail",
    "pages/logs/logs"
  ],
  "requiredBackgroundModes": [
    "audio"
  ],
  "window":{
    "backgroundTextStyle":"light",
    "navigationBarBackgroundColor": "#405f80",
    "navigationBarTitleText": "WeChat",
    "navigationBarTextStyle":"black"
  },
  "tabBar": {
    "borderStyle": "white",
    "position": "bottom",
    "list": [
      {
        "pagePath": "pages/index/index",
        "text": "首页",
        "iconPath": "images/tab/ciwei.png",
        "selectedIconPath": "images/tab/ciwei_hl.png"
      },
      {
        "pagePath": "pages/swipe/swipe",
        "text": "阅读",
        "iconPath": "images/tab/yuedu.png",
        "selectedIconPath": "images/tab/yuedu_hl.png"
      },
      {
        "pagePath": "pages/movies/movies",
        "text": "电影",
        "iconPath": "images/tab/dianying.png",
        "selectedIconPath": "images/tab/dianying_hl.png"
      }
    ]
  }
}

注意:

pages/index/index   这个路径 跟 list 的 第一个对象的路径相同

跳转到tabar 选项页面:

 //打开一个新页面
    wx.switchTab({
      url: '../swipe/swipe',
    })

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM