本文主要是介绍小程序全局配置(app.json 源码分享),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
配置清单:
-
pages:页面路径列表
-
window:全局的默认窗口表现
-
tabBar:底部 tab 栏
-
networkTimeout:网络超时时间
-
permission:小程序接口权限相关设置
app.json
{"pages": ["pages/index/index"],"window": {"backgroundTextStyle": "light","navigationBarBackgroundColor": "#de4d41","navigationBarTitleText": "应用名称","navigationBarTextStyle": "white"},"tabBar": {"color": "#999999","backgroundColor": "#FFFFFF","selectedColor": "#de4d41","borderStyle": "black","list": [{"selectedIconPath": "images/nav/index-active.png","iconPath": "images/nav/index.png","pagePath": "pages/index/index","text": "首页"},{"selectedIconPath": "images/nav/home-active.png","iconPath": "images/nav/home.png","pagePath": "pages/home/index","text": "我的"}]},"networkTimeout": {"request": 10000,"connectSocket": 10000,"uploadFile": 20000,"downloadFile": 30000},"permission": {"scope.userLocation": {"desc": "您的位置信息将用于认识附近新朋友"}}
}
作者:黄河爱浪 QQ:1846492969,邮箱:helang.love@qq.com
微信公众号:
web-7258
,本文原创,著作权归作者所有,转载请注明原链接及出处。更多精彩文章,请扫下方二维码关注我的公众号
这篇关于小程序全局配置(app.json 源码分享)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!