Global vs. page configuration
# 1. Global configuration
The app.json file is used to configure the Mini App globally, page path, window performance, set the network timeout period, set tabbar, etc.; If a json file exists in the page and the same option is configured, the global configuration will be overwritten (the json file in the page can only configure some options, see the configuration in the page);
The following is a sample configuration file app.json:
{
"pages": [
"pages/index/index",
"pages/my/my"
],
"window": {
"navigationBarTitleText": "Neuxnet Mini App Demo",
"navigationBarHideCloseButton": true, // Hides capsule close button
"navigationBarHideMoreButton": true, // Hide capsule more button
"navigationStyle": "default/custom/hide"
},
"tabBar": {
"list": [{
"pagePath": "pages/index/index",
"text": "Home"
}, {
"pagePath": "pages/my/my",
"text": "Personal Center"
}]
},
"networkTimeout": {
"request": 10000,
},
"debug": true
}
For more information about the complete configuration items, see Mini App Global Configuration
# 2. Page configuration
Used to specify which pages the Mini App is composed of, each item corresponds to a page's path + file name information, the first item of the pages array represents the first page of the Mini App, adding or subtracting pages, you need to manually increase or decrease the pages array, it is worth noting that the items in the pages array cannot be repeated.
For example, 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
You need to write it in app.json
{
"pages":[
"pages/index/index",
"pages/my/my"
]
}
For more information about the complete configuration items, see Mini App Page Configuration