Ver Fonte

增加设置默认排序功能
时间排序修复为 添加时间排序
倍数播放的UI修改
讨论组的群号复制功能

onecold há 1 ano atrás
pai
commit
91678b1098

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

@@ -20,10 +20,13 @@ export struct SettingPage {
   @State isMediacodec: boolean = false //是否启用硬件解码
   @State isMusicMemoryPlay: boolean = false //是否启用记忆播放
   @State isMusicBGCover: boolean = true //播放背景随封面
+  @State sortType: number = 4 //默认排序方式
   @State showCoverApiDialog: boolean = false
   @State tempCoverApiUrl: string = ''
   @State coverApiUrl: string = PreferencesUtil.getStringSync('COVER_API', 'https://lrc.ss5.xyz/cover')
   @State apiDialogType: 'lyric' | 'cover' = 'lyric'
+
+  static readonly SORT_TYPE: string = 'musicSortType';
   static readonly IS_BGPLAY_OPEN: string = 'isBgPlayOpen';
   static readonly IS_AUTO_RATATE: string = 'isAutoRatate';
   static readonly iS_MEMORY_PLAY: string = 'isMemoryPlay';
@@ -105,6 +108,7 @@ export struct SettingPage {
 
   // 组件生命周期
   aboutToAppear() {
+    this.sortType  = PreferencesUtil.getNumberSync(SettingPage.SORT_TYPE, 4)
     this.isBgPlayOpen = PreferencesUtil.getBooleanSync(SettingPage.IS_BGPLAY_OPEN, true)
     this.isAutoRatate = PreferencesUtil.getBooleanSync(SettingPage.IS_AUTO_RATATE, true)
     this.isMemoryPlay = PreferencesUtil.getBooleanSync(SettingPage.iS_MEMORY_PLAY, true)
@@ -161,6 +165,44 @@ export struct SettingPage {
         .width('100%')
         .height(55)
 
+        Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
+        Row() {
+          Image($r('app.media.kp_music_nor'))
+            .width(22)
+            .height(22)
+            .alignSelf(ItemAlign.Center)
+            .margin({ left: 28 })
+          Text('默认排序模式')
+            .margin({ left: 10, right: 20 })
+            .fontSize(15)
+            .fontColor(Color.Gray)
+            .fontWeight(480)
+          Blank()
+          Select([//默认排序模式
+            { value: CommonConstants.SORT_ARRAY[0] },
+            { value: CommonConstants.SORT_ARRAY[1] },
+            { value: CommonConstants.SORT_ARRAY[2] },
+            { value: CommonConstants.SORT_ARRAY[3] },
+            { value: CommonConstants.SORT_ARRAY[4] },
+            { value: CommonConstants.SORT_ARRAY[5] },
+            { value: CommonConstants.SORT_ARRAY[6] },
+            { value: CommonConstants.SORT_ARRAY[7] }])
+            .font({ size: 15, weight: FontWeight.Medium })
+            .fontColor(Color.Gray)
+            .margin({right:28})
+            .selected(this.sortType)
+            .value(CommonConstants.SORT_ARRAY[this.sortType])
+            .onSelect(async (_index: number, text?: string | undefined) => {
+              this.sortType = _index
+              PreferencesUtil.put(SettingPage.SORT_TYPE, this.sortType)
+            })
+
+
+        }
+        .width('100%')
+        .height(55)
+
+
         Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
         Row() {
           Image($r('app.media.kp_music_nor'))
@@ -189,6 +231,7 @@ export struct SettingPage {
         .width('100%')
         .height(55)
 
+
         Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
 
         // API设置(合并标题)

+ 1 - 1
oh_modules/.ohpm/oh_modules/@simplepeng/spider-man/src/main/ets/components/CrashPage.ets

@@ -52,7 +52,7 @@ export struct SwiperPage {
   build() {
     Scroll() {
       Column({ space: 10 }) {
-        Item({ type: '发生崩溃了', message: '请把该界面截图发送到开发者邮箱:app@97admin.com,以便开发者更快修复。谢谢!' })
+        Item({ type: '发生崩溃了', message: '请把该界面截图发送到qq群里或者开发者邮箱:app@97admin.com,以便开发者更快修复。谢谢!' })
         Item({ type: 'marketName', message: this.marketName })
         Item({ type: 'bundle_name', message: this.eventInfo.params['bundle_name'] })
         // Item({ type: 'abiList', message: this.abiList })