This API is used via wx.exitMiniProgram(Object object).
Attribute | Type | Default value | Required | Description |
success | function | - | No | Callback Function of Successful Interface Call |
fail | function | - | No | Callback Function of Failing Interface Call |
complete | function | - | No | Callback function executed upon the completion of the interface invocation (both successful and unsuccessful invocations) |
This API is used via wx.navigateToMiniProgram(Object object).
Attribute | Type | Default value | Required | Description |
appId | string | - | Yes | The appId of the mini program to be launched. |
path | string | - | No | Path of the page to be opened. If left blank, the homepage will be opened. |
extraData | object | - | No | Data to be passed to the target mini program. The target mini program can get this data in App.onLaunch , App.onShow . |
envVersion | string | release | No | The version of the mini program to be launched. This parameter is only effective when the current mini program is in development or trial version. If the current mini program is in the official version, the mini program to be launched will definitely be the official version. The valid values are as follows: develop: Development Version trial: Trial Version release: Official Version |
success | function | - | No | Callback Function of Successful Interface Call |
fail | function | - | No | Callback Function of Failing Interface Call |
complete | function | - | No | Callback function executed upon the completion of the interface invocation (both successful and unsuccessful invocations) |
fail cancel
will be triggered.fail appId "${appId}" is not in navigateToMiniProgramAppIdList
will be triggered.wx.navigateToMiniProgram({appId: '',path: 'page/index/index?id=123',extraData: {foo: 'bar'},envVersion: 'develop',success(res) {// Successfully opened}})
The usage method for this API is wx.navigateBackMiniProgram(Object object).
Attribute | Type | Default value | Required | Description |
extraData | Object | {} | No | Data that needs to be returned to the previous mini program can be obtained in the App.onShow. |
success | function | - | No | Callback Function of Successful Interface Call |
fail | function | - | No | Callback Function of Failing Interface Call |
complete | function | - | No | Callback function executed upon the completion of the interface invocation (both successful and unsuccessful invocations) |
wx.navigateBackMiniProgram({extraData: {foo: 'bar'},success(res) {// Successful return}})
Was this page helpful?