# Configuring Mini-Programs
# 1. Global Configuration
The app.json file is used for global configuration of the Mini-Program, including page paths, window appearance, network timeout settings, and tab bar configuration. If a JSON file within a page contains the same configuration options, it will override the global configuration (Note: JSON files within pages can only configure specific options. For details, refer to the page configuration).
Below is an example configuration file app.json:
{
"pages": [
"pages/index/index",
"pages/my/my"
],
"window": {
"navigationBarTitleText": "FinClip Mini-Program Demo",
"navigationBarHideCloseButton": true, // Hide the capsule close button
"navigationBarHideMoreButton": true, // Hide the capsule more button
"navigationStyle": "default/custom/hide"
},
"tabBar": {
"list": [{
"pagePath": "pages/index/index",
"text": "Home"
}, {
"pagePath": "pages/my/my",
"text": "Personal Center"
}]
},
"debug": true
}
For a complete description of configuration items, please refer to Mini-Program Global Configuration.
# 2. Page Configuration
Used to specify which pages constitute the Mini-Program. Each item corresponds to the path + filename information of a page. The first item in the pages array represents the home page of the Mini-Program. Adding or removing pages requires manually modifying the pages array. It is important to note that items within the pages array cannot be duplicated.
For example, if the development directory is:
├── app.js
├── app.json
├── app.ftss
├── pages
│ │── index
│ │ ├── index.fxml
│ │ ├── index.js
│ │ ├── index.json
│ │ └── index.ftss
│ └── my
│ ├── my.fxml
│ └── my.js
Then you need to write the following in app.json:
{
"pages":[
"pages/index/index",
"pages/my/my"
]
}
For a complete description of configuration items, please refer to Mini-Program Page Configuration.