navigateTo(params: Object)
Requires:
MiniKit≥1.0.0@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
Description
Navigate to a new page
Parameters
| Property | Type | Required | Default | Description | MiniKit Since |
|---|---|---|---|---|---|
url | string | Yes | - | Page path; parameters must be URL-encoded | - |
type | string | No | "full" | Open mode; supports full-screen full and half-screen half; default: full | v2.6.0 |
topMargin | number | No | 100 | Distance from the top of the screen for non-full-screen pages; effective when type is half. Range: [1–screen height], unit: px. Note: On Android, the display area excludes the status bar; on iOS, it includes the status bar. Therefore, on Android, the maximum topMargin is screen height minus the status bar height. | v3.11.3 |
topMarginPercent | number | No | - | Percentage distance from the top of the screen for non-full-screen pages; effective when type is half and has higher priority than topMargin. Range: [1–99], unit: percent. Note: On Android, the display area excludes the status bar; on iOS, it includes the status bar. | v3.11.3 |
animationType | string | No | - | Specify the page enter animation; currently supports "slide-in-bottom". If not specified, the default style is used. | v3.26.0 |
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