Showing
1 changed file
with
18 additions
and
12 deletions
| 1 | -import { ContentDetailDTO, LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index'; | 1 | +import { ContentDetailDTO, LiveRoomDataBean } from 'wdBean/Index'; |
| 2 | import { LiveViewModel } from '../viewModel/LiveViewModel'; | 2 | import { LiveViewModel } from '../viewModel/LiveViewModel'; |
| 3 | import { TabComponent } from '../widgets/details/TabComponent'; | 3 | import { TabComponent } from '../widgets/details/TabComponent'; |
| 4 | import { TopPlayComponent } from '../widgets/details/video/TopPlayComponet'; | 4 | import { TopPlayComponent } from '../widgets/details/video/TopPlayComponet'; |
| @@ -6,12 +6,9 @@ import { DisplayDirection } from 'wdConstant/Index'; | @@ -6,12 +6,9 @@ import { DisplayDirection } from 'wdConstant/Index'; | ||
| 6 | import mediaquery from '@ohos.mediaquery'; | 6 | import mediaquery from '@ohos.mediaquery'; |
| 7 | import { Logger, WindowModel } from 'wdKit/Index'; | 7 | import { Logger, WindowModel } from 'wdKit/Index'; |
| 8 | import { router, window } from '@kit.ArkUI'; | 8 | import { router, window } from '@kit.ArkUI'; |
| 9 | -import { devicePLSensorManager } from 'wdDetailPlayApi/Index'; | ||
| 10 | -import { LiveCommentComponent } from 'wdComponent/Index'; | ||
| 11 | -import { WDAliPlayerController, WDPlayerController } from 'wdPlayer/Index'; | ||
| 12 | -import { LiveOperRowListView } from 'wdComponent/src/main/ets/components/view/LiveOperRowListView'; | 9 | +import { WDAliPlayerController } from 'wdPlayer/Index'; |
| 10 | +import { LiveOperRowListView } from 'wdComponent'; | ||
| 13 | import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel'; | 11 | import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel'; |
| 14 | -import { ResponseDTO } from 'wdNetwork/Index'; | ||
| 15 | 12 | ||
| 16 | let TAG: string = 'DetailPlayLivePage'; | 13 | let TAG: string = 'DetailPlayLivePage'; |
| 17 | 14 | ||
| @@ -37,7 +34,6 @@ export struct DetailPlayLivePage { | @@ -37,7 +34,6 @@ export struct DetailPlayLivePage { | ||
| 37 | @Consume @Watch('onBackPressCus') pageBackPress: number | 34 | @Consume @Watch('onBackPressCus') pageBackPress: number |
| 38 | @Consume contentDetailData: ContentDetailDTO | 35 | @Consume contentDetailData: ContentDetailDTO |
| 39 | @Consume publishCommentModel: publishCommentModel | 36 | @Consume publishCommentModel: publishCommentModel |
| 40 | - @Consume liveDetailsBean: LiveDetailsBean | ||
| 41 | 37 | ||
| 42 | aboutToAppear(): void { | 38 | aboutToAppear(): void { |
| 43 | Logger.info(TAG, `wyj-aboutToAppear`) | 39 | Logger.info(TAG, `wyj-aboutToAppear`) |
| @@ -65,11 +61,14 @@ export struct DetailPlayLivePage { | @@ -65,11 +61,14 @@ export struct DetailPlayLivePage { | ||
| 65 | 61 | ||
| 66 | build() { | 62 | build() { |
| 67 | Column() { | 63 | Column() { |
| 64 | + | ||
| 68 | TopPlayComponent({ playerController: this.playerController }) | 65 | TopPlayComponent({ playerController: this.playerController }) |
| 69 | - .height(this.displayDirection == DisplayDirection.VERTICAL ?211:'100%') | 66 | + .height(this.displayDirection == DisplayDirection.VERTICAL ? 211 : '100%') |
| 67 | + | ||
| 70 | TabComponent({ tabs: this.tabs, changeToTab: this.changeToTab }) | 68 | TabComponent({ tabs: this.tabs, changeToTab: this.changeToTab }) |
| 71 | .layoutWeight(1) | 69 | .layoutWeight(1) |
| 72 | .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) | 70 | .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) |
| 71 | + | ||
| 73 | LiveOperRowListView({ | 72 | LiveOperRowListView({ |
| 74 | operationButtonList: ['comment', 'collect', 'share', 'like'], | 73 | operationButtonList: ['comment', 'collect', 'share', 'like'], |
| 75 | styleType: 1, | 74 | styleType: 1, |
| @@ -80,8 +79,7 @@ export struct DetailPlayLivePage { | @@ -80,8 +79,7 @@ export struct DetailPlayLivePage { | ||
| 80 | // 切换到大家聊 | 79 | // 切换到大家聊 |
| 81 | this.changeToTab = Math.random() | 80 | this.changeToTab = Math.random() |
| 82 | } | 81 | } |
| 83 | - }) | ||
| 84 | - .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) | 82 | + }).visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) |
| 85 | 83 | ||
| 86 | // LiveCommentComponent({ heartNum: this.liveRoomDataBean.likeNum }) | 84 | // LiveCommentComponent({ heartNum: this.liveRoomDataBean.likeNum }) |
| 87 | // .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) | 85 | // .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) |
| @@ -119,7 +117,9 @@ export struct DetailPlayLivePage { | @@ -119,7 +117,9 @@ export struct DetailPlayLivePage { | ||
| 119 | } | 117 | } |
| 120 | 118 | ||
| 121 | getLiveDetails() { | 119 | getLiveDetails() { |
| 122 | - const data = this.liveDetailsBean | 120 | + const data = this.contentDetailData |
| 121 | + // console.error("XXXXZZZZ", 'contentDetailData ----liveState==>' + data.liveInfo?.liveState) | ||
| 122 | + // console.error("XXXXZZZZ", 'contentDetailData ----liveStyle==>' + data.liveInfo?.liveStyle) | ||
| 123 | if (data.liveInfo?.liveState == 'wait') { | 123 | if (data.liveInfo?.liveState == 'wait') { |
| 124 | //直播样式 0-正常模式 , 1-隐藏直播间,2-隐藏大家聊 【人民号发布是竖屏的,为空】 | 124 | //直播样式 0-正常模式 , 1-隐藏直播间,2-隐藏大家聊 【人民号发布是竖屏的,为空】 |
| 125 | if (data.liveInfo?.liveStyle == 1) { | 125 | if (data.liveInfo?.liveStyle == 1) { |
| @@ -130,7 +130,13 @@ export struct DetailPlayLivePage { | @@ -130,7 +130,13 @@ export struct DetailPlayLivePage { | ||
| 130 | this.tabs = ['简介', '直播间', '大家聊'] | 130 | this.tabs = ['简介', '直播间', '大家聊'] |
| 131 | } | 131 | } |
| 132 | } else { | 132 | } else { |
| 133 | - this.tabs = ['直播间', '大家聊'] | 133 | + if (data.liveInfo?.liveStyle == 1) { |
| 134 | + this.tabs = ['大家聊'] | ||
| 135 | + } else if (data.liveInfo?.liveStyle == 2) { | ||
| 136 | + this.tabs = ['直播间',] | ||
| 137 | + } else { | ||
| 138 | + this.tabs = ['直播间', '大家聊'] | ||
| 139 | + } | ||
| 134 | } | 140 | } |
| 135 | 141 | ||
| 136 | } | 142 | } |
-
Please register or login to post a comment