pages
功能
设置页面路径
节点
"pages":[ "pages/index/index", "pages/logs/logs" ]
类型
String Array
必填
是
window
功能
设置默认页面的窗口表现
节点
navigationBarBackgroundColor
导航栏背景颜色,如"#000000"
navigationBarTextStyle
导航栏标题颜色,仅支持 black/white
navigationBarTitleText
导航栏标题文字内容
backgroundColor
窗口的背景色
backgroundTextStyle
下拉背景字体、loading 图的样式,仅支持 dark/light
enablePullDownRefresh
是否开启下拉刷新
类型
Object
必填
否
tabBar
功能
设置底部 tab 的表现
节点
color
tab 上的文字默认颜色
selectedColor
tab 上的文字选中时的颜色
backgroundColor
tab 的背景色
borderStyle
tabbar上边框的颜色, 仅支持 black/white(默认black)
list
功能
tab 的列表,详见 list 属性说明,最少2个、最多5个 tab
节点
pagePath
页面路径,必须在 pages 中先定义
text
tab 上按钮文字
iconPath
图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px
selectedIconPath
选中时的图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px
position
可选值 bottom、top(默认bottom)
类型
Object
必填
否
networkTimeout
功能
设置网络超时时间
节点
request
wx.request的超时时间,单位毫秒,默认为:60000
connectSocket
wx.connectSocket的超时时间,单位毫秒,默认为:60000
uploadFile
wx.uploadFile的超时时间,单位毫秒,默认为:60000
downloadFile
wx.downloadFile的超时时间,单位毫秒,默认为:60000
类型
Object
必填
否
debug
功能
设置是否开启 debug 模式
节点
类型
Boolean
必填
否
page.json
功能
每一个小程序页面也可以使用.json文件来对本页面的窗口表现进行配置。 页面的配置比app.json全局配置简单得多,只是设置 app.json 中的 window 配置项的内容,页面中配置项会覆盖 app.json 的 window 中相同的配置项。
页面的.json只能设置 window 相关的配置项,以决定本页面的窗口表现,所以无需写 window 这个键
节点
navigationBarBackgroundColor
导航栏背景颜色,如"#000000"
navigationBarBackgroundColor
导航栏标题颜色,仅支持 black/white(默认white)
navigationBarTitleText
导航栏标题文字内容
backgroundColor
窗口的背景色(默认#ffffff)
backgroundTextStyle
下拉背景字体、loading 图的样式,仅支持 dark/light(默认dark)
enablePullDownRefresh
是否开启下拉刷新(默认false)
disableScroll
设置为 true 则页面整体不能上下滚动;只在 page.json 中有效,无法在 app.json 中设置该项(默认false)
tabBar