这个问题就是在与当前页面在tabBar中没有进行配置
{
"pages": [
"pages/home/home",
"pages/about/about",
"pages/profile/profile",
"pages/category/category"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#ff5777",
"navigationBarTitleText": "Study Demo",
"navigationBarTextStyle": "white",
"backgroundColor": "#fffeee"
},
"tabBar": {
"color": "red",
"selectedColor": "blue",
"backgroundColor": "#fffeee",
"list": [
{
"pagePath": "pages/home/home",
"text": "首页",
"iconPath": "assets/images/icon/index.png",
"selectedIconPath": "assets/images/icon/index2.png"
},
{
"pagePath": "pages/profile/profile",
"text": "text",
"iconPath": "assets/images/icon/index.png",
"selectedIconPath": "assets/images/icon/index2.png"
},
{
"pagePath": "pages/category/category",
"text": "分类",
"iconPath": "assets/images/icon/index.png",
"selectedIconPath": "assets/images/icon/index2.png"
},
{
"pagePath": "pages/about/about",
"text": "关于我们",
"iconPath": "assets/images/icon/index.png",
"selectedIconPath": "assets/images/icon/index2.png"
}
]
},
"networkTimeout": {
"request": 10000,
"downloadFile": 10000
},
"debug": true,
"navigateToMiniProgramAppIdList": ["wxe5f52902cf4de896"],
"style": "v2",
"sitemapLocation": "sitemap.json"
}