dlt.getMiniAppInfo
Introduction
Get the information of the mini program.
Usage Restrictions
Supported in the base library version 2.9.0 or higher.
Parameters
Object object
Property | Type | Default | Required | Description |
---|---|---|---|---|
success | function | No | Callback function for a successful API call. | |
fail | function | No | Callback function for a failed API call. | |
complete | function | No | Callback function that will be executed when the API call is complete (both successful and failed calls). |
Return Value
Property | Type | Description |
---|---|---|
appId | string | Mini program ID |
appName | string | Mini program name |
Example Code
// pages/index/index.js
Page({
getMiniAppInfo() {
dlt.getMiniAppInfo({
success: (res) => {
console.log("success", res);
},
fail: (res) => {
console.log("fail", res);
},
complete: (res) => {
console.log("complete", res);
},
});
},
});