We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All
quickApp ReferencesQuick GameHTML5 Quick GameGlobal Methods

Global Methods

Definition

Expand

API

Description

this.$page.query

Obtains the parameters carried when a quick game is started.

onPageFinish()

Executed after the page is loaded.

this.$page.query

  • Description

    Obtains the parameters carried when a quick game is started.

  • Returns
    NOTE

    The output parameters depend on the parameters provided in the deep link. In addition to the following parameters, the custom parameters are also returned.

    Expand

    Parameter

    Type

    Description

    gameGiftId

    string

    Game gift pack ID.

    giftUri

    string

    URL of the gift pack page, that is, the redirection URL set when a developer creates a gift pack. After the game is started, the gift pack page is displayed based on the gift pack URL.

    userEntry

    string

    Channel platform. The options are as follows:

    101: Ocean Engine

    102: Tencent platform

    900999: custom channel platforms

  • Sample code
    Collapse
    Word wrap
    Dark theme
    Copy code
    1. var queryString = JSON.stringify(this.$page.query);

onPageFinish()

  • Description

    Executed after the page is loaded.

  • Sample code
    Collapse
    Word wrap
    Dark theme
    Copy code
    1. // Add the following sample code to onPageFinish in the hello.ux file of Huawei Quick App IDE:
    2. onPageFinish: function () {
    3. console.info("onPageFinish")
    4. }
Search in References
Enter a keyword.