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 App ID of the current Mini Program. |