launchApp
Start from API_LEVEL
2.0
. Please refer to API_LEVEL.
Open Mini Program.
Type
function launchApp(option: Option): void
Parameters
Option
Property | Type | Required | DefaultValue | Description | API_LEVEL |
---|---|---|---|---|---|
appId | number | Y | - | Mini Program ID | 2.0 |
url | string | Y | - | path | 2.0 |
params | string|object | N | - | The argument passed to the app.js lifecycle onCreate supports either a string or a standard JSON object. If a standard JSON object is passed, the method internally converts it to a string | 2.0 |
Example
import { launchApp } from '@zos/router'
launchApp({
appId: 1000001,
url: 'pages/js_widget_sample',
params: {
type: 1,
},
})