navigateToMiniProgram(params: Object)
Requires:
BaseKit≥2.2.4@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
Description
Open another miniapp
Parameters
| Property | Type | Required | Default | Description | BaseKit Since |
|---|---|---|---|---|---|
appId | string | No | - | appId of the miniapp to open | - |
aiPtChannel | string | No | - | Agent ID of the agent miniapp to open | v3.13.0 |
aiPtType | string | No | "release" | Version of the agent miniapp to open. preview: preview version release: release version | v3.13.0 |
path | string | No | - | Page path to open; if empty, the home page opens. The part after ? in path becomes the query and is available in the callbacks of `App.onLaunch`, `App.onShow`, and `Page.onLoad` | - |
position | string | No | "right" | Transition type when opening the miniapp: right | bottom, indicating horizontal and vertical directions | v2.5.1 |
| No | - | Data to pass to the target miniapp; the target can access it in `App.onLaunch` and `App.onShow` | - | ||
envVersion | string | No | "release" | Version of the miniapp to open. This parameter is valid only when the current miniapp is a dev or trial build. If the current miniapp is release, the opened miniapp must be release. trial: trial version release: release version | - |
shortLink | string | No | - | Miniapp link. When this parameter is provided, appId and path can be omitted | - |
complete | () => void | No | - | Completion callback (executed on both success and failure) | - |
success | () => void | No | - | Callback on successful API call | - |
fail | (params: Object) => void | No | - | Failure callback | - |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None