收藏
回答

tabBar无法显示?

  "tabBar": {

    "position":"bottom",

    "list": [{

      "pagePath": "pages/logs/logs",

      "text": "left",

      "iconPath": "assets/images/icons/arrow_left.png",

      "selectedIconPath": "assets/images/icons/page_first.png"

    },{

      "pagePath": "pages/home/home",

      "text": "right",

      "iconPath": "assets/images/icons/arrow_right.png",

      "selectedIconPath": "assets/images/icons/page_last.png"

    }]

设置如上,对应路径都有相应的icon图片,但是tabBar不显示

最后一次编辑于  09-24
回答关注问题邀请回答
收藏

8 个回答

  • 社区技术运营专员-灵芝
    社区技术运营专员-灵芝
    09-25

    麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

    09-25
    赞同
    回复 3
  • 鬼面摩咖
    鬼面摩咖
    星期三 11:00
    {
      "pages": [
        "pages/index/index",
        "pages/course/course",
        "pages/weibo/weibo",
        "pages/logs/logs",
        "images/tabber"
      ],
      "window": {
        "backgroundTextStyle": "dark",
        "navigationBarBackgroundColor": "#ccc",
        "navigationBarTextStyle": "black",
        "navigationStyle": "default",
        "navigationBarTitleText": "微信接口功能演示",
        "backgroundColor": "pink",
        "enablePullDownRefresh": true
      },
      "tabBar": {
        "color": "#8a8a8a",
        "selectedColor": "#1AAD16",
        "list": [
          {
            "pagepath":"pages/index/index",
            "text": "微信",
            "iconpath": "images/tabbar/tabbar.png",
            "selectedIconpath": "images/tabbar/tabbar1selected.png"
          },
          {
            "pagePath": "pages/course/course",
            "text": "通讯录",
            "iconpath": "images/tabbar/通讯录.png",
            "selectedIconpath": "images/tabbar/通讯录selected.png"
          },
          {
            "pagePath": "pages/weibo/weibo",
            "text": "发现",
            "iconpath": "images/tabbar/发现.png",
            "selectedIconpath": "images/tabbar/发现selected.pn"
          },
          {
            "pagePath": "pages/logs/logs",
            "text": "我",
            "iconpath": "images/tabbar/我.png",
            "selectedIconpath": "images/tabbar/我selected.png"
          }
        ]
      },
      "sitemapLocation": "sitemap.json"

    }




    错误信息:VM248:1 appJSON["tabBar"]["list"][0]["pagePath"] 字段需为 string


    自己研究了半天没找到bug 谢谢


    星期三 11:00
    赞同
    回复
  • V
    V
    11-08

    你怎么解决的啊,我也遇到这问题了

    11-08
    赞同
    回复
  • Walker
    Walker
    09-26

    {

     "pages": [

        "pages/login/login",

        "pages/home/home",

        "pages/logs/logs",

        "pages/about/about"

      ],

      "window": {

        "backgroundTextStyle": "light",

        "navigationBarBackgroundColor": "#ff5777",

        "navigationBarTitleText": "WeChat",

        "navigationBarTextStyle": "black",

        "enablePullDownRefresh": false

      },

      "tabBar": {

        "position":"bottom",

        "list": [{

          "pagePath": "pages/login/login",

          "text": "left",

          "iconPath": "assets/images/icons/arrow_left.png",

          "selectedIconPath": "assets/images/icons/page_first.png"

        },{

          "pagePath": "pages/logs/logs",

          "text": "right",

          "iconPath": "assets/images/icons/arrow_right.png",

          "selectedIconPath": "assets/images/icons/page_last.png"

        }]

      },

      "sitemapLocation": "sitemap.json"

    }


    09-26
    赞同
    回复 2
    • Xpt
      Xpt
      09-26
      你这个少参数了,把color、selectedColor都填上,参考https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html
      09-26
      回复
    • Walker
      Walker
      09-26回复Xpt
      还是不行
      09-26
      回复
  • จุ๊บ
    จุ๊บ
    09-25

    我猜 你的首页并不是logs页面,而是其他页面

    09-25
    赞同
    回复 2
    • Walker
      Walker
      09-26
      换成首页面,也不显示
      09-26
      回复
    • จุ๊บ
      จุ๊บ
      09-27回复Walker

      提供代码片段吧,你贴代码,也看不出啥问题

      09-27
      回复
  • o0o有脾气的酸奶
    o0o有脾气的酸奶
    09-25

    我猜不到

    09-25
    赞同
    回复
  • Xpt
    Xpt
    09-25
    图片地址前面加个/看看,是不是路径问题
    09-25
    赞同
    回复 1
    • Walker
      Walker
      09-26
      不起作用
      09-26
      回复
  • 拾忆
    拾忆
    09-24

    没有任何报错信息???

    09-24
    赞同
    回复 1
    • Walker
      Walker
      09-26
      没有报错信息
      09-26
      回复
问题标签