onecold 8 månader sedan
förälder
incheckning
4654a83f36
3 ändrade filer med 44 tillägg och 37 borttagningar
  1. 2 2
      AppScope/app.json5
  2. 40 34
      entry/src/main/ets/view/LocalMusic.ets
  3. 2 1
      oh-package.json5

+ 2 - 2
AppScope/app.json5

@@ -2,8 +2,8 @@
   "app": {
     "bundleName": "com.xgplayer.ttmusic.hm",
     "vendor": "example",
-    "versionCode": 20251121,
-    "versionName": "1.7.1",
+    "versionCode": 20251130,
+    "versionName": "1.7.3",
     "icon": "$media:app_icon",
     "label": "$string:app_name",
     "multiAppMode": {

+ 40 - 34
entry/src/main/ets/view/LocalMusic.ets

@@ -4795,7 +4795,7 @@ export struct LocalMusic {
           .borderRadius(this.isCoverRectangle?9:'100%')
           .clip(true)
           .shadow({
-            radius: 8,
+            radius: 2,
             type: ShadowType.BLUR,
             color: 'on_primary'
           })
@@ -5402,17 +5402,19 @@ export struct LocalMusic {
         )
         .onScrollFrameBegin((offset: number) => {
           // 获取当前滚动偏移量
-          const currentOffsetY = this.waterScroller.currentOffset().yOffset;
-          // 判断滚动方向
-          if (currentOffsetY > this.prevOffsetY) {
-            console.log("onecold 向上滚动");
-            this.isShowTitleBar = false
-          } else if (currentOffsetY < this.prevOffsetY) {
-            console.log("onecold 向下滚动");
-            this.isShowTitleBar = true
-          }
-          // 更新前一次偏移量
-          this.prevOffsetY = currentOffsetY;
+          if(this.autoHideTitle){
+            const currentOffsetY = this.scroller.currentOffset().yOffset;
+            // 判断滚动方向
+            if (currentOffsetY > this.prevOffsetY) {
+              console.log("onecold 向上滚动");
+              this.isShowTitleBar = false
+            } else if (currentOffsetY < this.prevOffsetY) {
+              console.log("onecold 向下滚动");
+              this.isShowTitleBar = true
+            }
+            // 更新前一次偏移量
+            this.prevOffsetY = currentOffsetY;
+          }
 
           return { offsetRemain: offset };
         })
@@ -5784,17 +5786,19 @@ export struct LocalMusic {
       this.endIndex = end
     })
     .onScrollFrameBegin((offset: number) => {
-      const currentOffsetY = this.scroller.currentOffset().yOffset;
-      // 判断滚动方向
-      if (currentOffsetY > this.prevOffsetY) {
-        console.log("onecold 向上滚动");
-        this.isShowTitleBar = false
-      } else if (currentOffsetY < this.prevOffsetY) {
-        console.log("onecold 向下滚动");
-        this.isShowTitleBar = true
-      }
-      // 更新前一次偏移量
-      this.prevOffsetY = currentOffsetY;
+      if(this.autoHideTitle){
+        const currentOffsetY = this.scroller.currentOffset().yOffset;
+        // 判断滚动方向
+        if (currentOffsetY > this.prevOffsetY) {
+          console.log("onecold 向上滚动");
+          this.isShowTitleBar = false
+        } else if (currentOffsetY < this.prevOffsetY) {
+          console.log("onecold 向下滚动");
+          this.isShowTitleBar = true
+        }
+        // 更新前一次偏移量
+        this.prevOffsetY = currentOffsetY;
+      }
       if (this.currentWidthBreakpoint !== WidthBreakpoint.WIDTH_SM ||
         (this.currentHeightBreakpoint !== HeightBreakpoint.HEIGHT_MD &&
           this.currentHeightBreakpoint !== HeightBreakpoint.HEIGHT_SM)) {
@@ -6638,17 +6642,19 @@ export struct LocalMusic {
     })
     .onScrollFrameBegin((offset: number) => {
       // 获取当前滚动偏移量
-      const currentOffsetY = this.listScroller.currentOffset().yOffset;
-      // 判断滚动方向
-      if (currentOffsetY > this.prevOffsetY) {
-        console.log("onecold 向上滚动");
-        this.isShowTitleBar = false
-      } else if (currentOffsetY < this.prevOffsetY) {
-        console.log("onecold 向下滚动");
-        this.isShowTitleBar = true
-      }
-      // 更新前一次偏移量
-      this.prevOffsetY = currentOffsetY;
+      if(this.autoHideTitle){
+        const currentOffsetY = this.scroller.currentOffset().yOffset;
+        // 判断滚动方向
+        if (currentOffsetY > this.prevOffsetY) {
+          console.log("onecold 向上滚动");
+          this.isShowTitleBar = false
+        } else if (currentOffsetY < this.prevOffsetY) {
+          console.log("onecold 向下滚动");
+          this.isShowTitleBar = true
+        }
+        // 更新前一次偏移量
+        this.prevOffsetY = currentOffsetY;
+      }
 
       //滚动小屏幕 比如puraX外屏和手机横屏可以隐藏bottomBarHeight topBarHeight
       // if (this.isPhoneLan()) {

+ 2 - 1
oh-package.json5

@@ -26,7 +26,8 @@
     "@mcui/mccharts": "^2.8.9",
     "@nutpi/chinese_transverter": "^1.0.4",
     "@abner/track": "^1.0.2",
-    "@ohos/ijkplayer": "2.0.7-rc.5"
+    "@liuzhosoft/ftp4h": "^2.0.0",
+    "@webabcd/harmony-httpserver": "^1.0.0"
   },
   "dynamicDependencies": {}
 }