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

PropertyType

Required

Description
appIdStringYesThe appId of the target Mini Program to jump to.
pathStringNoThe path of the target DSL Mini Program to jump to, open the homepage if it is empty.

appendedUrlPart

StringNo

The child path of the target H5+ Mini Program to jump to. This path must be URL encoded.

If this parameter is empty, directly open the Mini Program homepage.

extraDataObjectNoThe 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().
successFunctionNoCallback function upon call success.
failFunctionNoCallback function upon call failure.
completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).