微信小程序配置app.json
微信小程序之配置app.json本人写了一个在线扫码借书的小程序,打算分享一下心得和代码,欢迎关注,再次希望各位大佬支出不足{"pages": ["pages/index/index","pages/userConsole/userConsole","pages/index/bookinfo/bookinfo","pages/index/sear......
·
微信小程序之配置app.json
{
"pages": [
"pages/index/index",
"pages/perInfo/updateInfo/updateInfo",
"pages/help/help"
],
"window": {
"backgroundColor": "#F6F6F6",
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#FF8C00",
"navigationBarTitleText": "云图书",
"navigationBarTextStyle": "white"
},
"tabBar": {
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "images/icon-home/find.png",
"selectedIconPath": "images/icon-home/find1.png"
},
{
"pagePath": "pages/scan/scan",
"text": "扫一扫",
"iconPath": "images/icon-home/scan.png",
"selectedIconPath": "images/icon-home/scan1.png"
},
{
"pagePath": "pages/my/my",
"text": "我的",
"iconPath": "images/icon-home/my.png",
"selectedIconPath": "images/icon-home/my1.png"
}
]
},
"sitemapLocation": "sitemap.json",
"cloud": true
}
上面的pages里面写入页面路径后,程序会在pages目录下自动生成相应的页面,无需自己手动添加navigationBarTitleText:标题navigationBarBackgroundColor:设置标题背景色navigationBarTextStyle:标题字体的颜色
其中下面的tabBar中的list至少添加两项pagePath:目标路径text:小标题iconPath:初始照片路径selectedIconPath:被点击选择后所变化的图片路径,一般与iconPath的图片相同,只是颜色不同
关于透明图片大家可以到 “阿里巴巴矢量库”取搜索自己喜欢的图标,当然也可以通过ps去制作。
更多推荐



所有评论(0)