官方文档
app.json配置说明文档官方地址:
https://developers.weixin.qq.com/miniprogram/dev/framework/config.html
1. pages:页面路径列表
{
#页面路径列表
"pages": [
"pages/index/index",
"pages/logs/index"
],
2. window:全局窗口表现
#全局的默认窗口表现
#设置小程序的状态栏、导航条、标题、窗口背景色
"window": {
#导航栏标题文字内容
"navigationBarTitleText": "Demo",
#导航栏背景颜色,如 #000000
"navigationBarBackgroundColor": "#F6F6F6",
#导航栏标题颜色,仅支持 black / white
"navigationBarTextStyle": "black",
#窗口的背景色,支支持16进制的颜色 HexColor
"backgroundColor": "#F6F6F6",
#下拉 loading 的样式,仅支持 dark / light
"backgroundTextStyle": "light",
#是否开启当前页面的下拉刷新。
"enablePullDownRefresh": "false",
},
3. tabBar: 页面导航
#页面导航栏
"tabBar": {
#tab 上的文字默认颜色,仅支持十六进制颜色
"color": "#7A7E83",
#tab 上的文字选中时的颜色,仅支持十六进制颜色
"selectedColor": "#3cc51f",
#tabbar上边框的颜色, 仅支持 black / white
"borderStyle": "black",
#tab 的背景色,仅支持十六进制颜色
"backgroundColor": "#ffffff",
#tabBar的位置,默认:bottom,仅支持 bottom / top
"position":"bottom",
#是否开启自定义tabBar,默认:不开启,详情见官方文档
"custom":"false",
# list中的按钮最多5个,最少2个
"list": [
{
#页面路径,必须在 pages 中先定义
"pagePath": "pages/index/index",
#tab 上按钮文字
"text": "首页",
#图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px,不支持网络图片。当 postion 为 top 时,不显示 icon。
"iconPath": "image/icon_component.png",
#选中时的图片路径,其要求和iconPath相同
"selectedIconPath": "image/icon_component_HL.png",
},
{
"pagePath": "pages/logs/logs",
"text": "日志"
}
]
},
4. 各类网络请求的超时时间
"networkTimeout": {
"request": 10000,
"downloadFile": 10000
},
5. 在开发者工具中开启 debug 模式
"debug": true,