Jelajahi Sumber

设置增加appIdentifier的显示
微信登录设置隐藏

onecold 1 tahun lalu
induk
melakukan
c7ecc2acc6

+ 2 - 2
AppScope/app.json5

@@ -2,8 +2,8 @@
   "app": {
     "bundleName": "com.xgplayer.ttmusic.hm",
     "vendor": "example",
-    "versionCode": 20250621,
-    "versionName": "1.4.1",
+    "versionCode": 20250701,
+    "versionName": "1.4.2",
     "icon": "$media:app_icon",
     "label": "$string:app_name",
     "multiAppMode": {

+ 2 - 15
entry/oh-package-lock.json5

@@ -1,22 +1,15 @@
 {
   "meta": {
-    "stableOrder": true
+    "stableOrder": true,
+    "enableUnifiedLockfile": false
   },
   "lockfileVersion": 3,
   "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
   "specifiers": {
-    "@ohos/ijkplayer@../ijkplayer": "@ohos/ijkplayer@../ijkplayer",
     "@tencent/wechat_open_sdk@1.0.0": "@tencent/wechat_open_sdk@1.0.0",
-    "@types/libijkplayer_audio_napi.so@../ijkplayer/src/main/cpp/types/ijkplayer_audio_napi": "@types/libijkplayer_audio_napi.so@../ijkplayer/src/main/cpp/types/ijkplayer_audio_napi",
     "libentry.so@src/main/cpp/types/libentry": "libentry.so@src/main/cpp/types/libentry"
   },
   "packages": {
-    "@ohos/ijkplayer@../ijkplayer": {
-      "name": "@ohos/ijkplayer",
-      "version": "2.0.5",
-      "resolved": "../ijkplayer",
-      "registryType": "local"
-    },
     "@tencent/wechat_open_sdk@1.0.0": {
       "name": "@tencent/wechat_open_sdk",
       "version": "1.0.0",
@@ -24,12 +17,6 @@
       "resolved": "https://repo.harmonyos.com/ohpm/@tencent/wechat_open_sdk/-/wechat_open_sdk-1.0.0.har",
       "registryType": "ohpm"
     },
-    "@types/libijkplayer_audio_napi.so@../ijkplayer/src/main/cpp/types/ijkplayer_audio_napi": {
-      "name": "@types/libijkplayer_audio_napi.so",
-      "version": "2.0.3-rc.3",
-      "resolved": "../ijkplayer/src/main/cpp/types/ijkplayer_audio_napi",
-      "registryType": "local"
-    },
     "libentry.so@src/main/cpp/types/libentry": {
       "name": "libentry.so",
       "version": "1.0.0",

+ 30 - 0
entry/src/main/ets/pages/SettingPage.ets

@@ -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);
+    }
+  }
+
+
+
 }
 
 // 主题色类型声明

+ 1 - 0
entry/src/main/ets/pages/UserCenter.ets

@@ -490,6 +490,7 @@ export struct UserCenter {
           }
           .width(100)
           .height(100)
+          .visibility(PreferencesUtil.getBooleanSync('isShowWX',false)?Visibility.Visible:Visibility.None)
           .backgroundColor(Color.White)
           // .border({ color: this.themeColor, width: 2 })
           .borderRadius(20)

+ 1 - 1
entry/src/main/ets/view/LocalMusic.ets

@@ -3072,7 +3072,7 @@ export struct LocalMusic {
     .cachedCount(3)
     // .columnsTemplate('1fr '.repeat(this.currentWidthBreakpoint === WidthBreakpoint.WIDTH_SM ? 2 : 5))
     .columnsTemplate(this.twoFingerType==3?'repeat(auto-fit, 150)':this.twoFingerType==2?'repeat(auto-fit, 110)':'repeat(auto-fit, 80)')
-    .rowsGap(12)
+    .rowsGap(this.twoFingerType==3?25:this.twoFingerType==2?20:10)
     .visibility(this.isGridMusic?Visibility.Visible:Visibility.None)
     .scale({x:this.scaleValue,y:this.scaleValue,z:1})
     .gesture(PinchGesture({ fingers: 2 })

+ 1 - 1
entry/src/main/ets/viewmodel/MainViewModel.ets

@@ -69,7 +69,7 @@ export  class  MainViewModel{
       new ItemData($r('app.string.local_music'), { type: 'symbol', value: $r('sys.symbol.music') }, MainViewModel.MENU_MUSIC, false),
       new ItemData($r('app.string.user_center'), { type: 'symbol', value: $r('sys.symbol.person') }, MainViewModel.MENU_USER, false),
       new ItemData($r('app.string.file_scan'), { type: 'symbol', value: $r('sys.symbol.doc_text_badge_magnifyingglass') },MainViewModel.MENU_FILE_SCAN,false),
-      new ItemData($r('app.string.vip'), { type: 'symbol', value: $r('sys.symbol.vip_hand') }, MainViewModel.MENU_VIP, false),
+      // new ItemData($r('app.string.vip'), { type: 'symbol', value: $r('sys.symbol.vip_hand') }, MainViewModel.MENU_VIP, false),
       new ItemData($r('app.string.haoping'), { type: 'symbol', value: $r('sys.symbol.flower') },MainViewModel.MENU_HAOPING,false),
       new ItemData($r('app.string.persion_duty'),{ type: 'symbol', value: $r('sys.symbol.doc_plaintext') },MainViewModel.MENU_DUTY,false),
       new ItemData($r('app.string.yszc'), { type: 'symbol', value: $r('sys.symbol.lock') },MainViewModel.MENU_YSZC,false),