wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  ref |> 修复缺陷20560 【UAT】直播中的直播详情页面,竖屏模式直播不应该展示全屏按钮,背景与安卓不一致
  fix: 19531 【UI走查-卡片】折叠屏展开-人民号单图卡
  fix: 视频详情页面,对简介上滑时,没有对号主名称进行固定
  fix |> 首页数据重复加载异常
... ... @@ -129,6 +129,10 @@ export struct RmhTitle {
return !(this.hideTime && this.getDaysBetweenDates(Number(this.publishTime)) > 2)
}
hasRightFollow() {
return this.rmhInfo?.cnIsAttention && this.rmhInfo?.userType != "5"
}
build() {
Flex() {
if (this.rmhInfo.userType != '5') {
... ... @@ -196,7 +200,7 @@ export struct RmhTitle {
.textAlign(TextAlign.Start)
.height(14)
.lineHeight(14)
.width('calc(100% - 65vp)')
.width(this.hasRightFollow() ? 'calc(100% - 65vp)' : '100%')
// .constraintSize({maxWidth:(DisplayUtils.getDeviceWidth() - 32 - 36 - 18 - this.getTextWidth(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime))))})
}
... ... @@ -211,7 +215,7 @@ export struct RmhTitle {
.width('100%')
Blank()
if (this.rmhInfo?.cnIsAttention && this.rmhInfo?.userType != "5") {
if (this.hasRightFollow()) {
Column() {
Row(){
if (Number(this.followStatus) === 0) {
... ...
... ... @@ -200,6 +200,7 @@ export class PageHelper {
if (isCache) {
pageDto = await PageViewModel.getPageGroupCacheData(pageModel.bizCopy()) as PageDTO
pageModel.displayGroupInfoMd5 = pageDto.md5
pageModel.currentPage = 2
} else {
pageDto = await PageViewModel.getPageGroupCompData(pageModel.bizCopy()) as PageDTO
//增加楼层数据异常判断条件
... ...
... ... @@ -51,6 +51,8 @@ export struct DetailPlayVLivePage {
@State toastText: ResourceStr = "这是一个非Wi-Fi环境。请注意流量消耗"
chatRoomController: LiveDetailChatRoomController = new LiveDetailChatRoomController()
@Provide banComment: boolean = true
/// null 直播流画面类型未知,0 横屏流,1 竖屏流,后台选择画面时,以选择的为准
@Provide isVerticalStream: boolean | null = this.liveDetailPageLogic.dealLiveStreamType()
dialogToast: CustomDialogController = new CustomDialogController({
builder: CustomToast({
... ...
... ... @@ -109,4 +109,20 @@ export class LiveDetailPageLogic {
return false
}
dealLiveStreamType(): boolean | null {
if (this.contentDetailData.liveInfo.vlive && this.contentDetailData.liveInfo.vlive.count > 0) {
const liveStreamType: number | null = this.contentDetailData.liveInfo.vlive[0].liveStreamType
if (liveStreamType == null) { ///直播流画面类型位置
return null
}
if (liveStreamType == 1) { ///后台选择的竖屏流
return true
}
if (liveStreamType == 0) { ///后台选择的横屏流
return false
}
}
return true
}
}
\ No newline at end of file
... ...
... ... @@ -27,6 +27,7 @@ export struct PlayerComponent {
@Link isPlayerError: boolean
@Link isCanplay: boolean
@State isLarge:boolean = false
@Consume isVerticalStream: boolean
pageShowChange() {
this.playerController?.play()
}
... ... @@ -54,13 +55,15 @@ export struct PlayerComponent {
}
this.playerController.onVideoSizePlayerComponentBack = (width: number, height: number) => {
if(width>height){
if (this.isVerticalStream != null) {
return
}
if (width > height) {
this.isLarge = false
if(width > 2){
this.liveStreamType = 0
}
}else{
}else {
this.isLarge = true
this.liveStreamType = 1
}
}
}
... ...
... ... @@ -17,6 +17,7 @@ export struct PlayerUIComponent {
@Consume isFullScreen: boolean
@Consume displayDirection: DisplayDirection
@State isPlayStatus: boolean = true;
@Consume isVerticalStream: boolean | null
onChangeMenuVisible() {
if (this.displayDirection == DisplayDirection.VERTICAL
|| !this.isShowControl
... ... @@ -38,6 +39,10 @@ export struct PlayerUIComponent {
return
}
this.playerController.onVideoSizePlayerUIComponentMethod = (width: number, height: number) => {
if (this.isVerticalStream != null) {
this.isSmall = this.isVerticalStream == false
return
}
if (width > height){
this.isSmall = true
} else {
... ...
... ... @@ -16,7 +16,6 @@ export struct PlayerVideoControlComponent {
@Link isPlayStatus?: boolean
@Consume displayDirection: DisplayDirection
@Consume contentDetailData: ContentDetailDTO
@Consume isSmall:boolean
@Consume isFullScreen: boolean
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
aboutToAppear(): void {
... ... @@ -61,37 +60,6 @@ export struct PlayerVideoControlComponent {
right: 16
})
}
//全屏按钮
// if(!this.isSmall) {
// Image($r('app.media.icon_live_player_full_screen'))
// .height(32)
// .width(32)
// .padding(5)
// .borderRadius($r('app.float.vp_16'))
// .border({width:0.5})
// .borderColor(0x4DFFFFFF)
// .backgroundColor(0x4D222222)
// .margin({right:10})
// .onClick(() => {
// WindowModel.shared.setSpecificSystemBarEnabled(false)
// this.displayDirection = DisplayDirection.VIDEO_HORIZONTAL
// WindowModel.shared.setPreferredOrientation(
// window.Orientation.LANDSCAPE)
// if(this.playerController){
// // if(this.playerController.onVideoSizePlayerUIComponentMethod){
// // this.playerController.onVideoSizePlayerUIComponentMethod(1,2)
// // }
// if(this.playerController.onVideoSizePlayerComponentBack){
// this.playerController.onVideoSizePlayerComponentBack(1,2)
// }
//
// if(this.playerController.onVideoSizePlayerTitleComponentBack){
// this.playerController.onVideoSizePlayerTitleComponentBack(1,2)
// }
// }
// this.isFullScreen = true
// })
// }
}
.alignItems(VerticalAlign.Center)
// .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] })
... ...
... ... @@ -13,7 +13,6 @@ export struct DetailDialog {
build() {
Column() {
Scroll() {
Column() {
if (this.name) {
Text(`@${this.name}`)
... ... @@ -23,7 +22,10 @@ export struct DetailDialog {
.lineHeight(17)
.margin({ top: 8 })
}
}
.alignItems(HorizontalAlign.Start)
Scroll() {
Column() {
if (this.title) {
Text(this.title)
.fontColor(Color.White)
... ... @@ -55,7 +57,9 @@ export struct DetailDialog {
}
.scrollBar(BarState.Off) //安卓不显示滚动条
.height(200)
.constraintSize({
maxHeight: 200
})
Row() {
Image($r("app.media.icon_arrow_left_white"))
... ...