Essential APIs

navigateToMiniProgram

Navigate from your Mini Program to another Mini Program within Super Qi.

Overview

my.navigateToMiniProgram allows your Mini Program to jump to another Mini Program within the Super Qi ecosystem. You can pass data to the target Mini Program.

Sample Code

my.navigateToMiniProgram({
  appId: "xxxx",
  extraData: {
    data1: "test",
  },
  success: (res) => {
    console.log(JSON.stringify(res));
  },
  fail: (res) => {
    console.log(JSON.stringify(res));
  },
});

Parameters

PropertyTypeRequiredDescription
appIdStringYesThe appId of the target Mini Program to jump to.
pathStringNoThe path of the target Mini Program to jump to, opens the homepage if it is empty.
extraDataObjectNoThe extra data that needs to be passed to the target Mini Program. 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).

Usage Notes

  • The appId is the unique identifier of the target Mini Program
  • If no path is specified, the target Mini Program will open at its homepage
  • Data passed via extraData can be accessed in the target Mini Program's lifecycle methods