小程序模板网

微信小程序tabBar不生效

2018-04-25 多田翁

配置如下:

 

				
  1. {
  2. "pages": [
  3. "pages/index/index",
  4. "pages/mine/mine"
  5. ],
  6. "window": {
  7. "backgroundTextStyle": "light",
  8. "navigationBarBackgroundColor": "#fff",
  9. "navigationBarTitleText": "活动宝",
  10. "navigationBarTextStyle": "black"
  11. },
  12. "tabBar": {
  13. "backgroundColor": "#202020",
  14. "color": "#fff",
  15. "list": [
  16. {
  17. "selectedIconPath": "images/ic_index2.png",
  18. "iconPath": "images/ic_index1.png",
  19. "text": "首页",
  20. "backgroundColor": "#dddddd",
  21. "pagePath":"page/index/index"
  22. },
  23. {
  24. "selectedIconPath": "images/ic_mine2.png",
  25. "iconPath": "images/ic_mine1.png",
  26. "text": "我的",
  27. "backgroundColor": "#dddddd",
  28. "pagePath": "page/mine/mine"
  29. }
  30. ]
  31. }
  32. }

效果图出不来的原因在于:  pagePath节点配置错误,但工具又没有报错。正确的应该为:

 

				
  1. "pagePath": "pages/mine/mine"


易优小程序(企业版)+灵活api+前后代码开源 码云仓库:starfork
本文地址:https://www.eyoucms.com/wxmini/doc/course/24017.html 复制链接 如需定制请联系易优客服咨询:800182392 点击咨询
QQ在线咨询