{
"pages": [ ///小程序页面,第一个是小程序默认进入的首页
"pages/search/search",
"pages/index/index",
"pages/lock/lock"
],
"window": { ///微信小程序的配置
"backgroundColor": "#00b0f0", //窗口的背景色
"backgroundTextStyle": "light", //下拉 loading 的样式,仅支持 dark / light
"navigationBarBackgroundColor": "#F6F6F6", //导航栏背景颜色
"navigationBarTitleText": "测试", //导航栏标题文字内容
"navigationBarTextStyle": "black", //导航栏标题颜色,仅支持 black / white
"navigationStyle":"default" , //导航栏样式,仅支持以下值:default 默认样式;custom 自定义导航栏,只保留右上角胶囊按钮。
"backgroundColorTop":"#ffffff" , //顶部窗口的背景色
"backgroundColorBottom":"#ffffff" , //底部窗口的背景色
"enablePullDownRefresh":"false" , //是否开启当前页面下拉刷新
"onReachBottomDistance":"50" , //页面上拉触底事件触发时距页面底部距离,单位为px
"pageOrientation":"portrait" , //屏幕旋转设置,支持 auto / portrait / landscape
"disableScroll":"false" , //设置为 true 则页面整体不能上下滚动。只在页面配置中有效
"usingComponents":"否" , //页面自定义组件配置
"initialRenderingCache":"" , //页面初始渲染缓存配置
"style":"default" , //启用新版的组件样式
"singlePage":"否" , //单页模式相关配置
},
"tabBar": { //底部导航栏,最多5个,至少2个
"color": "#c3c3c3", //选中文字颜色
"selectedColor": "#00b0f0", //未选中文字颜色
"borderStyle": "black",
"list": [
{
"selectedIconPath": "images/sousuo1.png", //选中展示图
"iconPath": "images/sousuo2.png", //未选中显示图
"pagePath": "pages/search/search", //跳转页面
"text": "首页"
},
{
"selectedIconPath": "images/wode1.png",
"iconPath": "images/wode2.png",
"pagePath": "pages/index/index",
"text": "我的"
}
]
},
"sitemapLocation": "sitemap.json",
"style": "v2"
注:每一个小程序页面也可以使用 .json
文件来对本页面的窗口表现进行配置。页面中配置项在当前页面会覆盖 app.json
的 window
中相同的配置项。
}