⼩程序中的app.json⽂件内容注释
⼩程序中的app.json⽂件主要是设置页⾯的路径,页⾯的窗⼝,⽹络超时时间,设置tabBar,是否开启debug模式。
以下是⽂件内的内容注释:
/*
《设置⼩程序页⾯的路径 》
注意事项,不需要设置.css/.html/.js/.json后缀,只需要⼀个⽂件夹名称及⽂件名称就好。
添加新页⾯路径的时候,a设置放在⽂件夹,b也是设置⽂件夹,c是设置⽂件名的名称,⽐如(”product/shopp/shopping“)。这三个不⼀定要⼀样。也可以进⾏这样设置,a设置⽂件夹,b设置⽂件名称,⽐如(”abc/abc“).这两者的区别在于调⽤时路径不⼀样。
Ps:设置最后⼀个页⾯路径⽆需要逗结尾。⽐如(”abc/abc“)
*/
“pages”:
{
}
/*
《窗⼝设置值,window》
*/
“window”:
selectediconpath什么意思
{
“navigationBarTextStyle”: “white”, //设置导航栏标题字体的颜⾊
“navigationBarTitleText”: “汽车保养服务推⼴系统”, // 设置导航栏的标题
“navigationBarBackgroundColor”: “#AB956D”,
“backgroundColor”: “#eeeeee”,
“navigationStyle”:“default”,
“backgroundTextStyle”:“light”,
“backgroundColorTop”:"#984", //设置下拉顶部窗⼝的颜⾊
“backgroundColorBottom”:"#78e", //设置上拉顶部窗⼝的颜⾊
“enablePullDownRefresh”:false, //防⽌页⾯下拉(设置下拉是否刷新) true / false,
“onReachBottomDistance”:10 //设置页⾯上拉触底事件⾄页⾯底部的距离
}
/*
《设置tabBar》
当positon为top的时候,icon图标属性即失效。
ps:下划线颜⾊,则是选择中字体颜⾊即:selectedColor
*/
“tabBar”: {
“color”: “#b7b7b7”, //tab上⾯的⽂字颜⾊“selectedColor”: “#AB956D”, //tab⽂字选中的颜⾊“backgroundColor”: “#f5f5f5”, //tab上⾯的背景颜⾊“borderStyle”: “white”, //tabbar上边框的颜⾊ ( 不是必写)“position”: //设置tab在上还是在下显⽰ ( 不是必写)
“list”: [ //tab列表(最少两个,最多两个)(tab数组集合)
{
“pagePath”: “page/component/index”, //页⾯路径“iconPath”: “image/12.png”, //按钮上⾯的图标“selectedIconPath”: “image/11.png”, //选中tab所显⽰的图标“text”: “主页” //tab上⾯的字
},
{
“pagePath”: “page/component/category/category”,“iconPath”: “image/32.png”,
“selectedIconPath”: “image/31.png”,
“text”: “分类”
}