您的位置:首页 > 移动开发 > 微信开发

【小程序开发】微信小程序开发中遇到的那些坑...

2016-11-10 10:22 309 查看
第一坑:

设置了三个tabBar,却默认显示第二个,不能展示我的第一个【首页】。

"list": [{
"pagePath":"page/KTGJ/index/index",
"iconPath":"image/icon_component.png",
"selectedIconPath": "image/icon_component_HL.png",
"text": "首页"
}, {
"pagePath": "page/component/index",
"iconPath": "image/icon_component.png",
"selectedIconPath": "image/icon_component_HL.png",
"text": "组件"
}, {
"pagePath": "page/API/index/index",
"iconPath": "image/icon_API.png",
"selectedIconPath": "image/icon_API_HL.png",
"text": "接口"
}]




原因:

tabBar的list的pagePath指定的页面没有写在注册页面第一个。
微信小程序的逻辑是"pages"中的第一个页面是首页,也就是程序启动后第一个显示的页面,
如果tabBar的list的pagePath指定的页面都不是pages的第一个,当然也就不会电视tabBar了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: