getPackageInfoById
Start from API_LEVEL
4.0. Please refer to API_LEVEL.
Get some of the fields in the Mini Program configuration app.json by app ID.
Type
function getPackageInfoById(option: Option): Result
Parameters
Option
| Property | Type | Required | DefaultValue | Description | API_LEVEL |
|---|---|---|---|---|---|
| appId | number | Y | - | Mini Program ID | 4.0 |
Result
| Type | Description |
|---|---|
object | Please see the fields in app.json for more details |
Example
import { getPackageInfoById } from '@zos/app'
const packageInfo = getPackageInfoById({ appId: 1001 })
console.log(packageInfo.name)