Skip to content

Global And Page Configuration

1.Global Configuration

The app.json file in the root directory of the mini program is used to globally configure the Luffa mini program, determine the path of the page file, window performance, set the network timeout, set multiple tabs, etc.

The following is an app.json file that contains some common configuration options:

js
{  
  "pages": [    
    "pages/index/index",    
    "pages/logs/index"  
  ],  
  "window": {    
    "navigationBarTitleText": "Demo"  
  },  
  "tabBar": {    
    "list": [{      
      "pagePath": "pages/index/index",      
      "text": "index"    
    }, {      
      "pagePath": "pages/logs/index",      
      "text": "log"    
    }]  
  },   
  "debug": true
}

For a complete description of configuration items, please refer to Mini Program Global Configuration

2.Page Configuration

Each mini program page can also use a .json file with the same name to configure the window performance of this page. The configuration items in the page will override the same configuration items in the window of app.json.

js
{  
  "navigationBarBackgroundColor": "#ffffff",  
  "navigationBarTextStyle": "black",  
  "navigationBarTitleText": "title",  
  "backgroundColor": "#eeeeee",  
  "backgroundTextStyle": "light"
}

For a complete description of configuration items, please refer to Page Configuration