首先在app.json中添加以下代码
"tabBar": {
"color": "#cdcdcd",//为本未选中shihou的颜色
"selectedColor": "#ec6376",//为本选中时的颜色
"borderStyle": "#f3c4cb",//边框颜色
"list": [
{
"selectedIconPath": "pages/img/home.png",//选中时的图标路径
"iconPath": "pages/img/home1.png",//未选中的路径
"pagePath": "pages/index/index",//要加载的页面路径
"text": "推荐"//显示的文本
},
{
"selectedIconPath": "pages/img/shoucang.png",
"iconPath": "pages/img/shoucang1.png",
"pagePath": "pages/shoucang/shoucang",
"text": "收藏"
}
]
}