收藏
回答

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不显示

回答关注问题邀请回答
收藏

9 个回答

  • Qin
    Qin
    2019-12-20

    这个问题就是在与当前页面在tabBar中没有进行配置

    {
      "pages": [
        "pages/home/home",
        "pages/about/about",
        "pages/profile/profile",
        "pages/category/category"
      ],
      "window": {
        "backgroundTextStyle""light",
        "navigationBarBackgroundColor""#ff5777",
        "navigationBarTitleText""Study Demo",
        "navigationBarTextStyle""white",
        "backgroundColor""#fffeee"
      },
      "tabBar": {
        "color""red",
        "selectedColor""blue",
        "backgroundColor""#fffeee",
        "list": [
          {
            "pagePath""pages/home/home",
            "text""首页",
            "iconPath""assets/images/icon/index.png",
            "selectedIconPath""assets/images/icon/index2.png"
          },
          {
            "pagePath""pages/profile/profile",
            "text""text",
            "iconPath""assets/images/icon/index.png",
            "selectedIconPath""assets/images/icon/index2.png"
          },
          {
            "pagePath""pages/category/category",
            "text""分类",
            "iconPath""assets/images/icon/index.png",
            "selectedIconPath""assets/images/icon/index2.png"
          },
          {
            "pagePath""pages/about/about",
            "text""关于我们",
            "iconPath""assets/images/icon/index.png",
            "selectedIconPath""assets/images/icon/index2.png"
          }
        ]
      },
      "networkTimeout": {
        "request"10000,
        "downloadFile"10000
      },
      "debug"true,
      "navigateToMiniProgramAppIdList": ["wxe5f52902cf4de896"],
      "style""v2",
      "sitemapLocation""sitemap.json"
    }
    
    2019-12-20
    有用 1
    回复
  • 鬼面摩咖
    鬼面摩咖
    2019-12-04
    {
      "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 谢谢


    2019-12-04
    有用
    回复
  • Vera
    Vera
    2019-11-08

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

    2019-11-08
    有用
    回复
  • Walker
    Walker
    2019-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"

    }


    2019-09-26
    有用
    回复 2
    • 
      
      2019-09-26
      你这个少参数了,把color、selectedColor都填上,参考https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html
      2019-09-26
      回复
    • Walker
      Walker
      2019-09-26回复
      还是不行
      2019-09-26
      回复
  • 灵芝
    灵芝
    2019-09-25

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

    2019-09-25
    有用
    回复 3
  • จุ๊บ
    จุ๊บ
    2019-09-25

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

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

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

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

    我猜不到

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

    没有任何报错信息???

    2019-09-24
    有用
    回复 1
    • Walker
      Walker
      2019-09-26
      没有报错信息
      2019-09-26
      回复
登录 后发表内容
问题标签