HomeDocs
Skip to main content

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

PropertyTypeDefaultRequiredDescription
successfunctionNoCallback function for a successful API call.
failfunctionNoCallback function for a failed API call.
completefunctionNoCallback function that will be executed when the API call is complete (both successful and failed calls).

Return Value​

PropertyTypeDescription
appIdstringMini program ID
appNamestringMini 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);
},
});
},
});
Privacy agreementDeveloper agreementcontact us: developer_private.mi@dlightek.com © 2024 MiniApp. All Rights Reserved.