Bläddra i källkod

删除第三方包 ibest 降低内存占用率 ibest占用300M 穿山甲占用500M

onecold 1 år sedan
förälder
incheckning
543acbb806

+ 1 - 3
entry/src/main/ets/entryability/EntryAbility.ets

@@ -18,7 +18,7 @@ import { DemoConstants } from './DemoConstants';
 
 import { Utility } from '../common/util/Utility';
 import { WXApi, WXEventHandler } from '../common/util/WXApiWrap';
-import { IBestInit } from '@ibestservices/ibest-ui';
+
 import { systemShare } from '@kit.ShareKit';
 
 /**
@@ -156,8 +156,6 @@ export default class EntryAbility extends UIAbility {
         hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
 
         windowStage.loadContent('pages/SplashIndex', (err, data) => {
-            IBestInit(windowStage, this.context)
-
             if (err.code) {
                 hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
                 return;

+ 0 - 8
entry/src/main/ets/pages/NewIndex.ets

@@ -27,7 +27,6 @@ import { deviceInfo } from '@kit.BasicServicesKit';
 import { resourceManager } from '@kit.LocalizationKit';
 import { systemShare } from '@kit.ShareKit';
 import { uniformTypeDescriptor } from '@kit.ArkData';
-import { IBestIcon } from "@ibestservices/ibest-ui";
 import { hilog } from '@kit.PerformanceAnalysisKit';
 
 
@@ -306,13 +305,6 @@ struct NewIndex{
                 .fontColor([this.themeColor])
                 .alignSelf(ItemAlign.Center)
                 .margin({ left: 2 })
-            }else if (typeof item.img === 'object' && item.img !== null && (item.img as sysResource).type === 'ibest') {
-              IBestIcon({
-                name: (item.img as sysResource).value as string,
-                iconSize:22,
-                color: this.themeColor,
-              }).margin({ left: 2 })
-                .alignSelf(ItemAlign.Center)
             }else {
               Image(item.img as Resource)
                 .height(22)

+ 57 - 42
entry/src/main/ets/pages/SettingPage.ets

@@ -10,16 +10,17 @@ import { fileIo, fileUri } from '@kit.CoreFileKit'
 import { BusinessError, emitter } from '@kit.BasicServicesKit'
 import { BreakpointTypeEnum } from '../common/util/BreakpointSystem'
 import { resourceManager } from '@kit.LocalizationKit'
-import {
-  IBestButton,
-  IBestColorPicker,
-  IBestField,
-  IBestIcon,
-  IBestPopup,
-  IBestRadio,
-  IBestRadioGroup
-} from '@ibestservices/ibest-ui'
+// import {
+//   IBestButton,
+//   IBestColorPicker,
+//   IBestField,
+//   IBestIcon,
+//   IBestPopup,
+//   IBestRadio,
+//   IBestRadioGroup
+// } from '@ibestservices/ibest-ui'
 import { Utility } from '../common/util/Utility'
+import { HSBColorPicker } from '@keke/color-picker'
 
 @Preview
 @Entry
@@ -243,31 +244,36 @@ export struct SettingPage {
   @Builder
   pickerBuilder() {
     Column({ space: 20 }) {
-      IBestColorPicker({
-        value: this.customColor
+      HSBColorPicker({
+        color: this.customColor,
+        radius: 8,
+        onChange:(value: string) =>{
+          this.customColor = value
+
+        }
       })
+        .layoutWeight(1)
+        .padding(25)
       Row({ space: 20 }) {
-        IBestButton({
-          text: "取消",
-          btnBorderRadius:10,
-          onBtnClick: () => {
+        Button('取消')
+          .stateEffect(true)
+          .onClick(() => {
             this.showColorPicker = false
-          }
-        })
-        IBestButton({
-          type: "primary",
-          text: "确定",
-          btnBorderRadius:10,
-          onBtnClick: () => {
+          })
+        Button('确定')
+          .stateEffect(true)
+          .onClick(() => {
             this.themeColor = this.customColor
             PreferencesUtil.putSync(SettingPage.THEME_COLOR_KEY, this.customColor)
             AppStorage.setOrCreate('themeColor', this.customColor)
             this.sendChangeEvent()
             this.showColorPicker = false
-          }
-        })
+          })
       }
-    }.padding(20)
+    }
+    .padding(20)
+    .width('80%')
+    .height(300)
   }
 
   @Builder
@@ -277,30 +283,34 @@ export struct SettingPage {
       Column() {
         Row() {
           Row(){
-            IBestIcon({ name: 'brush-o', color: this.themeColor , iconSize: 20 })
-              .margin({ right: 8 })
+            Image($r('app.media.theme'))
+              .width(20)
+              .height(20)
+              .fillColor(this.themeColor)
             Text('颜色模式')
               .fontSize(15)
+              .margin({left:8})
               .fontWeight(500)
           }
           .layoutWeight(1)
           Blank()
           Row(){
-            IBestRadioGroup({ group: this.colorGroup, active: $themeMode, placeDirection: Axis.Horizontal }) {
               ForEach(['自动', '日间', '夜间'], (item: string, idx: number) => {
                 Column() {
-                  IBestRadio({
+                  Radio({
+                    value: idx+"",
                     group: this.colorGroup,
-                    checkedColor: this.themeColor,
-                    label: '',
-                    name: idx
                   })
+                    .radioStyle({
+                      checkedBackgroundColor: this.themeColor
+                    })
                     .margin({ left: 3 })
                   Text(item)
                     .fontSize(15)
                     .fontColor($r('app.color.text_color'))
                     .margin({ top: 6 })
                 }
+                .margin({left:12})
                 .onClick(() => {
                   this.themeMode = idx
                   this.applyThemeMode(idx)
@@ -308,7 +318,6 @@ export struct SettingPage {
                 })
                 .alignItems(HorizontalAlign.Center)
               })
-            }
           }
           .margin({left:12,right:12})
         }
@@ -415,14 +424,20 @@ export struct SettingPage {
         bottom: 18
       })
       .padding({ top: 18, bottom: 18, left: 0, right: 0 })
-
-      // 主题色自定义弹窗
-      IBestPopup({
-        visible: $showColorPicker,
-        popupWidth: 320,
-        contentBuilder: (): void => this.pickerBuilder(),
-        cornerRadius:20,
+      .bindPopup(this.showColorPicker, {
+        builder: this.pickerBuilder(),
+        placement: Placement.Top,
+        mask: {color:'#33000000'},
+        enableArrow: false,//是否显示箭头
+        showInSubWindow: false,
+        onStateChange: (e) => {
+          if (!e.isVisible) {
+            this.showColorPicker = false
+          }
+        }
       })
+      // 主题色自定义弹窗
+
     }
     .padding({ top: 8, bottom: 8, left: 18, right: 18 })
     .width('100%')
@@ -449,8 +464,8 @@ export struct SettingPage {
         // 左侧返回按钮
         Row() {
           Image($r('app.media.left_back_white'))
-            .width(32)
-            .height(32)
+            .width(29)
+            .height(29)
             .margin({ left: 12, right: 8 })
             .onClick(() => {
               router.back();

+ 7 - 13
entry/src/main/ets/view/LocalMusic.ets

@@ -42,7 +42,7 @@ import { Verify } from './Verify';
 import { DrawerOptions } from '../dialog/DrawerOptions';
 import { RotatingCover } from './RotatingCover';
 import { PlayConstants } from '../common/constants/PlayConstants';
-import { displaySync, effectKit } from '@kit.ArkGraphics2D';
+import { effectKit } from '@kit.ArkGraphics2D';
 import { ColorConversion } from '../common/util/ColorConversion';
 import { LyricController, LyricParser, LyricView2 } from '@seagazer/cclyric';
 import { AvSessionController } from '../controller/AvSessionController';
@@ -82,7 +82,6 @@ import { deviceInfo } from '@kit.BasicServicesKit';
 import { HSBColorPicker, HSBColorPickerLayout } from '@keke/color-picker'
 import { DEBUG } from 'BuildProfile';
 import { LrcParser } from '@sgaolei/lrc_parser';
-import { IBestIcon } from "@ibestservices/ibest-ui";
 import app, { AppResponse } from '@system.app';
 import { Log } from '@tencent/wechat_open_sdk';
 import { TextNodeController } from './PipLyricTextBuilder';
@@ -2594,11 +2593,10 @@ export struct LocalMusic {
 
       Row({ space: 8 }) {
         Row({ space: 8 }) {
-          // Image($r("app.media.hm_play"))
-          IBestIcon({name:'play-circle-o',iconSize:25,color:this.themeColor})
+          Image($r("app.media.hm_play"))
             .width(25)
             .margin({ left: 8 })
-            // .fillColor(this.themeColor)
+            .fillColor(this.themeColor)
           Text(`播放全部`)
             .fontColor($r('app.color.text_color'))
             .fontSize(14)
@@ -2681,15 +2679,14 @@ export struct LocalMusic {
             this.isSearchMode = true
           })
 
-        // Image($r("app.media.refresh"))
-        IBestIcon({ name: 'replay',iconSize:25,color:this.themeColor })
-          // .width(25)
+        Image($r("app.media.refresh"))
+          .fillColor(this.themeColor)
+          .width(25)
           .visibility(this.isHistory || this.isCanBack || this.isSearchMode ? Visibility.None : Visibility.Visible)
           .animation({
             duration: 666,
             curve: 'ease-in-out' // 可选动画曲线
-          })// .opacity(this.opacityItem)
-          // .fillColor(this.themeColor)
+          })
           .clickEffect({ level: ClickEffectLevel.MIDDLE })
           .onClick(() => {
             if(this.isFavMusic){
@@ -2717,7 +2714,6 @@ export struct LocalMusic {
 
         Image(this.isMultiSelect ? $r("app.media.cancel_multi") : $r("app.media.top_flower"))
           .width(24)
-          // .fillColor('#ff5186')// .opacity(this.opacityItem)
           .visibility(this.isHistory || this.isSearchMode ? Visibility.None : Visibility.Visible)
           .animation({
             duration: 666,
@@ -6261,9 +6257,7 @@ export struct LocalMusic {
           .bindPopup(this.isShowPipBgSelectColor, {
             builder: this.SelectColor(false,isPip,true),
             placement: Placement.Top,
-            // autoCancel: true,
             mask: {color:'#33000000'},
-            // popupColor: Color.Yellow,
             enableArrow: false,//是否显示箭头
             showInSubWindow: false,
             onStateChange: (e) => {

+ 1 - 1
entry/src/main/resources/base/media/hm_play.svg

@@ -1 +1 @@
-<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1749661035231" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M908.714667 669.013333Q938.666667 593.408 938.666667 512q0-81.365333-29.952-157.013333-32.512-82.218667-95.018667-144.682667-62.464-62.506667-144.64-95.018667Q593.365333 85.333333 512 85.333333t-157.013333 29.952q-82.218667 32.512-144.682667 95.018667-62.506667 62.464-95.018667 144.64Q85.333333 430.634667 85.333333 512t29.952 157.013333q32.512 82.218667 95.018667 144.682667 62.464 62.464 144.64 95.018667Q430.634667 938.666667 512 938.666667t157.013333-29.952q82.218667-32.512 144.682667-95.018667 62.464-62.464 95.018667-144.64z m-79.36-282.666666Q853.333333 446.933333 853.333333 512q0 65.109333-23.978666 125.653333-26.026667 65.706667-75.989334 115.712-50.005333 49.962667-115.712 75.989334Q577.066667 853.333333 512 853.333333q-65.109333 0-125.653333-23.978666-65.706667-26.026667-115.712-75.989334-49.962667-50.005333-75.989334-115.712Q170.666667 577.066667 170.666667 512q0-65.109333 23.978666-125.653333 26.026667-65.706667 75.989334-115.712 50.005333-49.962667 115.712-75.989334Q446.933333 170.666667 512 170.666667q65.109333 0 125.653333 23.978666 65.706667 26.026667 115.712 75.989334 49.962667 50.005333 75.989334 115.712z m-335.061334 252.629333l128-92.373333a42.624 42.624 0 0 0 0-69.205334l-128-92.373333A42.666667 42.666667 0 0 0 426.666667 419.626667v184.746666a42.666667 42.666667 0 0 0 67.626666 34.602667z" fill="#4E5969" p-id="1481"></path></svg>
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750388475242" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4584" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M514 114.4c-220 0-398.8 178.9-398.8 398.8S294 912 514 912s398.8-178.9 398.8-398.8S733.4 114.4 514 114.4z m0 754.9c-196.5 0-356.1-159.6-356.1-356.1-0.6-196.5 159.6-356.1 356.1-356.1s356.1 159.6 356.1 356.1S710.5 869.3 514 869.3z" p-id="4585"></path><path d="M698.2 472.3L448.3 328.1c-14.9-8.6-32.7-8.6-47.6 0-15 8.7-23.9 24.1-23.9 41.4v288.3c0 17.3 8.9 32.8 23.9 41.4 7.5 4.3 15.7 6.5 23.8 6.5 8.2 0 16.3-2.1 23.8-6.4l249.9-144.2c15-8.6 23.9-24.1 23.9-41.5 0-17.2-8.9-32.7-23.9-41.3z m-21.3 45.9L427 662.3c-2 1.2-3.8 0.6-4.9 0-1.2-0.7-2.6-2-2.6-4.5V369.6c0-2.5 1.4-3.8 2.6-4.4 0.6-0.4 1.5-0.7 2.5-0.7 0.7 0 1.6 0.2 2.4 0.7l249.9 144.2c2.1 1.2 2.5 3.1 2.5 4.5 0 1.2-0.5 3.1-2.5 4.3z" p-id="4586"></path></svg>

BIN
entry/src/main/resources/base/media/refresh.png


+ 1 - 0
entry/src/main/resources/base/media/refresh.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750388562701" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5603" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M815.36 184.96V128a36.48 36.48 0 0 1 10.24-26.88 37.76 37.76 0 0 1 52.48 0 40.96 40.96 0 0 1 11.52 26.88v172.16a40.32 40.32 0 0 1-37.12 37.12h-173.44a40.32 40.32 0 0 1-26.88-11.52 37.76 37.76 0 0 1 0-52.48 35.84 35.84 0 0 1 26.88-10.24h108.8a372.48 372.48 0 0 0-453.12-75.52A367.36 367.36 0 0 0 170.24 364.8a374.4 374.4 0 0 0-19.84 242.56 369.92 369.92 0 0 0 132.48 202.24A375.04 375.04 0 0 0 512 888.32a368.64 368.64 0 0 0 263.68-108.8A376.32 376.32 0 0 0 885.12 512H960A448 448 0 1 1 136.32 270.08a438.4 438.4 0 0 1 192-164.48 444.16 444.16 0 0 1 256-32 455.68 455.68 0 0 1 230.4 111.36z" p-id="5604"></path></svg>

+ 0 - 28
oh-package-lock.json5

@@ -9,8 +9,6 @@
     "@cashier_alipay/cashiersdk@^15.8.32": "@cashier_alipay/cashiersdk@15.8.32",
     "@changwei/chardet@^1.0.0": "@changwei/chardet@1.0.0",
     "@chinalike/popup@^0.0.7": "@chinalike/popup@0.0.7",
-    "@hview/dayjs@^1.11.11": "@hview/dayjs@1.11.11",
-    "@ibestservices/ibest-ui@^2.1.2": "@ibestservices/ibest-ui@2.1.2",
     "@keke/color-picker@^1.0.4": "@keke/color-picker@1.0.4",
     "@ohos/lottie@^2.0.19": "@ohos/lottie@2.0.19",
     "@ohos/pulltorefresh@^2.1.1": "@ohos/pulltorefresh@2.1.1",
@@ -23,7 +21,6 @@
     "class-transformer@^0.5.1": "class-transformer@0.5.1",
     "libblueshield.so@oh_modules/.ohpm/@alipay+blueshieldsdk@cow+0gass5tzqhymzjby2f6sd+g2xtoatqsiyvi9qsy=/oh_modules/@alipay/blueshieldsdk/src/main/cpp/types/libblueshield": "libblueshield.so@oh_modules/.ohpm/@alipay+blueshieldsdk@cow+0gass5tzqhymzjby2f6sd+g2xtoatqsiyvi9qsy=/oh_modules/@alipay/blueshieldsdk/src/main/cpp/types/libblueshield",
     "liblrcparser.so@oh_modules/.ohpm/@sgaolei+lrc_parser@1.0.0/oh_modules/@sgaolei/lrc_parser/src/main/cpp/types/liblrcparser": "liblrcparser.so@oh_modules/.ohpm/@sgaolei+lrc_parser@1.0.0/oh_modules/@sgaolei/lrc_parser/src/main/cpp/types/liblrcparser",
-    "lunar@^1.0.0": "lunar@1.0.0",
     "pako@^2.1.0": "pako@2.1.0"
   },
   "packages": {
@@ -62,24 +59,6 @@
       "resolved": "https://repo.harmonyos.com/ohpm/@chinalike/popup/-/popup-0.0.7.har",
       "registryType": "ohpm"
     },
-    "@hview/dayjs@1.11.11": {
-      "name": "@hview/dayjs",
-      "version": "1.11.11",
-      "integrity": "sha512-JPJlAbcCS8STHIRnesbAPWCF6eAlIkGx5rDPGT8CesSCMsB6ZJWEH+l3hl0YqtmfofCCVpWrzjBG7Z2f18olAw==",
-      "resolved": "https://ohpm.openharmony.cn/ohpm/@hview/dayjs/-/dayjs-1.11.11.har",
-      "registryType": "ohpm"
-    },
-    "@ibestservices/ibest-ui@2.1.2": {
-      "name": "@ibestservices/ibest-ui",
-      "version": "2.1.2",
-      "integrity": "sha512-uKRdQIZ3K7M5gSnKnYy8aTzhKszTOVLXG1PINma2kpFgACLfeQdqWdN8MtoOnYX0ldng9s0fe+wtdF9reACb6A==",
-      "resolved": "https://repo.harmonyos.com/ohpm/@ibestservices/ibest-ui/-/ibest-ui-2.1.2.har",
-      "registryType": "ohpm",
-      "dependencies": {
-        "@hview/dayjs": "^1.11.11",
-        "lunar": "^1.0.0"
-      }
-    },
     "@keke/color-picker@1.0.4": {
       "name": "@keke/color-picker",
       "version": "1.0.4",
@@ -170,13 +149,6 @@
       "resolved": "oh_modules/.ohpm/@sgaolei+lrc_parser@1.0.0/oh_modules/@sgaolei/lrc_parser/src/main/cpp/types/liblrcparser",
       "registryType": "local"
     },
-    "lunar@1.0.0": {
-      "name": "lunar",
-      "version": "1.0.0",
-      "integrity": "sha512-sAMOxbVr7Sn/QEzEQZHz0CwYjOROTgDLc4842CX2d7f+1D2nlHc6T5jtZJoleIMPZItNJLj0GuOaB/JR+Iwe7Q==",
-      "resolved": "https://ohpm.openharmony.cn/ohpm/lunar/-/lunar-1.0.0.har",
-      "registryType": "ohpm"
-    },
     "pako@2.1.0": {
       "name": "pako",
       "version": "2.1.0",

+ 1 - 2
oh-package.json5

@@ -21,8 +21,7 @@
     "@changwei/chardet": "^1.0.0",
     "@cashier_alipay/cashiersdk": "^15.8.32",
     "@keke/color-picker": "^1.0.4",
-    "@sgaolei/lrc_parser": "^1.0.0",
-    "@ibestservices/ibest-ui": "^2.1.2"
+    "@sgaolei/lrc_parser": "^1.0.0"
   },
   "dynamicDependencies": {}
 }