|
@@ -1547,6 +1547,7 @@ export struct LocalMusic {
|
|
|
pup = XPopup.Builder()
|
|
pup = XPopup.Builder()
|
|
|
.setPopupPosition(popupPosition)
|
|
.setPopupPosition(popupPosition)
|
|
|
.atView(id)
|
|
.atView(id)
|
|
|
|
|
+ // .setHeight(this.isCoverOpacity()?100:420)
|
|
|
.setBackgroundColor(Color.Black)
|
|
.setBackgroundColor(Color.Black)
|
|
|
.asBubble(wrapBuilder(cutPopupBuilder), dataBean)
|
|
.asBubble(wrapBuilder(cutPopupBuilder), dataBean)
|
|
|
.show()
|
|
.show()
|
|
@@ -1555,6 +1556,7 @@ export struct LocalMusic {
|
|
|
pup = XPopup.Builder()
|
|
pup = XPopup.Builder()
|
|
|
.setPopupPosition(popupPosition)
|
|
.setPopupPosition(popupPosition)
|
|
|
.atView(id)
|
|
.atView(id)
|
|
|
|
|
+ // .setHeight(this.isCoverOpacity()?280:420)
|
|
|
.setBackgroundColor(Color.White)
|
|
.setBackgroundColor(Color.White)
|
|
|
.asBubble(wrapBuilder(cutPopupBuilder), dataBean)
|
|
.asBubble(wrapBuilder(cutPopupBuilder), dataBean)
|
|
|
.show()
|
|
.show()
|
|
@@ -1622,6 +1624,7 @@ export struct LocalMusic {
|
|
|
pup = XPopup.Builder()
|
|
pup = XPopup.Builder()
|
|
|
.setPopupPosition(popupPosition)
|
|
.setPopupPosition(popupPosition)
|
|
|
.atView(id)
|
|
.atView(id)
|
|
|
|
|
+ .setMaxHeight('60%')
|
|
|
.setBackgroundColor(Color.Black)
|
|
.setBackgroundColor(Color.Black)
|
|
|
.asBubble(wrapBuilder(cutPopupBuilder), dataBean)
|
|
.asBubble(wrapBuilder(cutPopupBuilder), dataBean)
|
|
|
.show();
|
|
.show();
|
|
@@ -1629,6 +1632,7 @@ export struct LocalMusic {
|
|
|
pup = XPopup.Builder()
|
|
pup = XPopup.Builder()
|
|
|
.setPopupPosition(popupPosition)
|
|
.setPopupPosition(popupPosition)
|
|
|
.atView(id)
|
|
.atView(id)
|
|
|
|
|
+ .setMaxHeight('60%')
|
|
|
.setBackgroundColor(Color.White)
|
|
.setBackgroundColor(Color.White)
|
|
|
.asBubble(wrapBuilder(cutPopupBuilder), dataBean)
|
|
.asBubble(wrapBuilder(cutPopupBuilder), dataBean)
|
|
|
.show();
|
|
.show();
|
|
@@ -1812,29 +1816,29 @@ export struct LocalMusic {
|
|
|
duration: 666,
|
|
duration: 666,
|
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
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%')
|
|
.width('100%')
|
|
|
.height('100%')
|
|
.height('100%')
|
|
@@ -1850,9 +1854,8 @@ export struct LocalMusic {
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
.height('100%')
|
|
.height('100%')
|
|
|
.backgroundImage(this.isCustomizeBg?this.customizeBgPath:$r('app.color.bottom_control_background'))
|
|
.backgroundImage(this.isCustomizeBg?this.customizeBgPath:$r('app.color.bottom_control_background'))
|
|
|
- .backgroundImageSize({ height: '100%'})
|
|
|
|
|
|
|
+ .backgroundImageSize(this.isCoverOpacity()?{width:'100%'}:{ height: '100%'})
|
|
|
.backgroundImagePosition(Alignment.Center)
|
|
.backgroundImagePosition(Alignment.Center)
|
|
|
- // .backgroundColor($r('app.color.bottom_control_background'))
|
|
|
|
|
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
|
|
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -2313,7 +2316,8 @@ export struct LocalMusic {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
.layoutWeight(1)
|
|
.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%')
|
|
.width('100%')
|
|
@@ -2823,7 +2827,7 @@ export struct LocalMusic {
|
|
|
}, (item: VideoItem) => item.filePath)
|
|
}, (item: VideoItem) => item.filePath)
|
|
|
}
|
|
}
|
|
|
// .divider({ strokeWidth: 1, color: this.isDarkMode? '#333333':'#ffe9f0f0' })
|
|
// .divider({ strokeWidth: 1, color: this.isDarkMode? '#333333':'#ffe9f0f0' })
|
|
|
- .margin({ bottom: this.isPuraWP() ? 100 : 158 })
|
|
|
|
|
|
|
+ .margin({ bottom: this.isCoverOpacity() ? 50 : 158 })
|
|
|
.cachedCount(30)
|
|
.cachedCount(30)
|
|
|
.borderRadius(20)
|
|
.borderRadius(20)
|
|
|
.layoutWeight(1)
|
|
.layoutWeight(1)
|
|
@@ -2844,6 +2848,7 @@ export struct LocalMusic {
|
|
|
}).getValue(this.currentBreakpoint)
|
|
}).getValue(this.currentBreakpoint)
|
|
|
)
|
|
)
|
|
|
.onScrollFrameBegin((offset: number) => {
|
|
.onScrollFrameBegin((offset: number) => {
|
|
|
|
|
+
|
|
|
if (this.currentWidthBreakpoint !== WidthBreakpoint.WIDTH_SM ||
|
|
if (this.currentWidthBreakpoint !== WidthBreakpoint.WIDTH_SM ||
|
|
|
(this.currentHeightBreakpoint !== HeightBreakpoint.HEIGHT_MD &&
|
|
(this.currentHeightBreakpoint !== HeightBreakpoint.HEIGHT_MD &&
|
|
|
this.currentHeightBreakpoint !== HeightBreakpoint.HEIGHT_SM)) {
|
|
this.currentHeightBreakpoint !== HeightBreakpoint.HEIGHT_SM)) {
|
|
@@ -3127,6 +3132,7 @@ export struct LocalMusic {
|
|
|
right: 16
|
|
right: 16
|
|
|
})
|
|
})
|
|
|
Line().width('100%').height(25).backgroundColor($r('app.color.bottom_control_background'))
|
|
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)
|
|
.visibility(this.isCustomizeBg?Visibility.Hidden:Visibility.Visible)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -3301,14 +3307,7 @@ export struct LocalMusic {
|
|
|
.stateEffect(true)
|
|
.stateEffect(true)
|
|
|
.margin({ right: 12, left: 5 })
|
|
.margin({ right: 12, left: 5 })
|
|
|
.onClick(async () => {
|
|
.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()
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -4131,7 +4130,7 @@ export struct LocalMusic {
|
|
|
return this.currentWidthBreakpoint === WidthBreakpoint.WIDTH_SM
|
|
return this.currentWidthBreakpoint === WidthBreakpoint.WIDTH_SM
|
|
|
&& this.currentHeightBreakpoint === HeightBreakpoint.HEIGHT_MD
|
|
&& this.currentHeightBreakpoint === HeightBreakpoint.HEIGHT_MD
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ //是否是Pura X外屏,或者小屏幕,手机横屏
|
|
|
isCoverOpacity() {
|
|
isCoverOpacity() {
|
|
|
if (this.isPuraWP()) {
|
|
if (this.isPuraWP()) {
|
|
|
return true
|
|
return true
|
|
@@ -4310,7 +4309,7 @@ export struct LocalMusic {
|
|
|
@State bright: number = PlayConstants.BRIGHT;
|
|
@State bright: number = PlayConstants.BRIGHT;
|
|
|
@State brightShow: boolean = PlayConstants.BRIGHT_SHOW;
|
|
@State brightShow: boolean = PlayConstants.BRIGHT_SHOW;
|
|
|
@State seekToShow: boolean = PlayConstants.BRIGHT_SHOW;
|
|
@State seekToShow: boolean = PlayConstants.BRIGHT_SHOW;
|
|
|
- // @State screenHeight:number = 0
|
|
|
|
|
|
|
+
|
|
|
@State screenWidth: number = 0
|
|
@State screenWidth: number = 0
|
|
|
@State screenHeight: number = 0
|
|
@State screenHeight: number = 0
|
|
|
@State statusBarHeight: number = 0
|
|
@State statusBarHeight: number = 0
|
|
@@ -5426,7 +5425,7 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
Row() {
|
|
Row() {
|
|
|
this.pushLyricButton($r('app.media.cut_current'), 0, '本地歌词')
|
|
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, '获取歌词')
|
|
// this.pushLyricButton($r('app.media.white_search'), 2, '获取歌词')
|
|
|
|
|
|
|
|
|
|
|
|
@@ -5566,10 +5565,10 @@ export struct LocalMusic {
|
|
|
Row() {
|
|
Row() {
|
|
|
Image(icon)
|
|
Image(icon)
|
|
|
.width(14)
|
|
.width(14)
|
|
|
- .margin({ left: 6 })
|
|
|
|
|
|
|
+ .margin({ left: 13 })
|
|
|
|
|
|
|
|
Text(label)
|
|
Text(label)
|
|
|
- .fontSize(10)
|
|
|
|
|
|
|
+ .fontSize(12)
|
|
|
.margin({ left: 6 })
|
|
.margin({ left: 6 })
|
|
|
.fontColor('#FFFFFF')
|
|
.fontColor('#FFFFFF')
|
|
|
}
|
|
}
|
|
@@ -5581,17 +5580,17 @@ export struct LocalMusic {
|
|
|
break;
|
|
break;
|
|
|
case 1:
|
|
case 1:
|
|
|
//判断是不是赞助会员
|
|
//判断是不是赞助会员
|
|
|
- // if(Utility.isNoble()){
|
|
|
|
|
|
|
+ if(PreferencesUtil.getStringSync('LRC_API','')===''){
|
|
|
|
|
+ ToastUtil.showToast('请到设置界面配置歌词服务器地址')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
if (StrUtil.isNotEmpty(this.videoUrl)) {
|
|
if (StrUtil.isNotEmpty(this.videoUrl)) {
|
|
|
ToastUtil.showToast('正在获取')
|
|
ToastUtil.showToast('正在获取')
|
|
|
this.isLyricSetting = false
|
|
this.isLyricSetting = false
|
|
|
let lyricPath = this.videoUrl.substring(0, this.videoUrl.lastIndexOf('.')) + '.lrc'
|
|
let lyricPath = this.videoUrl.substring(0, this.videoUrl.lastIndexOf('.')) + '.lrc'
|
|
|
this.initLyric(lyricPath, true);
|
|
this.initLyric(lyricPath, true);
|
|
|
}
|
|
}
|
|
|
- // }else{
|
|
|
|
|
- // this.isLyricSetting = false
|
|
|
|
|
- // this.showVipDialog()
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
break;
|
|
break;
|
|
|
case 2:
|
|
case 2:
|
|
@@ -5612,7 +5611,7 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.padding(5)
|
|
.padding(5)
|
|
|
- .width(90)
|
|
|
|
|
|
|
+ .width(110)
|
|
|
.height(40)
|
|
.height(40)
|
|
|
.margin({ left: 6, right: 6 })
|
|
.margin({ left: 6, right: 6 })
|
|
|
.border({
|
|
.border({
|
|
@@ -6071,19 +6070,27 @@ export struct LocalMusic {
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
case 14: //搜索封面
|
|
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
|
|
this.isShowMoreView = false
|
|
|
break;
|
|
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) {
|
|
searchCover(title: string, artist: string) {
|
|
|
|
|
|
|
|
|
|
|