- 在app.json中添加
"tabBar": {
"list": [
{
"pagePath": "pages/index/index",
"iconPath":"",
"text": "首页"
},
{
"pagePath": "pages/logs/logs",
"iconPath":"",
"text": "日志"
}
]
},
效果立竿见影
路由(官方文档)
- wx.switchTab(Object object) 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面
- wx.reLaunch(Object object) 关闭所有页面,打开到应用内的某个页面