微信小程序tabbar不显示解决办法

微信小程序tabbar不显示解决办法

"pages":[ 
  "pages/logs/logs", 
  "pages/index/index" 
 ], 

微信小程序在测试tabbar的时候怎么都不显示。

我就不贴api了。直接上代码

{ 
 "pages":[ 
  "pages/logs/logs", 
  "pages/index/index" 
 ], 
 "window":{ 
  "backgroundTextStyle":"light", 
  "navigationBarBackgroundColor": "#fff", 
  "navigationBarTitleText": "小程序", 
  "navigationBarTextStyle":"black" 
 }, 
 "tabBar":{ 
  "selectedColor":"#dddddd", 
  "color": "#3cc51f", 
  "backgroundColor":"#ffffff", 
  "list":[{ 
   "text" : "登录", 
   "pagePath" : "pages/logs/logs", 
   "iconPath" : "image/12.png", 
   "selectedIconPath" : "image/12.png" 
  },{ 
   "text":"注销", 
   "pagePath" : "pages/index/index", 
   "iconPath" : "image/12.png", 
   "selectedIconPath" : "image/12.png" 
  },{ 
   "text" : "日志", 
   "pagePath" : "pages/logs/logs", 
   "iconPath" : "image/12.png", 
   "selectedIconPath" : "image/12.png" 
  }] 
 } 
} 

这个json看了一天,直觉告诉我没什么问题。实际上也没什么问题。

但是坑爹的一幕来了,tabbar怎么都不显示。最后发现是

"pages":[ 
  pages/logs/logs", 
  "pages/index/index" 
 ], 

看标红的问题。第一行绝对是不能配置为"pages/index/index"。所以我换成了pages/logs/logs要不然是不会显示tabbar的

感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!