json 是小程序內(nèi)的配置文件葡公,用來配置路由袜啃,樣式的數(shù)據(jù)內(nèi)容;
官方demo中給出來默認的json配置項
page = []
page 是路由崔拥,是小程序開發(fā)總配置的分發(fā)器极舔,
"pages": [
"page/component/index",
"page/component/component-pages/action-sheet/action-sheet"
]
window = {}
window是全局對象,指的是微信的頁面設(shè)置链瓦;
"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直接對應(yīng)的是其樣式慈俯;
- list 是包含數(shù)據(jù)的數(shù)組
- 用來顯示底部的內(nèi)容
- pagePath 分發(fā)地址
- iconPath/selectedIconPath 圖標(biāo)選中和默認狀態(tài)
- text 文字
networkTimeout = {}
設(shè)置網(wǎng)絡(luò)超時時間
"networkTimeout": {
"request": 10000,
"connectSocket": 10000,
"uploadFile": 10000,
"downloadFile": 10000
}
debug :Bealean (true/false)
是夠開啟調(diào)試模式