微信小程序目录结构
app.json --全局配置
在这里插入app.json代码片(主要app.json里面不能写注释)
{
"pages":[ // 添加的子页面
"pages/index/index",
"pages/logs/logs",
"pages/home/home",
"pages/user/user",
"pages/details/details"
],
"window":{ //头部样式修改
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#f0f",
"navigationBarTitleText": "微信小程序网站",
"navigationBarTextStyle":"white",
"navigationStyle":"default",
"backgroundColorBottom":"red"
},
"tabBar":{ //tab 的列表,详见 list 属性说明,最少 2 个、最多 5 个 tab
"backgroundColor":"#ccc",
"list": [
{"pagePath":"pages/index/index",
"text": "首页",
"iconPath": "./assets/images/index.jpg",
"selectedIconPath": "./assets/images/indexSelected.jpg"
},
{"pagePath":"pages/logs/logs",
"text": "日志",
"iconPath": "./assets/images/logs.jpg",
"selectedIconPath": "./assets/images/logsSelected.jpg"
},
{"pagePath":"pages/home/home",
"text": "我的",
"iconPath": "./assets/images/me.jpg",
"selectedIconPath": "./assets/images/meSelected.jpg"
}
]
},
"permission": { //位置展示
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"style": "v2",
"sitemapLocation": "sitemap.json"
}