⼩程序app.json详细介绍
⼩程序 app.json 详细介绍
{
// 写各个页⾯的路径 (新增页⾯或者减少页⾯都要对其进⾏修改)
"pages": [
"pages/index/index",
"pages/logs/index"
],
// ⽤于设置⼩程序状态栏导航条标题窗⼝背景⾊ (也可以在单个页⾯中配置 [page.json])
"window": {
"navigationBarBackgroundColor": "HexColor",                // 导航栏背景⾊
"navigationBarTextStyle": "HexColor",                      // 导航栏标题颜⾊
"navigationBarTitleText": "String",                        // 导航栏标题⽂字内容
"navigationStyle": "default",                              // 导航栏样式(default/custom)custom 模式可⾃定义导航栏,只保留右上⾓胶囊状的按钮
"backgroundColor": "HexColor",                              // 窗⼝的背景⾊
"backgroundTextStyle": "dark"                              // 下拉loading样式(dark/light)
"backgroundColorTop": "HexColor",                          // 顶部窗⼝的背景⾊(仅⽀持ios)
"backgroundColorBottom": "HexColor",                        // 底部窗⼝的背景⾊
"enablePullDownRefresh":"Boolean"                          // 是否开启下拉刷新
"onReachBottomDistance": "Number"                          // 页⾯上拉触底事件触发时距页⾯底部距离,单位为px
},
// 配置项指定 tab 栏的表现,以及 tab 切换时显⽰的对应页⾯。
"tabBar": {
"color": "HexColor",                                        // tab⽂字的默认颜⾊
"selectedColor": "HexColor"                                // tab⽂字选中时的颜⾊
"backgroundColor": "HexColor"                              // tab的背景颜⾊如何制作app小程序
"borderStyle": "String",                                    // tabBar上边框的颜⾊仅⽀持 black/white
"position": "String",                                      // tabBar 所在的位置( bottom、top)
"list": [                                                  // 最少2个、最多5个 tab
{
"pagePath": "pages/index/index",                    // 页⾯路径(必须在 pages 中先定义)
"text": "⾸页",                                    // tab 上按钮⽂字
"iconPath": "String",                              // 图⽚路径    icon ⼤⼩限制为40kb,建议尺⼨为 81px * 81px,当 postion 为 top 时,此参数⽆效,不⽀持⽹络图⽚
"selectedIconPath": "String"                        // 选中时的图⽚路径  icon ⼤⼩限制为40kb,建议尺⼨为 81px * 81px,当 postion 为 top 时,此参数⽆效,不⽀持⽹络图⽚            }
]
},
// 可以设置各种⽹络请求的超时时间。
"networkTimeout": {
"request": 10000,                                          // wx.request的超时时间,单位毫秒,默认为:60000
"connectSocket":10000,                                      // wx.connectSocket的超时时间,单位毫秒,默认为:60000
"uploadFile":10000,                                        // wx.uploadFile的超时时间,单位毫秒,默认为:60000
"downloadFile": 10000,                                      // wx.downloadFile的超时时间,单位毫秒,默认为:60000
},
// 开发者⼯具中开启 debug 模式
"debug": true
}

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。