Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

chendeben 1 rok temu
rodzic
commit
7f868506d5

+ 2 - 2
AppScope/app.json5

@@ -2,8 +2,8 @@
   "app": {
     "bundleName": "com.xgplayer.ttmusic.hm",
     "vendor": "example",
-    "versionCode": 20250522,
-    "versionName": "1.3.8",
+    "versionCode": 20250605,
+    "versionName": "1.3.9",
     "icon": "$media:app_icon",
     "label": "$string:app_name",
     "multiAppMode": {

+ 5 - 4
entry/src/main/ets/common/constants/CommonConstants.ets

@@ -13,8 +13,6 @@
  * limitations under the License.
  */
 
-import { resourceManager } from '@kit.LocalizationKit';
-import { VideoItem } from '../../viewmodel/VideoItem';
 import { VideoSpeed } from '../../viewmodel/VideoSpeed';
 
 /**
@@ -22,7 +20,7 @@ import { VideoSpeed } from '../../viewmodel/VideoSpeed';
  */
 export class CommonConstants {
 
-  static readonly OPEN_DATE: string = '2025-05-24';
+  static readonly OPEN_DATE: string = '2025-06-06';
 
   static readonly ICP_NO: string = '闽ICP备18015191号-16A';
 
@@ -41,6 +39,10 @@ export class CommonConstants {
   static readonly LRC_API_2: string = 'https://api.lrc.cx/lyrics'
 
   static readonly COVER_API: string = 'https://lrc.ss5.xyz/cover'//https://lrc.ss5.xyz/cover?title=%E5%B1%B1%E6%B0%B4%E4%B9%8B%E9%97%B4&artist=%E8%AE%B8%E5%B5%A9
+
+
+  static readonly COVER_API2: string = 'https://api.lrc.cx/cover'
+
   //网络测速
   static readonly IS_YUN_CESU: string = "https://test.nju.edu.cn/";
   static readonly IS_YUN_CESU2: string = "http://speedtest.im/";
@@ -86,7 +88,6 @@ export class CommonConstants {
   static readonly SORT_ARRAY = ["按艺术家升序", "按艺术家降序", "按专辑升序", "按专辑降序", "按名称升序", "按名称降序", "按添加时间升序",
   "按添加时间降序"]
 
-  static readonly TOP_HEIGHT: number = 35;
 
   //德本的接口调用微信支付下单接口返回的支付交易会话ID,该值有效期为2小时。
   static readonly WX_PAY_API: string = "https://pay.ss5.xyz/wechat/prepay"

+ 7 - 4
entry/src/main/ets/common/util/NetAxiosUtil.ets

@@ -28,7 +28,7 @@ class NetAxiosUtil{
       let requestUrl = baseUrl
         + '?title=' + encodeURIComponent(title.trim()) + '&artist=' + encodeURIComponent(artist.trim());
 
-      LogUtil.debug("Heanup requestUrl =" + requestUrl + '; title = '+title+'; artist = '+artist)
+      // LogUtil.debug("Heanup requestUrl =" + requestUrl + '; title = '+title+'; artist = '+artist)
 
       const httpRequest = http.createHttp();
       const options: http.HttpRequestOptions = {
@@ -41,7 +41,7 @@ class NetAxiosUtil{
 
       if(response.responseCode === 200){
         let res = response.result as string;
-        LogUtil.debug("onecold res 11 =" + res)
+        // LogUtil.debug("onecold res 11 =" + res)
         let fileContent = ''
         if(isApi2){
           fileContent =  res
@@ -70,7 +70,7 @@ class NetAxiosUtil{
       let baseUrl = cover_api
       LogUtil.debug("onecold getLyricCover baseUrl = "+baseUrl+title+artist);
       if(cover_api==undefined&&StrUtil.isEmpty(cover_api)){
-        LogUtil.debug("onecold getLyricCover baseUrl2 = "+baseUrl);
+        // LogUtil.debug("onecold getLyricCover baseUrl2 = "+baseUrl);
         // baseUrl =  PreferencesUtil.getStringSync('COVER_API','')
         baseUrl = ''
       }
@@ -79,6 +79,9 @@ class NetAxiosUtil{
         LogUtil.debug("onecold Heanup 未设置API");
         return ''
       }
+      if(baseUrl ===CommonConstants.COVER_API2){
+        baseUrl = CommonConstants.COVER_API
+      }
       const cover_url = baseUrl
         + '?title=' + encodeURIComponent(title.trim()) + '&artist=' + encodeURIComponent(artist.trim());
       const httpRequest = http.createHttp();
@@ -87,7 +90,7 @@ class NetAxiosUtil{
         readTimeout: 3000,
         connectTimeout: 3000,
       };
-      LogUtil.debug("onecold Heanup 请求封面URL: " + cover_url);
+      // LogUtil.debug("onecold Heanup 请求封面URL: " + cover_url);
       const response: http.HttpResponse = await httpRequest.request(cover_url, options);
       if (response.responseCode === 200) {
         const res = response.result as string;

+ 8 - 6
entry/src/main/ets/pages/AboutPage.ets

@@ -1,7 +1,7 @@
 import TitleBar from '../view/TitleBar'
 import { router } from '@kit.ArkUI'
 import { CommonConstants } from '../common/constants/CommonConstants'
-import { AppUtil, ToastUtil } from '@pura/harmony-utils'
+import { AppUtil, DisplayUtil, ToastUtil } from '@pura/harmony-utils'
 import { Utility } from '../common/util/Utility'
 import { ConfigurationConstant } from '@kit.AbilityKit'
 import { BreakpointTypeEnum } from '../common/util/BreakpointSystem'
@@ -19,7 +19,7 @@ export struct AboutPage{
 
   onColorModeChange() {
     this.isDarkMode = this.currentMode === ConfigurationConstant.ColorMode.COLOR_MODE_DARK
-    this.titleBarModel.setTitleFontColor($r('app.color.title_text'))
+    this.titleBarModel
       .setTitleBarBackground($r('app.color.title_bar_bg'))
       .setLeftTitleBackground($r('app.color.title_bar_bg'))
   }
@@ -60,13 +60,14 @@ export struct AboutPage{
       Column(){
         Line().width('100%').height('100%')
       }
-      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:CommonConstants.TOP_HEIGHT)
+      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:px2vp(AppUtil.getStatusBarHeight()))
       .backgroundColor($r('app.color.title_bar_bg'))
       .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
-
       TitleBar({model:$titleBarModel})
       Scroll(){
+
         Column(){
+
           Image($r('app.media.icon'))
             .width(150)
             .height(150)
@@ -134,10 +135,11 @@ export struct AboutPage{
               })
             })
         }
-        .height('95%')
+        .height('100%')
         .width('100%')
+
       }
-      .height('100%')
+      .height(px2vp(DisplayUtil.getHeight()-AppUtil.getStatusBarHeight()-AppUtil.getNavigationIndicatorHeight()))
       .backgroundColor(this.isDarkMode ? '#1A1A1A' : undefined)
       .linearGradient(!this.isDarkMode ? {colors:[['#FF4081', 0.0], ['#FF8C00', 0.6]]} : undefined)
     }

+ 33 - 2
entry/src/main/ets/pages/NewIndex.ets

@@ -7,7 +7,7 @@ import { CommonConstants } from '../common/constants/CommonConstants';
 import { VideoItem } from '../viewmodel/VideoItem';
 import ScreenUtil from '../common/util/ScreenUtil';
 import { Utility } from '../common/util/Utility';
-import { emitter } from '@kit.BasicServicesKit';
+import { BusinessError, emitter } from '@kit.BasicServicesKit';
 import { common } from '@kit.AbilityKit';
 import { AdSlot, AdSlotBuilder,
   CSJAdCreator,
@@ -25,6 +25,8 @@ import ConfigurationConstant from '@ohos.app.ability.ConfigurationConstant';
 import { SettingPage } from './SettingPage';
 import { deviceInfo } from '@kit.BasicServicesKit';
 import { resourceManager } from '@kit.LocalizationKit';
+import { systemShare } from '@kit.ShareKit';
+import { uniformTypeDescriptor } from '@kit.ArkData';
 
 const TAG = 'NewIndex'; // 日志标签
 
@@ -41,7 +43,7 @@ struct NewIndex{
 
   /** 应用包名 */
   @State bundleName:string = ''
-
+  @State appName:string = ''
   /** 是否显示侧边抽屉菜单 */
   @Provide isShowDrawer:boolean = false;
   /** 抽屉菜单 X 轴偏移量,用于手势滑动动画 */
@@ -158,6 +160,9 @@ struct NewIndex{
 
 async aboutToAppear() {
   Utility.enableFullScreen()
+  Utility.getAppName(getContext(this)).then((appName:string)=>{
+    this.appName = appName
+  })
   this.breakpointSystem.register();
   let params = router.getParams() as Record<string, Object>;
   this.videoLocalList = params.videoList as VideoItem[];
@@ -410,6 +415,10 @@ async aboutToAppear() {
                   params: { titleName: '隐私政策', webUrl: CommonConstants.NEW_YS_HW }
                 });
                 break
+
+              case MainViewModel.MENU_SHARE:
+                 this.gotoShare()
+                break
             }
           })
         }
@@ -426,6 +435,28 @@ async aboutToAppear() {
     .edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果
   }
 
+  gotoShare(){
+    let shareData: systemShare.SharedData = new systemShare.SharedData({
+      utd: uniformTypeDescriptor.UniformDataType.TEXT,
+      content: 'https://appgallery.huawei.com/app/detail?id='+this.bundleName,
+      title: this.appName, // 不传title字段时,显示content
+      description: '精心雕琢的无损音乐播放器',
+      // thumbnail: new Uint8Array() // 推荐传入适合的缩略图 不传则显示默认text图标
+    });
+
+    // 进行分享面板显示
+    let controller: systemShare.ShareController = new systemShare.ShareController(shareData);
+    let context = getContext(this) as common.UIAbilityContext;
+    controller.show(context, {
+      selectionMode: systemShare.SelectionMode.SINGLE,
+      previewMode: systemShare.SharePreviewMode.DETAIL,
+    }).then(() => {
+      console.info('ShareController show success.');
+    }).catch((error: BusinessError) => {
+      console.error(`ShareController show error. code: ${error.code}, message: ${error.message}`);
+    });
+  }
+
   /**
    * ================== 穿山甲广告相关 ==================
    */

+ 32 - 29
entry/src/main/ets/pages/ScanFilePage.ets

@@ -1,6 +1,6 @@
 import TitleBar from '../view/TitleBar'
 import {  router } from '@kit.ArkUI'
-import { FileUtil, LogUtil, PreferencesUtil, ToastUtil } from '@pura/harmony-utils'
+import { AppUtil, FileUtil, LogUtil, PreferencesUtil, ToastUtil } from '@pura/harmony-utils'
 import lottie from '@ohos/lottie'
 import { AnimationItem } from '@ohos/lottie'
 import { MessageEvents, taskpool, worker } from '@kit.ArkTS'
@@ -131,7 +131,7 @@ export struct ScanFilePage{
       Column(){
         Line().width('100%').height('100%')
       }
-      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:CommonConstants.TOP_HEIGHT)
+      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:px2vp(AppUtil.getStatusBarHeight()))
       .backgroundColor($r('app.color.title_bar_bg'))
       .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
       TitleBar({ model: $titleBarModel })
@@ -155,11 +155,11 @@ export struct ScanFilePage{
           }
 
 
-          Text(this.strText)
-            .margin({ right: 20,top:20,bottom:20 })
-            .fontSize(16)
-            .fontColor(Color.Black)
-            .fontWeight(480)
+          // Text(this.strText)
+          //   .margin({ right: 20,top:20,bottom:20 })
+          //   .fontSize(16)
+          //   .fontColor(Color.Black)
+          //   .fontWeight(480)
 
 
           Column() {
@@ -175,13 +175,13 @@ export struct ScanFilePage{
                 +`${this.appName} `+
               Utility.resourceToString(getContext(this),$r('app.string.file_scan_tip_one_1')))
                 .margin({ left: 10, right: 20 })
-                .fontSize(11)
+                .fontSize(15)
                 .fontColor(Color.Gray)
                 .fontWeight(480)
                 .layoutWeight(1)
             }
             .width('100%')
-            .margin({ left:25,right: 10 ,top:20 })
+            .margin({ left:25,right: 25 ,top:20 })
 
 
             Row() {
@@ -194,34 +194,37 @@ export struct ScanFilePage{
                 .alignSelf(ItemAlign.Center)
               Text($r('app.string.file_scan_tip_two'))
                 .margin({ left: 10, right: 20 })
-                .fontSize(11)
+                .fontSize(15)
                 .fontColor(Color.Gray)
                 .fontWeight(480)
                 .layoutWeight(1)
 
             }
             .width('100%')
-            .margin({ left:25,right: 10 ,top:20 })
-
-            Column() {
-              Button($r('app.string.start_scan'), { type: ButtonType.Capsule, stateEffect: false })
-
-                .width('60%')
-                .height(55)
-                .margin({ top: 50, bottom: 20 })
-                .linearGradient({
-                  direction: GradientDirection.Right,
-                  colors: [['#ff37a0fc', 0.0], ['#67e667', 0.5], ['#f5856e', 1.0]]
-                })
-                .visibility(this.isStart ? Visibility.Hidden : Visibility.Visible)
-                .onClick(() => {
-                  this.doOptimize()
-
-                })
-                .alignSelf(ItemAlign.Center)
+            .margin({ left:25,right: 25 ,top:20,bottom:20 })
 
+          }
+          .backgroundColor($r('app.color.index_background'))
+          .margin({ left:25,right: 25,top:20,bottom:20  })
+          .borderRadius(20)
+
+          Column() {
+            Button(this.isStart?'正在扫描':$r('app.string.start_scan'), { type: ButtonType.Capsule, stateEffect: false })
+
+              .width('60%')
+              .height(55)
+              .margin({ top: 30, bottom: 20 })
+              .linearGradient({
+                direction: GradientDirection.Right,
+                colors: [['#ff37a0fc', 0.0], ['#67e667', 0.5], ['#f5856e', 1.0]]
+              })
+              .enabled(this.isStart ?false:true)
+              .onClick(() => {
+                this.doOptimize()
+
+              })
+              .alignSelf(ItemAlign.Center)
 
-            }
 
           }
 

+ 16 - 8
entry/src/main/ets/pages/SettingPage.ets

@@ -92,7 +92,7 @@ export struct SettingPage {
           value: '保存',
           action: () => {
             if (this.apiDialogType === 'lyric') {
-              this.lyricApiUrl = this.tempApiUrl
+              this.lyricApiUrl = this.tempApiUrl.trim()
               PreferencesUtil.put('LRC_API', this.lyricApiUrl)
               this.getUIContext().getPromptAction().showToast({
                 message: '保存成功,当前LRC_API:' + this.lyricApiUrl,
@@ -101,7 +101,7 @@ export struct SettingPage {
                 bottom: 85
               })
             } else {
-              this.coverApiUrl = this.tempApiUrl
+              this.coverApiUrl = this.tempApiUrl.trim()
               PreferencesUtil.put('COVER_API', this.coverApiUrl)
               this.getUIContext().getPromptAction().showToast({
                 message: '保存成功,当前COVER_API:' + this.coverApiUrl,
@@ -198,7 +198,7 @@ export struct SettingPage {
       Column(){
         Line().width('100%').height('100%')
       }
-      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:CommonConstants.TOP_HEIGHT)
+      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:px2vp(AppUtil.getStatusBarHeight()))
       .backgroundColor($r('app.color.title_bar_bg'))
       .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
       TitleBar({ model: $titleBarModel })
@@ -516,20 +516,28 @@ export struct SettingPage {
               this.tempApiUrl = this.coverApiUrl
               this.apiDialogController.open()
             })
+            .justifyContent(FlexAlign.Center)
             .height(55)
           }
           .backgroundColor($r('app.color.settings_background_main'))
           .borderRadius(20)
-          .margin({ left: 0, right: 0, top: 10, bottom: 30 })
+          .margin({ left: 0, right: 0, top: 10, bottom: 20 })
           .padding(0)
+
+          //空白
+          Column() {
+            Blank()
+              .height(88)
+          }.height(88)
         }
-        .margin({ left: 35, right: 35, top: 20, bottom: 30 })
+        .margin({ left: this.currentBreakpoint !== BreakpointTypeEnum.SM?35:20,
+          right: this.currentBreakpoint !== BreakpointTypeEnum.SM?35:20, top: 20, bottom: 20 })
         .justifyContent(FlexAlign.Start)
       }
       .scrollBar(BarState.Auto)
       .height('100%')
       .width('100%')
-      .margin({bottom:40})
+      .margin({bottom:10})
       .backgroundColor($r('app.color.settings_background'))
     }
 
@@ -596,12 +604,12 @@ export struct SettingPage {
   CustomizeBg() {
     Column() {
       Image( this.customizeBgPath)
-        .height('62%')
+        .height('52%')
         .alt($r('app.color.white'))
         .objectFit( ImageFit.Contain)
         .borderRadius(20)
         .clip(true)
-        .margin({bottom:30 })
+        .margin({left:30,right:30,bottom:30 })
 
       Row() {
 

+ 16 - 10
entry/src/main/ets/pages/VipPage.ets

@@ -55,10 +55,10 @@ export  struct  VipPage{
   static readonly IS_AGREE: string = 'isAgree';
   static readonly FOEVEER_DATE: string = 'forever';
   @State params: object = router.getParams()
-  @State payPrice:number = 38.8 //9是一个  19是一年  19是永久赞助
+  @State payPrice:number = 29.88 //9是一个  19是一年  19是永久赞助
   static readonly TYPE_MONTH: number = 9.8;
   static readonly TYPE_YEAR: number = 19
-  static readonly TYPE_FOREVER: number = 38.8
+  static readonly TYPE_FOREVER: number = 29.88
 
 
 
@@ -122,7 +122,7 @@ export  struct  VipPage{
       Column(){
         Line().width('100%').height('100%')
       }
-      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:CommonConstants.TOP_HEIGHT)
+      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:px2vp(AppUtil.getStatusBarHeight()))
       .backgroundColor($r('app.color.title_bar_bg'))
       .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
       TitleBar({ model: $titleBarModel })
@@ -137,7 +137,7 @@ export  struct  VipPage{
               .width(38)
               .height(38)
             Row(){
-              Text('欢迎尊敬的用户  ')
+              Text(Utility.isNoble()?'欢迎尊敬的赞助用户 ':'欢迎尊敬的用户  ')
                 .margin({top:15,bottom:8})
                 .fontSize(15)
                 .maxLines(1)
@@ -226,7 +226,6 @@ export  struct  VipPage{
               .fontSize(12)
               .fontColor(Color.Gray)
               .fontWeight(480)
-              .id('text_update')
             Blank()
 
 
@@ -235,7 +234,7 @@ export  struct  VipPage{
           .height(38)
 
           Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
-
+            .visibility(Utility.isNoble()?Visibility.None:Visibility.Visible)
           Row() {
             Text()
               .width(10)
@@ -250,7 +249,6 @@ export  struct  VipPage{
               .fontSize(15)
               .fontColor(Color.Gray)
               .fontWeight(480)
-              .id('text_update')
             Blank()
             Checkbox()
               .select(this.payPrice===VipPage.TYPE_MONTH?true:false)
@@ -266,6 +264,7 @@ export  struct  VipPage{
               .height(22)
 
           }
+          .visibility(Utility.isNoble()?Visibility.None:Visibility.Visible)
           .onClick(() => {
             this.payPrice = VipPage.TYPE_MONTH
           })
@@ -289,11 +288,18 @@ export  struct  VipPage{
               .fontSize(15)
               .fontColor(Color.Gray)
               .fontWeight(480)
-              .id('text_update')
+              .visibility(Utility.isNoble()?Visibility.None:Visibility.Visible)
+            Text('您还可以继续赞助支持我们:'+VipPage.TYPE_FOREVER+'元 ')
+              .margin({ left: 10, right: 20 })
+              .fontSize(15)
+              .fontColor(Color.Gray)
+              .fontWeight(480)
+              .visibility(Utility.isNoble()?Visibility.Visible:Visibility.None)
             Text('(原价¥49.8)')
               .fontSize(14)
               .fontColor(Color.Gray)
               .decoration({ type: TextDecorationType.LineThrough })
+              .visibility(Utility.isNoble()?Visibility.None:Visibility.Visible)
             Blank()
             Checkbox()
               .select(this.payPrice===VipPage.TYPE_FOREVER?true:false)
@@ -329,7 +335,6 @@ export  struct  VipPage{
               .fontSize(12)
               .fontColor(Color.Gray)
               .fontWeight(480)
-              .id('text_update')
             Blank()
 
 
@@ -388,7 +393,6 @@ export  struct  VipPage{
               .fontSize(15)
               .fontColor(Color.Gray)
               .fontWeight(480)
-              .id('text_update')
             Blank()
             Checkbox()
               .select(this.payType===1?true:false)
@@ -477,6 +481,8 @@ export  struct  VipPage{
 
       }
       .layoutWeight(1)
+      .margin({ left: this.currentBreakpoint !== BreakpointTypeEnum.SM?15:0,
+        right: this.currentBreakpoint !== BreakpointTypeEnum.SM?15:0 })
       }
       .scrollBar(BarState.Auto)
       .height('100%')

+ 2 - 2
entry/src/main/ets/pages/WebIndex.ets

@@ -1,7 +1,7 @@
 import TitleBar from '../view/TitleBar'
 import { router } from '@kit.ArkUI'
 import { webview } from '@kit.ArkWeb';
-import { NetworkUtil, ToastUtil } from '@pura/harmony-utils';
+import { AppUtil, NetworkUtil, ToastUtil } from '@pura/harmony-utils';
 import { ConfigurationConstant } from '@kit.AbilityKit';
 import { Utility } from '../common/util/Utility';
 import { BreakpointTypeEnum } from '../common/util/BreakpointSystem';
@@ -67,7 +67,7 @@ struct  WebIndex{
       Column(){
         Line().width('100%').height('100%')
       }
-      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:CommonConstants.TOP_HEIGHT)
+      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:px2vp(AppUtil.getStatusBarHeight()))
       .backgroundColor($r('app.color.title_bar_bg'))
       .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
       TitleBar({model:$titleBarModel})

+ 61 - 54
entry/src/main/ets/view/LocalMusic.ets

@@ -1542,6 +1542,7 @@ export struct LocalMusic {
       pup = XPopup.Builder()
         .setPopupPosition(popupPosition)
         .atView(id)
+        // .setHeight(this.isCoverOpacity()?100:420)
         .setBackgroundColor(Color.Black)
         .asBubble(wrapBuilder(cutPopupBuilder), dataBean)
         .show()
@@ -1550,6 +1551,7 @@ export struct LocalMusic {
       pup = XPopup.Builder()
         .setPopupPosition(popupPosition)
         .atView(id)
+        // .setHeight(this.isCoverOpacity()?280:420)
         .setBackgroundColor(Color.White)
         .asBubble(wrapBuilder(cutPopupBuilder), dataBean)
         .show()
@@ -1617,6 +1619,7 @@ export struct LocalMusic {
       pup = XPopup.Builder()
         .setPopupPosition(popupPosition)
         .atView(id)
+        .setMaxHeight('60%')
         .setBackgroundColor(Color.Black)
         .asBubble(wrapBuilder(cutPopupBuilder), dataBean)
         .show();
@@ -1624,6 +1627,7 @@ export struct LocalMusic {
       pup = XPopup.Builder()
         .setPopupPosition(popupPosition)
         .atView(id)
+        .setMaxHeight('60%')
         .setBackgroundColor(Color.White)
         .asBubble(wrapBuilder(cutPopupBuilder), dataBean)
         .show();
@@ -1688,7 +1692,7 @@ export struct LocalMusic {
         Column(){
           Line().width('100%').height('100%')
         }
-        .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:CommonConstants.TOP_HEIGHT)
+        .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:px2vp(AppUtil.getStatusBarHeight()))
         .backgroundColor(this.isCustomizeBg?Color.Transparent:$r('app.color.title_bar_bg'))
         .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
         TitleBar({ model: $titleBarModel })
@@ -1807,29 +1811,29 @@ export struct LocalMusic {
             duration: 666,
             curve: 'ease-in-out' // 可选动画曲线
           })
-          .position({ bottom: 108 }) // 将 Row 固定在底部
-
-          Column() {
-            Button('导入音乐', { type: ButtonType.Capsule, stateEffect: true })
-              .width('50%')
-              .height(55)
-              .margin({ top: 50, bottom: 40 })
-              .backgroundColor($r('app.color.title_bar_bg'))
-
-              .onClick(() => {
-                this.showSheelDialog()
-              })
-
-          }
-          .height('100%')
-          .justifyContent(FlexAlign.Center)
-          .opacity(this.isZero ? 1 : 0)
-          .visibility(this.isZero && this.modeType === 0 ? Visibility.None : Visibility.None)
-          .animation({
-            duration: 666,
-            curve: 'ease-in-out' // 可选动画曲线
-          })
-          .width('100%')
+          .position({ bottom:this.isPhoneLan()?130: 168 }) // 将 Row 固定在底部
+
+          // Column() {
+          //   Button('导入音乐', { type: ButtonType.Capsule, stateEffect: true })
+          //     .width('50%')
+          //     .height(55)
+          //     .margin({ top: 50, bottom: 40 })
+          //     .backgroundColor($r('app.color.title_bar_bg'))
+          //
+          //     .onClick(() => {
+          //       this.showSheelDialog()
+          //     })
+          //
+          // }
+          // .height('100%')
+          // .justifyContent(FlexAlign.Center)
+          // .opacity(this.isZero ? 1 : 0)
+          // .visibility(this.isZero && this.modeType === 0 ? Visibility.None : Visibility.None)
+          // .animation({
+          //   duration: 666,
+          //   curve: 'ease-in-out' // 可选动画曲线
+          // })
+          // .width('100%')
         }
         .width('100%')
         .height('100%')
@@ -1845,9 +1849,8 @@ export struct LocalMusic {
       .width('100%')
       .height('100%')
       .backgroundImage(this.isCustomizeBg?this.customizeBgPath:$r('app.color.bottom_control_background'))
-      .backgroundImageSize({ height: '100%'})
+      .backgroundImageSize(this.isCoverOpacity()?{width:'100%'}:{ height: '100%'})
       .backgroundImagePosition(Alignment.Center)
-      // .backgroundColor($r('app.color.bottom_control_background'))
       .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
 
     }
@@ -2308,7 +2311,8 @@ export struct LocalMusic {
                 });
             }
             .layoutWeight(1)
-            .margin({ left: 5, right: 5, bottom: 1 });
+            .margin({ left: this.currentBreakpoint !== BreakpointTypeEnum.SM?35:5,
+              right: this.currentBreakpoint !== BreakpointTypeEnum.SM?35:5, bottom: 1 });
           });
         }
         .width('100%')
@@ -2818,7 +2822,7 @@ export struct LocalMusic {
       }, (item: VideoItem) => item.filePath)
     }
     // .divider({ strokeWidth: 1, color: this.isDarkMode? '#333333':'#ffe9f0f0' })
-    .margin({ bottom: this.isPuraWP() ? 100 : 158 })
+    .margin({ bottom: this.isCoverOpacity() ? 50 : 158 })
     .cachedCount(30)
     .borderRadius(20)
     .layoutWeight(1)
@@ -2839,6 +2843,7 @@ export struct LocalMusic {
       }).getValue(this.currentBreakpoint)
     )
     .onScrollFrameBegin((offset: number) => {
+
       if (this.currentWidthBreakpoint !== WidthBreakpoint.WIDTH_SM ||
         (this.currentHeightBreakpoint !== HeightBreakpoint.HEIGHT_MD &&
           this.currentHeightBreakpoint !== HeightBreakpoint.HEIGHT_SM)) {
@@ -3122,6 +3127,7 @@ export struct LocalMusic {
         right: 16
       })
       Line().width('100%').height(25).backgroundColor($r('app.color.bottom_control_background'))
+        // .visibility(this.isPhoneLan()?Visibility.None:this.isCustomizeBg?Visibility.Hidden:Visibility.Visible)
         .visibility(this.isCustomizeBg?Visibility.Hidden:Visibility.Visible)
     }
 
@@ -3296,14 +3302,7 @@ export struct LocalMusic {
               .stateEffect(true)
               .margin({ right: 12, left: 5 })
               .onClick(async () => {
-
-                if (this.currentSong !== undefined) {
-                  let artist = this.currentSong?.artist
-                  if (StrUtil.isEmpty(artist) || artist === undefined) {
-                    artist = ''
-                  }
-                  this.searchCover(this.name, artist)
-                }
+                this.doSearchCover()
 
               })
 
@@ -4126,7 +4125,7 @@ export struct LocalMusic {
     return this.currentWidthBreakpoint === WidthBreakpoint.WIDTH_SM
       && this.currentHeightBreakpoint === HeightBreakpoint.HEIGHT_MD
   }
-
+  //是否是Pura X外屏,或者小屏幕,手机横屏
   isCoverOpacity() {
     if (this.isPuraWP()) {
       return true
@@ -4305,7 +4304,7 @@ export struct LocalMusic {
   @State bright: number = PlayConstants.BRIGHT;
   @State brightShow: boolean = PlayConstants.BRIGHT_SHOW;
   @State seekToShow: boolean = PlayConstants.BRIGHT_SHOW;
-  // @State screenHeight:number = 0
+
   @State screenWidth: number = 0
   @State screenHeight: number = 0
   @State statusBarHeight: number = 0
@@ -5421,7 +5420,7 @@ export struct LocalMusic {
 
       Row() {
         this.pushLyricButton($r('app.media.cut_current'), 0, '本地歌词')
-        // this.pushLyricButton($r('app.media.white_search'),  1, '获取歌词')
+        this.pushLyricButton($r('app.media.white_search'),  1, '获取歌词')
         // this.pushLyricButton($r('app.media.white_search'),  2, '获取歌词')
 
 
@@ -5561,10 +5560,10 @@ export struct LocalMusic {
     Row() {
       Image(icon)
         .width(14)
-        .margin({ left: 6 })
+        .margin({ left: 13 })
 
       Text(label)
-        .fontSize(10)
+        .fontSize(12)
         .margin({ left: 6 })
         .fontColor('#FFFFFF')
     }
@@ -5576,17 +5575,17 @@ export struct LocalMusic {
           break;
         case 1:
           //判断是不是赞助会员
-          // if(Utility.isNoble()){
+          if(PreferencesUtil.getStringSync('LRC_API','')===''){
+            ToastUtil.showToast('请到设置界面配置歌词服务器地址')
+            return
+          }
           if (StrUtil.isNotEmpty(this.videoUrl)) {
             ToastUtil.showToast('正在获取')
             this.isLyricSetting = false
             let lyricPath = this.videoUrl.substring(0, this.videoUrl.lastIndexOf('.')) + '.lrc'
             this.initLyric(lyricPath, true);
           }
-          // }else{
-          //   this.isLyricSetting = false
-          //   this.showVipDialog()
-          // }
+
 
           break;
         case 2:
@@ -5607,7 +5606,7 @@ export struct LocalMusic {
       }
     })
     .padding(5)
-    .width(90)
+    .width(110)
     .height(40)
     .margin({ left: 6, right: 6 })
     .border({
@@ -6066,19 +6065,27 @@ export struct LocalMusic {
         break;
 
       case 14: //搜索封面
-        if (this.currentSong !== undefined) {
-          let artist = this.currentSong?.artist
-          if (StrUtil.isEmpty(artist) || artist === undefined) {
-            artist = ''
-          }
-          this.searchCover(this.name, artist)
-        }
+        this.doSearchCover()
         this.isShowMoreView = false
         break;
     }
 
   }
 
+  doSearchCover(){
+    if(PreferencesUtil.getStringSync('COVER_API','')===''){
+      ToastUtil.showToast('请到设置界面配置封面服务器地址')
+      return
+    }
+    if (this.currentSong !== undefined) {
+      let artist = this.currentSong?.artist
+      if (StrUtil.isEmpty(artist) || artist === undefined) {
+        artist = ''
+      }
+      this.searchCover(this.name, artist)
+    }
+  }
+
   searchCover(title: string, artist: string) {
 
 

+ 3 - 0
entry/src/main/ets/viewmodel/MainViewModel.ets

@@ -41,6 +41,7 @@ export  class  MainViewModel{
   static readonly MENU_MIEDIA_ARTIST: number = 229;
   static readonly MENU_MIEDIA_ALBUM: number = 230;
   static readonly MENU_FILE_SCAN: number = 231;
+  static readonly MENU_SHARE: number = 232;
   //测滑菜单的数据
   getDrawerData(): Array<ItemData> {
     let drawerGridData: ItemData[] = [
@@ -57,6 +58,7 @@ export  class  MainViewModel{
       new ItemData($r('app.string.yszc'), $r('app.media.oh_pri'),MainViewModel.MENU_YSZC,false),
       new ItemData($r('app.string.about_me'), $r('app.media.oh_about'),MainViewModel.MENU_ABOUT,false),
       new ItemData($r('app.string.setting'), $r('app.media.setting_red'),MainViewModel.MENU_SETTING,false),
+      new ItemData($r('app.string.share_tt'), $r('app.media.oh_share'),MainViewModel.MENU_SHARE,false),
       // new ItemData($r('app.string.nor_setting'), $r('app.media.hm_gps'),MainViewModel.MENU_SETTING,false),
     ];
     return drawerGridData;
@@ -77,6 +79,7 @@ export  class  MainViewModel{
       new ItemData($r('app.string.yszc'), $r('app.media.oh_pri'),MainViewModel.MENU_YSZC,false),
       new ItemData($r('app.string.about_me'), $r('app.media.oh_about'),MainViewModel.MENU_ABOUT,false),
       new ItemData($r('app.string.setting'), $r('app.media.setting_red'),MainViewModel.MENU_SETTING,false),
+      new ItemData($r('app.string.share_tt'), $r('app.media.oh_share'),MainViewModel.MENU_SHARE,false),
       // new ItemData($r('app.string.nor_setting'), $r('app.media.hm_gps'),MainViewModel.MENU_SETTING,false),
     ];
     return drawerGridData;

+ 5 - 1
entry/src/main/resources/base/element/string.json

@@ -386,7 +386,7 @@
     },
     {
       "name": "file_scan_tip_one_1",
-      "value": "文件夹下,即可扫描。"
+      "value": "文件夹下,即可一键扫描。"
     },
     {
       "name": "file_scan_tip_two",
@@ -399,6 +399,10 @@
     {
       "name": "scaning",
       "value": "扫描中..."
+    },
+    {
+      "name": "share_tt",
+      "value": "分享应用"
     }
   ]
 }

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