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 |> 首页数据重复加载异常
Showing
8 changed files
with
52 additions
and
49 deletions
| @@ -129,6 +129,10 @@ export struct RmhTitle { | @@ -129,6 +129,10 @@ export struct RmhTitle { | ||
| 129 | return !(this.hideTime && this.getDaysBetweenDates(Number(this.publishTime)) > 2) | 129 | return !(this.hideTime && this.getDaysBetweenDates(Number(this.publishTime)) > 2) |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | + hasRightFollow() { | ||
| 133 | + return this.rmhInfo?.cnIsAttention && this.rmhInfo?.userType != "5" | ||
| 134 | + } | ||
| 135 | + | ||
| 132 | build() { | 136 | build() { |
| 133 | Flex() { | 137 | Flex() { |
| 134 | if (this.rmhInfo.userType != '5') { | 138 | if (this.rmhInfo.userType != '5') { |
| @@ -196,7 +200,7 @@ export struct RmhTitle { | @@ -196,7 +200,7 @@ export struct RmhTitle { | ||
| 196 | .textAlign(TextAlign.Start) | 200 | .textAlign(TextAlign.Start) |
| 197 | .height(14) | 201 | .height(14) |
| 198 | .lineHeight(14) | 202 | .lineHeight(14) |
| 199 | - .width('calc(100% - 65vp)') | 203 | + .width(this.hasRightFollow() ? 'calc(100% - 65vp)' : '100%') |
| 200 | // .constraintSize({maxWidth:(DisplayUtils.getDeviceWidth() - 32 - 36 - 18 - this.getTextWidth(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime))))}) | 204 | // .constraintSize({maxWidth:(DisplayUtils.getDeviceWidth() - 32 - 36 - 18 - this.getTextWidth(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime))))}) |
| 201 | } | 205 | } |
| 202 | 206 | ||
| @@ -211,7 +215,7 @@ export struct RmhTitle { | @@ -211,7 +215,7 @@ export struct RmhTitle { | ||
| 211 | .width('100%') | 215 | .width('100%') |
| 212 | 216 | ||
| 213 | Blank() | 217 | Blank() |
| 214 | - if (this.rmhInfo?.cnIsAttention && this.rmhInfo?.userType != "5") { | 218 | + if (this.hasRightFollow()) { |
| 215 | Column() { | 219 | Column() { |
| 216 | Row(){ | 220 | Row(){ |
| 217 | if (Number(this.followStatus) === 0) { | 221 | if (Number(this.followStatus) === 0) { |
| @@ -200,6 +200,7 @@ export class PageHelper { | @@ -200,6 +200,7 @@ export class PageHelper { | ||
| 200 | if (isCache) { | 200 | if (isCache) { |
| 201 | pageDto = await PageViewModel.getPageGroupCacheData(pageModel.bizCopy()) as PageDTO | 201 | pageDto = await PageViewModel.getPageGroupCacheData(pageModel.bizCopy()) as PageDTO |
| 202 | pageModel.displayGroupInfoMd5 = pageDto.md5 | 202 | pageModel.displayGroupInfoMd5 = pageDto.md5 |
| 203 | + pageModel.currentPage = 2 | ||
| 203 | } else { | 204 | } else { |
| 204 | pageDto = await PageViewModel.getPageGroupCompData(pageModel.bizCopy()) as PageDTO | 205 | pageDto = await PageViewModel.getPageGroupCompData(pageModel.bizCopy()) as PageDTO |
| 205 | //增加楼层数据异常判断条件 | 206 | //增加楼层数据异常判断条件 |
| @@ -51,6 +51,8 @@ export struct DetailPlayVLivePage { | @@ -51,6 +51,8 @@ export struct DetailPlayVLivePage { | ||
| 51 | @State toastText: ResourceStr = "这是一个非Wi-Fi环境。请注意流量消耗" | 51 | @State toastText: ResourceStr = "这是一个非Wi-Fi环境。请注意流量消耗" |
| 52 | chatRoomController: LiveDetailChatRoomController = new LiveDetailChatRoomController() | 52 | chatRoomController: LiveDetailChatRoomController = new LiveDetailChatRoomController() |
| 53 | @Provide banComment: boolean = true | 53 | @Provide banComment: boolean = true |
| 54 | + /// null 直播流画面类型未知,0 横屏流,1 竖屏流,后台选择画面时,以选择的为准 | ||
| 55 | + @Provide isVerticalStream: boolean | null = this.liveDetailPageLogic.dealLiveStreamType() | ||
| 54 | 56 | ||
| 55 | dialogToast: CustomDialogController = new CustomDialogController({ | 57 | dialogToast: CustomDialogController = new CustomDialogController({ |
| 56 | builder: CustomToast({ | 58 | builder: CustomToast({ |
| @@ -109,4 +109,20 @@ export class LiveDetailPageLogic { | @@ -109,4 +109,20 @@ export class LiveDetailPageLogic { | ||
| 109 | return false | 109 | return false |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | + dealLiveStreamType(): boolean | null { | ||
| 113 | + if (this.contentDetailData.liveInfo.vlive && this.contentDetailData.liveInfo.vlive.count > 0) { | ||
| 114 | + const liveStreamType: number | null = this.contentDetailData.liveInfo.vlive[0].liveStreamType | ||
| 115 | + if (liveStreamType == null) { ///直播流画面类型位置 | ||
| 116 | + return null | ||
| 117 | + } | ||
| 118 | + if (liveStreamType == 1) { ///后台选择的竖屏流 | ||
| 119 | + return true | ||
| 120 | + } | ||
| 121 | + if (liveStreamType == 0) { ///后台选择的横屏流 | ||
| 122 | + return false | ||
| 123 | + } | ||
| 124 | + } | ||
| 125 | + return true | ||
| 126 | + } | ||
| 127 | + | ||
| 112 | } | 128 | } |
| @@ -27,6 +27,7 @@ export struct PlayerComponent { | @@ -27,6 +27,7 @@ export struct PlayerComponent { | ||
| 27 | @Link isPlayerError: boolean | 27 | @Link isPlayerError: boolean |
| 28 | @Link isCanplay: boolean | 28 | @Link isCanplay: boolean |
| 29 | @State isLarge:boolean = false | 29 | @State isLarge:boolean = false |
| 30 | + @Consume isVerticalStream: boolean | ||
| 30 | pageShowChange() { | 31 | pageShowChange() { |
| 31 | this.playerController?.play() | 32 | this.playerController?.play() |
| 32 | } | 33 | } |
| @@ -54,13 +55,15 @@ export struct PlayerComponent { | @@ -54,13 +55,15 @@ export struct PlayerComponent { | ||
| 54 | 55 | ||
| 55 | } | 56 | } |
| 56 | this.playerController.onVideoSizePlayerComponentBack = (width: number, height: number) => { | 57 | this.playerController.onVideoSizePlayerComponentBack = (width: number, height: number) => { |
| 57 | - if(width>height){ | 58 | + if (this.isVerticalStream != null) { |
| 59 | + return | ||
| 60 | + } | ||
| 61 | + if (width > height) { | ||
| 58 | this.isLarge = false | 62 | this.isLarge = false |
| 59 | - if(width > 2){ | ||
| 60 | - this.liveStreamType = 0 | ||
| 61 | - } | ||
| 62 | - }else{ | 63 | + this.liveStreamType = 0 |
| 64 | + }else { | ||
| 63 | this.isLarge = true | 65 | this.isLarge = true |
| 66 | + this.liveStreamType = 1 | ||
| 64 | } | 67 | } |
| 65 | } | 68 | } |
| 66 | } | 69 | } |
| @@ -17,6 +17,7 @@ export struct PlayerUIComponent { | @@ -17,6 +17,7 @@ export struct PlayerUIComponent { | ||
| 17 | @Consume isFullScreen: boolean | 17 | @Consume isFullScreen: boolean |
| 18 | @Consume displayDirection: DisplayDirection | 18 | @Consume displayDirection: DisplayDirection |
| 19 | @State isPlayStatus: boolean = true; | 19 | @State isPlayStatus: boolean = true; |
| 20 | + @Consume isVerticalStream: boolean | null | ||
| 20 | onChangeMenuVisible() { | 21 | onChangeMenuVisible() { |
| 21 | if (this.displayDirection == DisplayDirection.VERTICAL | 22 | if (this.displayDirection == DisplayDirection.VERTICAL |
| 22 | || !this.isShowControl | 23 | || !this.isShowControl |
| @@ -38,6 +39,10 @@ export struct PlayerUIComponent { | @@ -38,6 +39,10 @@ export struct PlayerUIComponent { | ||
| 38 | return | 39 | return |
| 39 | } | 40 | } |
| 40 | this.playerController.onVideoSizePlayerUIComponentMethod = (width: number, height: number) => { | 41 | this.playerController.onVideoSizePlayerUIComponentMethod = (width: number, height: number) => { |
| 42 | + if (this.isVerticalStream != null) { | ||
| 43 | + this.isSmall = this.isVerticalStream == false | ||
| 44 | + return | ||
| 45 | + } | ||
| 41 | if (width > height){ | 46 | if (width > height){ |
| 42 | this.isSmall = true | 47 | this.isSmall = true |
| 43 | } else { | 48 | } else { |
| @@ -16,7 +16,6 @@ export struct PlayerVideoControlComponent { | @@ -16,7 +16,6 @@ export struct PlayerVideoControlComponent { | ||
| 16 | @Link isPlayStatus?: boolean | 16 | @Link isPlayStatus?: boolean |
| 17 | @Consume displayDirection: DisplayDirection | 17 | @Consume displayDirection: DisplayDirection |
| 18 | @Consume contentDetailData: ContentDetailDTO | 18 | @Consume contentDetailData: ContentDetailDTO |
| 19 | - @Consume isSmall:boolean | ||
| 20 | @Consume isFullScreen: boolean | 19 | @Consume isFullScreen: boolean |
| 21 | @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | 20 | @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 |
| 22 | aboutToAppear(): void { | 21 | aboutToAppear(): void { |
| @@ -61,37 +60,6 @@ export struct PlayerVideoControlComponent { | @@ -61,37 +60,6 @@ export struct PlayerVideoControlComponent { | ||
| 61 | right: 16 | 60 | right: 16 |
| 62 | }) | 61 | }) |
| 63 | } | 62 | } |
| 64 | - //全屏按钮 | ||
| 65 | - // if(!this.isSmall) { | ||
| 66 | - // Image($r('app.media.icon_live_player_full_screen')) | ||
| 67 | - // .height(32) | ||
| 68 | - // .width(32) | ||
| 69 | - // .padding(5) | ||
| 70 | - // .borderRadius($r('app.float.vp_16')) | ||
| 71 | - // .border({width:0.5}) | ||
| 72 | - // .borderColor(0x4DFFFFFF) | ||
| 73 | - // .backgroundColor(0x4D222222) | ||
| 74 | - // .margin({right:10}) | ||
| 75 | - // .onClick(() => { | ||
| 76 | - // WindowModel.shared.setSpecificSystemBarEnabled(false) | ||
| 77 | - // this.displayDirection = DisplayDirection.VIDEO_HORIZONTAL | ||
| 78 | - // WindowModel.shared.setPreferredOrientation( | ||
| 79 | - // window.Orientation.LANDSCAPE) | ||
| 80 | - // if(this.playerController){ | ||
| 81 | - // // if(this.playerController.onVideoSizePlayerUIComponentMethod){ | ||
| 82 | - // // this.playerController.onVideoSizePlayerUIComponentMethod(1,2) | ||
| 83 | - // // } | ||
| 84 | - // if(this.playerController.onVideoSizePlayerComponentBack){ | ||
| 85 | - // this.playerController.onVideoSizePlayerComponentBack(1,2) | ||
| 86 | - // } | ||
| 87 | - // | ||
| 88 | - // if(this.playerController.onVideoSizePlayerTitleComponentBack){ | ||
| 89 | - // this.playerController.onVideoSizePlayerTitleComponentBack(1,2) | ||
| 90 | - // } | ||
| 91 | - // } | ||
| 92 | - // this.isFullScreen = true | ||
| 93 | - // }) | ||
| 94 | - // } | ||
| 95 | } | 63 | } |
| 96 | .alignItems(VerticalAlign.Center) | 64 | .alignItems(VerticalAlign.Center) |
| 97 | // .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] }) | 65 | // .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] }) |
| @@ -13,17 +13,19 @@ export struct DetailDialog { | @@ -13,17 +13,19 @@ export struct DetailDialog { | ||
| 13 | build() { | 13 | build() { |
| 14 | 14 | ||
| 15 | Column() { | 15 | Column() { |
| 16 | + Column() { | ||
| 17 | + if (this.name) { | ||
| 18 | + Text(`@${this.name}`) | ||
| 19 | + .fontColor(Color.White) | ||
| 20 | + .fontSize(14) | ||
| 21 | + .fontWeight(600) | ||
| 22 | + .lineHeight(17) | ||
| 23 | + .margin({ top: 8 }) | ||
| 24 | + } | ||
| 25 | + } | ||
| 26 | + .alignItems(HorizontalAlign.Start) | ||
| 16 | Scroll() { | 27 | Scroll() { |
| 17 | Column() { | 28 | Column() { |
| 18 | - if (this.name) { | ||
| 19 | - Text(`@${this.name}`) | ||
| 20 | - .fontColor(Color.White) | ||
| 21 | - .fontSize(14) | ||
| 22 | - .fontWeight(600) | ||
| 23 | - .lineHeight(17) | ||
| 24 | - .margin({ top: 8 }) | ||
| 25 | - } | ||
| 26 | - | ||
| 27 | if (this.title) { | 29 | if (this.title) { |
| 28 | Text(this.title) | 30 | Text(this.title) |
| 29 | .fontColor(Color.White) | 31 | .fontColor(Color.White) |
| @@ -55,7 +57,9 @@ export struct DetailDialog { | @@ -55,7 +57,9 @@ export struct DetailDialog { | ||
| 55 | 57 | ||
| 56 | } | 58 | } |
| 57 | .scrollBar(BarState.Off) //安卓不显示滚动条 | 59 | .scrollBar(BarState.Off) //安卓不显示滚动条 |
| 58 | - .height(200) | 60 | + .constraintSize({ |
| 61 | + maxHeight: 200 | ||
| 62 | + }) | ||
| 59 | 63 | ||
| 60 | Row() { | 64 | Row() { |
| 61 | Image($r("app.media.icon_arrow_left_white")) | 65 | Image($r("app.media.icon_arrow_left_white")) |
-
Please register or login to post a comment