{
//页面路径列表,必填
"pages": [
"pages/test1/test1",
"pages/test2/test2",
"pages/test3/test3"
],
//全局的默认窗口表现,非必填
"window": {
//导航栏背景颜色,如 #000000
"navigationBarBackgroundColor": "#fff",
//导航栏标题颜色,仅支持 black / white
"navigationBarTextStyle":"black",
//导航栏标题文字内容
"navigationBarTitleText": "Demo集中营",
//导航栏样式,仅支持以下值:default 默认样式custom 自定义导航栏,只保留右上角胶囊按钮
"navigationStyle":"default",
//窗口的背景色
"backgroundColor":"#ffffff",
//下拉 loading 的样式,仅支持 dark / light
"backgroundTextStyle": "light",
//顶部窗口的背景色,仅 iOS 支持
"backgroundColorTop":"#ffffff",
//底部窗口的背景色,仅 iOS 支持
"backgroundColorBottom":"#ed3ede",
//是否开启全局的下拉刷新
"enablePullDownRefresh":true,
//页面上拉触底事件触发时距页面底部距离,单位为 px。
"onReachBottomDistance":50,
//屏幕旋转设置,支持 auto / portrait / landscape
"pageOrientation":"portrait"
},
//tab栏的表现,非必填
"tabBar":{
//tab 上的文字默认颜色,仅支持十六进制颜色
"color": "#000000",
//tab 上的文字选中时的颜色,仅支持十六进制颜色
"selectedColor": "#666666",
//tab 的背景色,仅支持十六进制颜色
"backgroundColor": "#ffffff",
//tabbar 上边框的颜色, 仅支持 black / white
"borderStyle": "black",
//tabBar 的位置,仅支持 bottom / top
"position":"top",
//tab 的列表,详见 list 属性说明,最少 2 个、最多 5 个 tab
"list":[{
"pagePath": "pages/test1/test1",
"text": "test1",
"iconPath":"",
"selectedIconPath":""
},
{
"pagePath": "pages/test2/test2",
"text": "test2",
"iconPath":"",
"selectedIconPath":""
},
{
"pagePath": "pages/test3/test3",
"text": "test3",
"iconPath":"",
"selectedIconPath":""
}
],
//自定义 tabBar
"custom":false
},
//网络超时时间,非必填
"networkTimeout": {
//wx.request 的超时时间,单位:毫秒
"request": 20000,
//wx.connectSocket 的超时时间,单位:毫秒
"connectSocket": 20000,
//wx.uploadFile 的超时时间,单位:毫秒
"uploadFile": 20000,
//wx.downloadFile 的超时时间,单位:毫秒
"downloadFile": 20000
},
//是否开启debug模式,默认关闭,调试信息以 info 的形式给出,其信息有 Page 的注册,页面路由,数据更新,事件触发等
"debug":true,
//是否启用插件功能页,默认关闭,插件所有者小程序需要设置这一项来启用插件功能页。
"functionalPages": {
"independent": true
},
//分包结构配置,非必填
"subPackages": [
{
"root": "packageA",
"name": "packA",
"pages": [
"pages/test/test"
],
"independent": true
}
],
//分包预下载规则
"preloadRule": {
"pages/index/index": {
"network": "all",
"packages": [
"packageA"
]
}
},
//Worker 代码放置的目录,使用 Worker 处理多线程任务时,设置 Worker 代码放置的目
"workers": "workers",
//需要在后台使用的能力,如「音乐播放」
"requiredBackgroundModes": [
"audio",
"location"
],
//使用到的插件
"plugins": {
"myPlugin": {
"version": "1.0.0",
"provider": "wxidxxxxxxxxxxxxxxxx"
}
},
//需要跳转的小程序列表,最多十个appId
"navigateToMiniProgramAppIdList":[],
//iPad 小程序是否支持屏幕旋转,默认关闭
"resizable": true,
//全局自定义组件配置
"usingComponents":{},
//小程序接口权限相关设置
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
//指明 sitemap.json 的位置
"sitemapLocation": "sitemap.json",
//表明启用新版的组件样式
"style": "v2",
//指定需要引用的扩展库
"useExtendedLib": {
"kbone": true,
"weui": true
},
//微信消息用小程序打开
"entranceDeclare": {
"locationMessage": {
"path": "pages/index/index",
"query": "foo=bar"
}
}
}
小程序基础—全局配置app.json,内容真多,带注释
猜你喜欢
转载自blog.csdn.net/WeiHan_Seven/article/details/104281418
今日推荐
周排行