tencent cloud

Feedback

Global and Page Configuration

Last updated: 2024-07-12 17:51:08

    1. Global Configuration

    The app.json file in the root directory of the mini program is used to configure the global configuration of the mini program, deciding the path of the page file, the window performance, setting the network timeout, setting multiple tabs and so on.
    The following is an app.json file that contains some common configuration options:
    {
    "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
    }
    Please refer to global configuration for a complete description of the configuration items.

    2. Page Configuration

    Each mini program page can also use the same name .json file to configure the window of the page, the configuration items in the page will override the same configuration items in the window of app.json.
    For example:
    {
    "navigationBarBackgroundColor": "#ffffff",
    "navigationBarTextStyle": "black",
    "navigationBarTitleText": "title",
    "backgroundColor": "#eeeeee",
    "backgroundTextStyle": "light"
    }
    Please refer to Page Configuration for full configuration item descriptions.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support