The method of utilizing this API is wx.exitMiniProgram(Object object).
Attributes | Types | Default value | Required | Note |
success | function | - | Not required | Successful Interface Call Callback Function |
fail | function | - | Not required | Callback function for unsuccessful interface invocation |
complete | function | - | Not required | Callback function executed upon the completion of the interface invocation (both successful and unsuccessful invocations) |
The method for utilizing this API is wx.navigateToMiniProgram(Object object)
Attributes | Types | Default value | Required | Note |
appId | string | - | Supported | The appId of the mini program to be launched |
path | string | - | Not required | The path of the page to be opened, if it is empty then the first page will be opened, the part of path after ? The part after the path will become query, you can get the query data in the callback function of App.onLaunch, App.onShow and Page.onLoad of the mini program or wx.getLaunchOptionsSync. |
extraData | object | - | Not required | Data to be passed to the target mini program; the target mini program can retrieve this data in App.onLaunch , App.onShow |
envVersion | string | release | Not required | 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 | - | Not required | Callback function for successful interface invocation |
fail | function | - | Not required | Callback function for unsuccessful interface invocation |
complete | function | - | Not required | 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).
Attributes | Types | Default value | Required | Note |
extraData | Object | {} | Not required | Data that needs to be returned to the previous mini-program can be obtained in the App.onShow of the previous mini-program. |
success | function | - | Not required | Callback function for successful interface invocation |
fail | function | - | Not required | Callback function for unsuccessful interface invocation |
complete | function | - | Not required | 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?