zoukankan      html  css  js  c++  java
  • 小程序首页不显示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',
        })
  • 相关阅读:
    if 语句
    变量命名
    python变量
    运算符
    注释
    PyCharm
    python版本,执行
    Tornado 【简述】
    Git 【管理篇】
    MySQL的介绍
  • 原文地址:https://www.cnblogs.com/guangzhou11/p/11203849.html
Copyright © 2011-2022 走看看