|
@@ -326,7 +326,7 @@ struct NewIndex {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
this.logHiCar('info', `getHiCarStatus isHiCarStatus=${this.isHiCarStatus}`)
|
|
this.logHiCar('info', `getHiCarStatus isHiCarStatus=${this.isHiCarStatus}`)
|
|
|
- if(this.isHiCarStatus||this.isBigScreen()){
|
|
|
|
|
|
|
+ if(this.curDisplayIsHiCar||this.isBigScreen()){
|
|
|
this.getUIContext()?.animateTo({ duration: 555 }, () => {
|
|
this.getUIContext()?.animateTo({ duration: 555 }, () => {
|
|
|
this.isShowDrawer = true
|
|
this.isShowDrawer = true
|
|
|
this.offsetX = 0
|
|
this.offsetX = 0
|
|
@@ -554,22 +554,19 @@ struct NewIndex {
|
|
|
@Builder
|
|
@Builder
|
|
|
PlayController() {
|
|
PlayController() {
|
|
|
Row() {
|
|
Row() {
|
|
|
- if(this.isHiCar()){
|
|
|
|
|
|
|
+ this.playConLeft(!this.curDisplayIsHiCar)
|
|
|
|
|
+ if(!this.curDisplayIsHiCar){
|
|
|
this.playConRigth()
|
|
this.playConRigth()
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.curDisplayIsHiCar){
|
|
|
Column(){
|
|
Column(){
|
|
|
this.centerName()
|
|
this.centerName()
|
|
|
- }.layoutWeight(1)
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ .layoutWeight(1)
|
|
|
.onClick(()=>{
|
|
.onClick(()=>{
|
|
|
this.setShowPlayTrue()
|
|
this.setShowPlayTrue()
|
|
|
})
|
|
})
|
|
|
- this.playConLeft(false)
|
|
|
|
|
-
|
|
|
|
|
- }else{
|
|
|
|
|
- this.playConLeft()
|
|
|
|
|
- this.playConRigth()
|
|
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
.height(this.bottomBarHeight)
|
|
.height(this.bottomBarHeight)
|
|
@@ -599,32 +596,38 @@ struct NewIndex {
|
|
|
color: 'on_primary'
|
|
color: 'on_primary'
|
|
|
})
|
|
})
|
|
|
.geometryTransition('cover', { follow: true }) // 绑定标识符
|
|
.geometryTransition('cover', { follow: true }) // 绑定标识符
|
|
|
- Column() {
|
|
|
|
|
- Text(this.currentSong?.name)
|
|
|
|
|
- .fontSize(16)
|
|
|
|
|
- .textOverflow({ overflow: TextOverflow.MARQUEE }) //超长滚动
|
|
|
|
|
- .maxLines(1)
|
|
|
|
|
- .fontColor(Color.White)
|
|
|
|
|
- .fontWeight(FontWeight.Bolder);
|
|
|
|
|
- Row() {
|
|
|
|
|
- Text(this.currentSong?.artist)
|
|
|
|
|
- .margin({ top: 2 })
|
|
|
|
|
- .fontSize(13)
|
|
|
|
|
- .textAlign(TextAlign.Start)
|
|
|
|
|
- .maxLines(1)
|
|
|
|
|
- .fontWeight(FontWeight.Bold)
|
|
|
|
|
|
|
+ if(!this.curDisplayIsHiCar){
|
|
|
|
|
+ Column() {
|
|
|
|
|
+ Text(this.currentSong?.name)
|
|
|
|
|
+ .fontSize(16)
|
|
|
.textOverflow({ overflow: TextOverflow.MARQUEE }) //超长滚动
|
|
.textOverflow({ overflow: TextOverflow.MARQUEE }) //超长滚动
|
|
|
|
|
+ .maxLines(1)
|
|
|
.fontColor(Color.White)
|
|
.fontColor(Color.White)
|
|
|
|
|
+ .fontWeight(FontWeight.Bolder);
|
|
|
|
|
+ Row() {
|
|
|
|
|
+ Text(this.currentSong?.artist)
|
|
|
|
|
+ .margin({ top: 2 })
|
|
|
|
|
+ .fontSize(13)
|
|
|
|
|
+ .textAlign(TextAlign.Start)
|
|
|
|
|
+ .maxLines(1)
|
|
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
|
|
+ .textOverflow({ overflow: TextOverflow.MARQUEE }) //超长滚动
|
|
|
|
|
+ .fontColor(Color.White)
|
|
|
|
|
+ }
|
|
|
|
|
+ .visibility(this.currentSong?.artist? Visibility.Visible:Visibility.None)
|
|
|
}
|
|
}
|
|
|
- .visibility(this.currentSong?.artist? Visibility.Visible:Visibility.None)
|
|
|
|
|
|
|
+ .padding({left:8})
|
|
|
|
|
+ .alignItems(isLeft?HorizontalAlign.Start:HorizontalAlign.End)
|
|
|
|
|
+ .margin({ right: isLeft?22:10 })
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.playConRigth()
|
|
|
}
|
|
}
|
|
|
- .padding({left:8})
|
|
|
|
|
- .alignItems(isLeft?HorizontalAlign.Start:HorizontalAlign.End)
|
|
|
|
|
- .margin({ right: isLeft?22:10 })
|
|
|
|
|
- .visibility(isLeft? Visibility.Visible:Visibility.None)
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
.padding({ right: 18 })
|
|
.padding({ right: 18 })
|
|
|
- .layoutWeight(isLeft?1:0)
|
|
|
|
|
|
|
+ .layoutWeight(1)
|
|
|
|
|
+ .alignItems(VerticalAlign.Center)
|
|
|
|
|
+ .justifyContent(FlexAlign.Start)
|
|
|
.clickEffect({ level: ClickEffectLevel.MIDDLE, scale: 0.8 })
|
|
.clickEffect({ level: ClickEffectLevel.MIDDLE, scale: 0.8 })
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
this.setShowPlayTrue()
|
|
this.setShowPlayTrue()
|
|
@@ -693,6 +696,8 @@ struct NewIndex {
|
|
|
this.getUIContext().getHostContext()!.eventHub.emit('openPlayList');
|
|
this.getUIContext().getHostContext()!.eventHub.emit('openPlayList');
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+ .margin({left:this.curDisplayIsHiCar?20:5})
|
|
|
|
|
+ .justifyContent(this.curDisplayIsHiCar?FlexAlign.Start:FlexAlign.End)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -700,9 +705,7 @@ struct NewIndex {
|
|
|
//是不是hicar的屏幕分辨率
|
|
//是不是hicar的屏幕分辨率
|
|
|
isHiCar() {
|
|
isHiCar() {
|
|
|
|
|
|
|
|
- return this.isHiCarStatus&&this.curDisplayIsHiCar;
|
|
|
|
|
-
|
|
|
|
|
- return false;
|
|
|
|
|
|
|
+ return this.curDisplayIsHiCar;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//是不是正常的手机竖屏
|
|
//是不是正常的手机竖屏
|