|
|
@@ -12,6 +12,8 @@ import { BreakpointTypeEnum } from '../common/util/BreakpointSystem'
|
|
|
import { Utility } from '../common/util/Utility'
|
|
|
import { HSBColorPicker } from '@keke/color-picker'
|
|
|
import { DialogHelper } from '@pura/harmony-dialog'
|
|
|
+import { bundleManager } from '@kit.AbilityKit'
|
|
|
+import { hilog } from '@kit.PerformanceAnalysisKit'
|
|
|
|
|
|
@Preview
|
|
|
@Entry
|
|
|
@@ -172,6 +174,7 @@ export struct SettingPage {
|
|
|
|
|
|
// 组件生命周期
|
|
|
aboutToAppear() {
|
|
|
+ this.geIDD()
|
|
|
this.topRectHeight = px2vp(AppUtil.getStatusBarHeight());
|
|
|
this.isBgPlayOpen = PreferencesUtil.getBooleanSync(SettingPage.IS_BGPLAY_OPEN, true)
|
|
|
this.isAutoRatate = PreferencesUtil.getBooleanSync(SettingPage.IS_AUTO_RATATE, true)
|
|
|
@@ -969,6 +972,10 @@ export struct SettingPage {
|
|
|
.fontWeight(480)
|
|
|
.layoutWeight(1)
|
|
|
}
|
|
|
+ .onClick(() => {
|
|
|
+ ToastUtil.showToast(this.appIdentifier)
|
|
|
+ PreferencesUtil.putSync('isShowWX',true)
|
|
|
+ })
|
|
|
.height(48)
|
|
|
|
|
|
Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
|
|
|
@@ -1507,6 +1514,29 @@ export struct SettingPage {
|
|
|
.width("100%")
|
|
|
.padding(10)
|
|
|
}
|
|
|
+
|
|
|
+ @State appIdentifier:string=''
|
|
|
+ geIDD() {
|
|
|
+ // 获取应用签名等信息示例代码
|
|
|
+ let bundleFlags = bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION |
|
|
|
+ bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_SIGNATURE_INFO;
|
|
|
+ try {
|
|
|
+ bundleManager.getBundleInfoForSelf(bundleFlags).then((data) => {
|
|
|
+ hilog.info(0x0000, 'testTag11', 'getBundleInfoForSelf successfully. Data: %{public}s', JSON.stringify(data));
|
|
|
+ let inde = JSON.stringify(data)
|
|
|
+ this.appIdentifier = inde.substring(inde.indexOf('appIdentifier'),inde.indexOf('"certificate'))
|
|
|
+ hilog.info(0x0000, 'testTag11', 'appIdentifier Data: %{public}s', this.appIdentifier);
|
|
|
+ }).catch((err: BusinessError) => {
|
|
|
+ hilog.error(0x0000, 'testTag11', 'getBundleInfoForSelf failed. Cause: %{public}s', err.message);
|
|
|
+ });
|
|
|
+ } catch (err) {
|
|
|
+ let message = (err as BusinessError).message;
|
|
|
+ hilog.error(0x0000, 'testTag33', 'getBundleInfoForSelf failed: %{public}s', message);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
// 主题色类型声明
|