app.json
APP.JSON 文件来对微信小程序进行全局配置,决定页面文件的路径、窗口表现、设置网络超时时间、设置多 TAB 等。相当于iOS开发中的AppDelegate
注意该文件不可添加任何注释。
{
"pages”:[ //页面文件的路径
"pages/component/index"
"pages/API/index",
],
"window":{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "my微信引用”, //navigation的title
"navigationBarTextStyle":”black"
},
"tabBar": { //设置 TAB
"color": "#333333",
"selectedColor": "#3cc51f",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/component/index",
"text": "组件",
"iconPath": "images/icon_component.png",
"selectedIconPath": "images/icon_component_HL.png"
},{
"pagePath": "pages/API/index",
"text": "接口",
"iconPath":"images/icon_API.png",
"selectedIconPath":"images/icon_API_HL.png"
}]
},
"networkTimeout": { //设置网络超时时间
"request": 20000,
"connectSocket": 20000,
"uploadFile": 20000,
"downloadFile": 20000
}
}
posted on 2017-08-21 17:20 taiyang2014 阅读(175) 评论(0) 编辑 收藏 举报