问题1 pages 第一项 必须在 tabBar的list数组中
废话不多说代码
{
"pages": [
// 第一项 内容必须在 tabBar中list数组中的内容
"pages/home/home",
"pages/product/product",
"pages/category/category",
"pages/my/my",
"pages/cart/cart"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#AB956D",
"navigationBarTitleText": "Demo",
"navigationBarTextStyle": "white"
},
"tabBar": {
"list": [
{
// 对应pages的第一项内容
"pagePath": "pages/home/home",
"text": "首页",
"iconPath": "imgs/toolbar/home.png",
"selectedIconPath": "imgs/toolbar/home@selected.png"
},
{
"pagePath": "pages/category/category",
"text": "分类",
"iconPath": "imgs/toolbar/category.png",
"selectedIconPath": "imgs/toolbar/category@selected.png"
},
{
"pagePath": "pages/cart/cart",
"text": "购物车",
"iconPath": "imgs/toolbar/cart.png",
"selectedIconPath": "imgs/toolbar/cart@selected.png"
},
{
"pagePath": "pages/my/my",
"text": "我的",
"iconPath": "imgs/toolbar/my.png",
"selectedIconPath": "imgs/toolbar/my@selected.png"
}
]
}
}
问题2 微信开发者工具 显示设置小于100%,85%即可
看图: