微信小程序02【配置详解(页面、窗口、tabBar、网络超时、debug)】
学习地址:https://www.bilibili.com/video/BV1sx411z77P?p=10
笔记01:https://blog.csdn.net/weixin_44949135/article/details/107181721【目录结构详解、事件、input、scroll-view】
笔记02:https://blog.csdn.net/weixin_44949135/article/details/107191256【配置详解(页面、窗口、tabBar、debug)】
目 录
P9 3.1微信小程序的配置详解
- app的页面配置
- app的窗口配置
- app的tabBar配置
- 网络超时配置及debug开启配置
- 页面配置
小程序根目录下的
app.json
文件用来对微信小程序进行全局配置。
1、app的页面配置
pages
用于指定小程序由哪些页面组成,每一项都对应一个页面的 路径(含文件名) 信息。
文件名不需要写文件后缀,框架会自动去寻找对应位置的
.json
,.js
,.wxml
,.wxss
四个文件进行处理。数组的第一项代表小程序的初始页面(首页)。小程序中新增/减少页面,都需要对 pages 数组进行修改。
2、app的窗口配置
3、app的tabBar配置
4、网络超时配置
只影响http请求,只影响发起请求的API。
5、debug开启配置
6、页面配置
.json:主要是为了覆盖app.json。
.wxss:主要是为了覆盖app.wxss。