配置
我们使用app.json文件来对微信小程序进行全局配置,决定页面文件的路径、窗口表现、设置网络超时时间、设置多 tab 等。
以下是我们天气小程序的简单配置app.json :
{
"pages": [
"pages/index/index",
"pages/logs/logs"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#2f3b53",
"navigationBarTitleText": "Weather",
"navigationBarTextStyle": "white"
},
"tabBar": {
"selectedColor": "#73d0f4",
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "assets/images/home_n.png",
"selectedIconPath": "assets/images/home.png",
"text": "首页"
},
{
"p