微信小程序 - app.json配置解析

 {
"pages": [
"pages/index/index",
"pages/logs/logs",
"pages/login/login"
],
"window": {
/**
* 以下是页面顶部导航栏设置
**/
"navigationBarBackgroundColor": "#ffffff", // 导航栏背景颜色,默认值:#000000
"navigationBarTextStyle": "black", // 导航栏标题颜色,默认值white
"navigationBarTitleText": "wechat", // 导航栏标题文字内容
"navigationStyle": "default", // 导航样式,默认值default。 custom 自定义导航栏,只保留右上角胶囊按钮
/**
* 以下是下拉刷新或上拉触底设置
**/
"backgroundColor": "#eee", // 窗口的背景色
"backgroundTextStyle": "light", // 下拉 loading 的样式,默认值dark(暗)
"backgroundColorTop": "#aaa", // 顶部窗口的背景色,仅 iOS 支持
"backgroundColorBottom": "#aaa", // 底部窗口的背景色,仅 iOS 支持
"enablePullDownRefresh": true, // 是否全局开启下拉刷新,值 true | false
"onReachBottomDistance": 50 // 页面上拉触底事件触发时距页面底部距离,单位为px,默认值 50
},
"tabBar": {
"color": "#000", // 【必需】 tab 上的文字默认颜色
"selectedColor": "#56abe4", // 【必需】 tab 上的文字选中时的颜色
"backgroundColor": "#fff", // 【必需】 tab 的背景色
"borderStyle": "white", // tabbar上边框的颜色, 默认值:black
"position": "bottom", // tabBar的位置,仅支持 bottom / top
/**
*【必需】 tab 的列表,最少2个、最多5个 tab
**/
"list": [
{
"pagePath": "pages/index/index", // 【必需】 打开的页面路径,必须在 pages 中先定义
"text": "首页" // 【必需】 tab 上按钮文字,比如首页
"iconPath": "img/indexIcon", // 图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px,不支持网络图片。 当 postion 为 top 时,不显示 icon。
"selectedIconPath": "img/indexIcon_on // 选中时的图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px,不支持网络图片。当 postion 为 top 时,不显示 icon。
},
{
"pagePath": "pages/logs/logs",
"text": "日志"
},
{
"pagePath": "pages/login/login",
"text": "登录"
}
]
},
/**
* networkTimeout 各类网络请求的超时时间,单位均为毫秒。
**/
"networkTimeout": {
"request": 30000, // wx.request 的超时时间。默认值 60000
"connectSocket": 3000, // wx.connectSocket 的超时时间。默认值 60000
"uploadFile": 30000, // wx.uploadFile 的超时时间。默认值 60000
"downloadFile": 30000 // wx.downloadFile 的超时时间。默认值 60000
},
"debug": true, //debug 是否开启调试模式,默认关闭(false)
"resizable": true, // 值true时使小程序支持 iPad 屏幕旋转
"functionalPages": true, //functionalPages 是否启用插件功能页,默认关闭(false)
/**
* usingComponents 定义全局可以使用的自定义组件(所有页面可用)
**/
"usingComponents": {
"component-tag-name": "component-path" // 格式:组件标签名称 : 自定义组件路径
// 可定义多个自定义组件
}
}
上一篇:c++程序设计第三版例题1.2 求两数的和


下一篇:【c语言】不用大与小与号,求两数最大值