json 是小程序内的配置文件,用来配置路由,样式的数据内容;
官方demo中给出来默认的json配置项
page = []
page 是路由,是小程序开发总配置的分发器,
"pages": [
"page/component/index",
"page/component/component-pages/action-sheet/action-sheet"
]
window = {}
window是全局对象,指的是微信的页面设置;
"window": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "演示",
"navigationBarBackgroundColor": "#fbf9fe",
}
- navigationBarTextStyle: 字体样式
- navigationBarTitleText:文字信息
- navigationBarBackgroundColor :背景颜色
tabBar = {}
tabBar 是小程序默认的底部通栏,用于切换信息;
"tabBar": {
"color": "#dddddd",
"selectedColor": "#3cc51f",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "page/component/index",
"iconPath": "image/icon_component.png",
"selectedIconPath": "image/icon_component_HL.png",
"text": "组件"
}, {
"pagePath": "page/API/index/index",
"iconPath": "image/icon_API.png",
"selectedIconPath": "image/icon_API_HL.png",
"text": "接口"
}]
},
- tabBar直接对应的是其样式;
- list 是包含数据的数组
- 用来显示底部的内容
- pagePath 分发地址
- iconPath/selectedIconPath 图标选中和默认状态
- text 文字
networkTimeout = {}
设置网络超时时间
"networkTimeout": {
"request": 10000,
"connectSocket": 10000,
"uploadFile": 10000,
"downloadFile": 10000
}
debug :Bealean (true/false)
是够开启调试模式