在app.json里放入tabbar
注释:这里的tabbar不会展示,但是一定要写上
{
"pages": [
"pages/index/index",
"pages/my/index"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "WeChat",
"navigationBarTextStyle": "black"
},
"tabBar": {
"custom": true,
"color": "#7A7E83",
"selectedColor": "#333333",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "assets/img/1.png",
"selectedIconPath": "assets/img/1s.png",
"text": "保单万事通"
},{
"pagePath": "pages/my/index",
"iconPath": "assets/img/2.png",
"selectedIconPath": "assets/img/2s.png",
"text": "保单万事通"
}
]
},
"style": "v2",
"sitemapLocation": "sitemap.json"
}
注意我加了一个属性 "custom": true
,这个如果不加,就只能使用微信自带的tabbar底部导航了&#x