微信小程序配置文件appjson代码编写
1, page里面放置所有和小程序相关的路径
2, window项里可以添加
"enablePullDownRefresh": true, // 允许下拉刷新
"backgroundColor": "#ccc" // 改娈下拉刷新的背景色
3, tabBar 定义底部菜单栏
例如:
"tabBar": {
"selectedColor": "#00ff00", // 定义选中菜单字体的颜色
"borderStyle": "black", // 定义分界线的颜色,只能为black 或 white
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "images/tabbar1.png",
"selectedIconPath": "images/tabbar11.png"
},
{
"pagePath": "pages/logs/logs",
"text": "日志",
"iconPath": "images/tabbar2.png",
"selectedIconPath": "images/tabbar22.png"
}
]
}
4, networkTimeout 超时时间
代码如下:
"networkTimeout": {
"request": 20000,
"connectSocket": 20000,
"uploadFile": 20000,
"downloadFile": 20000
}
5, debug 调试:
"debug": true