Home  >  Article  >  WeChat Applet  >  Basic configuration of mini program project

Basic configuration of mini program project

巴扎黑
巴扎黑Original
2017-09-12 09:22:572391browse

The configuration files in the mini program are divided into two types:

Global configuration file, app.json

Page configuration file in the root directory, [page- name].json

app.json

Project configuration declaration file (specify some information of the project, such as navigation bar style color, etc.)

{  
// 当前程序是由哪些页面组成的(第一项默认为初始页面)  
// 所有使用到的组件或页面都必须在此体现
// https://mp.weixin.qq.com/debug/wxadoc/dev/framework/config.html#pages 
 "pages": [ ... ], 
 // 应用程序窗口设置  
// https://mp.weixin.qq.com/debug/wxadoc/dev/framework/config.html#window 
 "window": { ... },  
// 应用导航栏设置  
// https://mp.weixin.qq.com/debug/wxadoc/dev/framework/config.html#tabBar  
"tabBar": { ... }, 
 // 网络超时设置
  // https://mp.weixin.qq.com/debug/wxadoc/dev/framework/config.html#networkTimeout  
"networkTimeout": {},  
// 是否在控制台输出调试信息  
// https://mp.weixin.qq.com/debug/wxadoc/dev/framework/config.html#debug  "debug": true}

[page-name] .json

is used to specify the window settings when working on a specific page:

{  
// 导航条背景色  "navigationBarBackgroundColor": "#35495e",  
// 导航条前景色(只能是white/black)  "navigationBarTextStyle": "white",  
// 导航条文本  "navigationBarTitleText": "电影 « 豆瓣", 
 // 窗口背景颜色  "backgroundColor": "#fff",  
// 窗口前景色  "backgroundTextStyle": "dark",  
// 是否开启下拉刷新  "enablePullDownRefresh": true}

The above is the detailed content of Basic configuration of mini program project. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn