my.reLaunch
Close page stacks and jump to the specified page within the application.
Supported types of mini programs: DSL
Sample Code
my.reLaunch({
url: '/page/index'
})Parameters
Property | Type | Required | Description |
url | String | Yes | Page path If the page is not a tabbar page, the path can be followed by parameters. Rules for the parameters: The path and parameter are separated with
, the parameter key and the parameter value are connected with
, and different parameters must be separated with
, such as
. |
success | Function | No | Callback function upon call success. |
fail | Function | No | Callback function upon call failure. |
complete | Function | No | Callback function upon call completion (to be executed upon either call success or failure). |
Error Codes
Error code | Error message | Further action |
1 | ${url} resolved to ${pagePath} is not found | Ensure that the target page exists and is properly configured. Add the page path to the |
${url} is not found in plugin | Confirm that the target page belongs to the plugin and is declared correctly. Add the page path to the | |
2 | Missing required parameter: url | Check the input parameters and ensure that the url field is provided and not empty. |