Created
November 18, 2024 09:46
-
-
Save michealzh/78818c0874e792e9de83d783827e76c4 to your computer and use it in GitHub Desktop.
鸿蒙 next 获取微信开放平台需要的 Identifier
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aboutToAppear(): void { | |
let bundleFlags = bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_SIGNATURE_INFO | |
try { | |
bundleManager.getBundleInfoForSelf(bundleFlags).then((data) => { | |
hilog.info(0x0000, 'testTag', 'getBundleInfoForSelf successfully. Data: %{public}s', JSON.stringify(data)); | |
}).catch((err: BusinessError) => { | |
hilog.error(0x0000, 'testTag', 'getBundleInfoForSelf failed. Cause: %{public}s', err.message); | |
}); | |
} catch (err) { | |
let message = (err as BusinessError).message; | |
hilog.error(0x0000, 'testTag', 'getBundleInfoForSelf failed: %{public}s', message); | |
} | |
window.getLastWindow(getContext(this)).then((lastWindow) => { | |
this.window = lastWindow | |
this.window.setWindowLayoutFullScreen(false); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment