一.app.json
使用app.json文件来对微信小程序进行全局配置,决定页面文件的路径、窗口表现、设置网络超时时间、设置多 tab 等.
app.json中
{ "pages": ["pages/index/index", "pages/coming/coming", "pages/search/search", "pages/top/top" ], "window": { "navigationBarBackgroundColor": "#47a86c", "navigationBarTextStyle": "white", "navigationBarTitleText": "小程序案例", "backgroundColor": "#fff", "backgroundTextStyle": "dark" }, "tabBar": { "color": "#686868", "selectedColor": "#47a86c", "backgroundColor": "#fff", "list": [{ "pagePath": "pages/index/index", "iconPath": "dist/images/popular_icon.png", "selectedIconPath": "dist/images/popular_active_icon.png", "text": "热映" }, { "pagePath": "pages/coming/coming", "iconPath": "dist/images/coming_icon.png", "selectedIconPath": "dist/images/coming_active_icon.png", "text": "待映" }, { "pagePath": "pages/search/search", "iconPath": "dist/images/search_icon.png", "selectedIconPath": "dist/images/search_active_icon.png", "text": "搜索" }, { "pagePath": "pages/top/top", "iconPath": "dist/images/top_icon.png", "selectedIconPath": "dist/images/top_active_icon.png", "text": "口碑" }] }, "networkTimeout": { "request": 10000, "downloadFile": 10000 }, "debug": true }
微信小程序开发教程之增加mixin扩展
以上就是微信小程序 开发之全局配置的介绍的详细内容,更多请关注其它相关文章!