my.getAppIdSync
Use this API to obtain the Mini Program App ID synchronously.
Sample Code
copy
const appIdRes = my.getAppIdSync();
console.log(appIdRes.appId);
Return Value
Property | Type | Description |
appId | String | The ID of the current mini program. The result varies depending on whether the mini program is launched to AlipayCN:
|