Solve the problem that the WeChat applet tabBar does not display

In the first case, csutom:true is set, which means to start a custom tarBar. After startup, it will no longer recognize the tarBar configuration in app.json

//解决办法:设置custom:false,就可以了
 "tabBar": {
    "custom": false,//关闭自定义tarBar
  }

In the second case, the pagePath address set in the tarBar attribute needs to be displayed on the top default home page in the pages parameter. as follows

"pages": [
    "pages/index/index",//默认首页
    "pages/successPage/successPage",
    "pages/logs/logs"
  ],
  "tabBar": {
    "list": [
      {
        "pagePath": "pages/index/index", //默认首页
        "text": "首页",
        "iconPath": "/images/tabs/home.png",
        "selectedIconPath": "/images/tabs/home-active.png"
      },
      {
        "pagePath": "pages/successPage/successPage",
        "text": "授权",
        "iconPath": "/images/tabs/my.png",
        "selectedIconPath": "/images/tabs/my-active.png"
      }
    ]
  },

Guess you like

Origin blog.csdn.net/Ghjkku/article/details/128880723