my.navigateToMiniProgram
Jump to another Mini Program.
Sample Code
copy
my.navigateToMiniProgram({
appId: 'xxxx',
extraData:{
"data1":"test"
},
success: (res) => {
console.log(JSON.stringify(res))
},
fail: (res) => {
console.log(JSON.stringify(res))
}
});
Parameters
Name | Type | Mandatory | Description |
appId | String | Y | The appId of the target Mini Program to jump to |
path | String | N | The path of the target Mini Program to jump to,open the homepage if it is empty |
extraData | Object | N | The extra data that needs to be passed to the target Mini Program,and the target Mini Program can get it in App.onLaunch() or App.onShow() |
success | function | N | the success callback function |
fail | function | N | the failed callback function |
complete | function | N | the complete callback function |