问题原因:小程序json中tab的颜色只支持二进制
代码如下:
关键代码为;
"backgroundColor":
"#ffffff",
"color":
"#000000",
"selectedColor":
"#C62724"
json;
"tabBar": {
"list": [
{
"pagePath":
"pages/shouye/shouye",
"text":
"首页",
"iconPath":
"/images/shouye_gray.png",
"selectedIconPath":
"/images/shouye_red.png"
},
{
"pagePath":
"pages/fenlei/fenlei",
"text":
"分类",
"iconPath":
"/images/fenlei_gary.png",
"selectedIconPath":
"/images/feilei_red.png"
},
{
"pagePath":
"pages/dianpu/dianpu",
"text":
"店铺"
},
{
"pagePath":
"pages/gouwuche/gouwuche",
"text":
"购物车",
"iconPath":
"/images/car_gray.png",
"selectedIconPath":
"/images/car_red.png"
},
{
"pagePath":
"pages/my/my",
"text":
"我的",
"iconPath":
"/images/wode_gray.png",
"selectedIconPath":
"/images/wode_red.png"
}
],
"backgroundColor":
"#ffffff",
"color":
"#000000",
"selectedColor":
"#C62724"
}