打开app.json,在pages里添加first和readme页面
添加tabBar配置,实现index和readme的切换。代码如下
{
"pages": [
"pages/first/first",
"pages/readme/readme",
"pages/index/index"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "我的KEEP运动",
"navigationBarTextStyle": "black"
},
"tabBar": {
"color": "#a1a1a1",
"selectedColor": "rgb(108, 205, 250)",
"backgroundColor": "#ffffff",
"borderStyle":"black",
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "./assets/icons/hema.png",
"selectedIconPath": "./assets/icons/hema-sel.png",
"text": "运动"
},
{
"pagePath": "pages/readme/readme",
"iconPath": "./assets/icons/mine.png",
"selectedIconPath": "./assets/icons/message.png",
"text": "了解KEEP"
}
]
}
}