wangyujian_wd

fix:1)直播详情页面和电子报模块修改优化

@@ -159,7 +159,7 @@ export interface LiveDetailsBean { @@ -159,7 +159,7 @@ export interface LiveDetailsBean {
159 } 159 }
160 */ 160 */
161 liveInfo: LiveInfo 161 liveInfo: LiveInfo
162 - fullColumnImgUrls: Array<FullColumnImgUrls> 162 + fullColumnImgUrls: Array<FullColumnImgUrlBean>
163 newsTitle: string 163 newsTitle: string
164 newsId: string 164 newsId: string
165 newIntroduction: string 165 newIntroduction: string
@@ -186,8 +186,12 @@ export interface MLive { @@ -186,8 +186,12 @@ export interface MLive {
186 mliveId: string 186 mliveId: string
187 } 187 }
188 188
189 -export interface FullColumnImgUrls { 189 +export interface FullColumnImgUrlBean {
190 url: string 190 url: string
  191 + height: string
  192 + landscape: number
  193 + size: string
  194 + weight: string
191 } 195 }
192 196
193 export interface Vlive { 197 export interface Vlive {
  1 +import { FullColumnImgUrlBean } from './LiveDetailsBean'
  2 +
1 export interface LiveRoomBean { 3 export interface LiveRoomBean {
2 pageNum: number 4 pageNum: number
3 pageSize: number 5 pageSize: number
@@ -15,6 +17,7 @@ export interface LiveRoomItemBean { @@ -15,6 +17,7 @@ export interface LiveRoomItemBean {
15 isWall: number 17 isWall: number
16 //是否置顶 1置顶0不置顶 18 //是否置顶 1置顶0不置顶
17 isTop: number 19 isTop: number
  20 + //guest :嘉宾,host:主持人
18 role: string 21 role: string
19 //ZH_TEXT_AND_IMAGE_MSG :图文,ZH_TEXT_MSG:文本,ZH_VIDEO_MSG:视频,ZH_AUDIO_MSG:音频 22 //ZH_TEXT_AND_IMAGE_MSG :图文,ZH_TEXT_MSG:文本,ZH_VIDEO_MSG:视频,ZH_AUDIO_MSG:音频
20 dataType: string 23 dataType: string
@@ -28,5 +31,7 @@ export interface LiveRoomItemBean { @@ -28,5 +31,7 @@ export interface LiveRoomItemBean {
28 duration: number 31 duration: number
29 //音频地址 32 //音频地址
30 audioUrl: string 33 audioUrl: string
  34 + //详情页面插入数据bean
  35 + fullColumnImgUrlDto: FullColumnImgUrlBean
31 36
32 } 37 }
@@ -30,7 +30,7 @@ export struct LiveFollowComponent { @@ -30,7 +30,7 @@ export struct LiveFollowComponent {
30 Stack() { 30 Stack() {
31 Stack() 31 Stack()
32 .height(22) 32 .height(22)
33 - .width(130) 33 + .width(150)
34 .backgroundColor('#000000') 34 .backgroundColor('#000000')
35 .opacity(0.3) 35 .opacity(0.3)
36 .borderRadius({ 36 .borderRadius({
@@ -71,7 +71,7 @@ export struct LiveFollowComponent { @@ -71,7 +71,7 @@ export struct LiveFollowComponent {
71 }) 71 })
72 } 72 }
73 .height(22) 73 .height(22)
74 - .width(130) 74 + .width(150)
75 } 75 }
76 } 76 }
77 77
@@ -71,6 +71,7 @@ export struct LiveCommentComponent { @@ -71,6 +71,7 @@ export struct LiveCommentComponent {
71 left: 6, 71 left: 6,
72 right: 2 72 right: 2
73 }) 73 })
  74 + .visibility(this.heartNum > 0 ? Visibility.Visible : Visibility.Hidden)
74 Image(this.isLike ? $r('app.media.icon_like_selected_redheart') : $r('app.media.iv_live_heart_normal')) 75 Image(this.isLike ? $r('app.media.icon_like_selected_redheart') : $r('app.media.iv_live_heart_normal'))
75 .width(24) 76 .width(24)
76 .height(24) 77 .height(24)
@@ -12,7 +12,7 @@ export struct ENewspaperListDialog { @@ -12,7 +12,7 @@ export struct ENewspaperListDialog {
12 @Consume @Watch('onCurrentPageNumUpdated') currentPageNum: string 12 @Consume @Watch('onCurrentPageNumUpdated') currentPageNum: string
13 @State pageDialogShow: boolean = false 13 @State pageDialogShow: boolean = false
14 @State scrollIndex: number = 0 14 @State scrollIndex: number = 0
15 - @Prop newspaperListBean: NewspaperListBean = {} as NewspaperListBean 15 + @Prop @Watch('updateRecordsData') newspaperListBean: NewspaperListBean = {} as NewspaperListBean
16 private listScroller: Scroller = new Scroller(); 16 private listScroller: Scroller = new Scroller();
17 //文字版选择弹框 17 //文字版选择弹框
18 pageListDialogController: CustomDialogController = new CustomDialogController({ 18 pageListDialogController: CustomDialogController = new CustomDialogController({
@@ -114,16 +114,24 @@ export struct ENewspaperListDialog { @@ -114,16 +114,24 @@ export struct ENewspaperListDialog {
114 .fontSize($r('app.float.font_size_14')) 114 .fontSize($r('app.float.font_size_14'))
115 .fontColor($r('app.color.color_ED2800')) 115 .fontColor($r('app.color.color_ED2800'))
116 .fontWeight(600) 116 .fontWeight(600)
117 - .margin({ top: 16, bottom: 16 }) 117 + .width('100%')
  118 + .textAlign(TextAlign.Start)
  119 + .margin({
  120 + // top: 16,
  121 + bottom: 16
  122 + })
118 .maxLines(1) 123 .maxLines(1)
119 } 124 }
120 - 125 + Column() {
121 if (positionItem.shortTitle) { 126 if (positionItem.shortTitle) {
122 Text(positionItem.shortTitle) 127 Text(positionItem.shortTitle)
123 .fontSize($r('app.float.font_size_14')) 128 .fontSize($r('app.float.font_size_14'))
124 .fontColor($r('app.color.color_222222')) 129 .fontColor($r('app.color.color_222222'))
125 .fontWeight(600) 130 .fontWeight(600)
126 .maxLines(2) 131 .maxLines(2)
  132 + .margin({
  133 + bottom: 8
  134 + })
127 } 135 }
128 136
129 if (positionItem.title) { 137 if (positionItem.title) {
@@ -131,7 +139,9 @@ export struct ENewspaperListDialog { @@ -131,7 +139,9 @@ export struct ENewspaperListDialog {
131 .fontSize($r('app.float.font_size_17')) 139 .fontSize($r('app.float.font_size_17'))
132 .fontColor($r('app.color.color_222222')) 140 .fontColor($r('app.color.color_222222'))
133 .fontWeight(600) 141 .fontWeight(600)
134 - .margin({ top: 8 }) 142 + .margin({
  143 + bottom: 8
  144 + })
135 .maxLines(2) 145 .maxLines(2)
136 } 146 }
137 147
@@ -140,19 +150,23 @@ export struct ENewspaperListDialog { @@ -140,19 +150,23 @@ export struct ENewspaperListDialog {
140 .fontSize($r('app.float.font_size_14')) 150 .fontSize($r('app.float.font_size_14'))
141 .fontColor($r('app.color.color_222222')) 151 .fontColor($r('app.color.color_222222'))
142 .fontWeight(600) 152 .fontWeight(600)
143 - .margin({ top: 8 }) 153 + .margin({
  154 + bottom: 8
  155 + })
144 .maxLines(2) 156 .maxLines(2)
145 } 157 }
146 -  
147 if (positionItem.newsTxt) { 158 if (positionItem.newsTxt) {
148 Text(positionItem.newsTxt) 159 Text(positionItem.newsTxt)
149 .fontSize($r('app.float.font_size_14')) 160 .fontSize($r('app.float.font_size_14'))
150 .fontColor($r('app.color.color_999999')) 161 .fontColor($r('app.color.color_999999'))
151 - .margin({ top: 15, bottom: 15 }) 162 + .margin({
  163 + // bottom: 15
  164 + })
152 .maxLines(5) 165 .maxLines(5)
153 .textOverflow({ overflow: TextOverflow.Ellipsis }) 166 .textOverflow({ overflow: TextOverflow.Ellipsis })
154 } 167 }
155 } 168 }
  169 + .width('100%')
156 .alignItems(HorizontalAlign.Start) 170 .alignItems(HorizontalAlign.Start)
157 .onClick(() => { 171 .onClick(() => {
158 let taskAction: Action = { 172 let taskAction: Action = {
@@ -172,34 +186,56 @@ export struct ENewspaperListDialog { @@ -172,34 +186,56 @@ export struct ENewspaperListDialog {
172 // this.listDialogController.close() 186 // this.listDialogController.close()
173 // } 187 // }
174 }) 188 })
  189 +
  190 + if (item.items.length != itemIndex + 1) {
  191 + Divider()
  192 + .strokeWidth(0.5)
  193 + .color('#EDEDED')
  194 + .padding({
  195 + top: 15,
  196 + bottom: 15
  197 + })
  198 + }
  199 + }
175 } 200 }
176 }) 201 })
177 } 202 }
178 - .divider({  
179 - strokeWidth: 0.5,  
180 - color: '#EDEDED' 203 + // .divider({
  204 + // color: '#EDEDED',
  205 + // strokeWidth: 0.5
  206 + // })
  207 + .padding({
  208 + top: 16,
  209 + bottom: 16
181 }) 210 })
182 } 211 }
183 }) 212 })
184 } 213 }
  214 + .divider({
  215 + color: '#EDEDED',
  216 + strokeWidth: 0.5
  217 + })
185 .width('100%') 218 .width('100%')
186 - .padding({ left: 15, right: 15 }) 219 + .padding({
  220 + left: 15,
  221 + right: 15,
  222 + top: 16,
  223 + bottom: 16
  224 + })
187 .margin({ 225 .margin({
188 bottom: 85 226 bottom: 85
189 }) 227 })
190 .scrollBar(BarState.Off) 228 .scrollBar(BarState.Off)
191 - .divider({  
192 - strokeWidth: 0.5,  
193 - color: '#EDEDED'  
194 - })  
195 - .onScrollIndex((firstIndex: number) => {  
196 - console.log('firstIndex', firstIndex)  
197 - }) 229 +
198 .onScrollIndex((firstIndex: number, lastIndex: number, centerIndex: number) => { 230 .onScrollIndex((firstIndex: number, lastIndex: number, centerIndex: number) => {
199 - console.info('first' + firstIndex)  
200 - console.info('last' + lastIndex)  
201 - console.info('center' + centerIndex) 231 + console.info('ENewspaperListDialog::first' + firstIndex)
  232 + console.info('ENewspaperListDialog::last' + lastIndex)
  233 + console.info('ENewspaperListDialog::center' + centerIndex)
202 // this.updateCurrentPageNum(firstIndex) 234 // this.updateCurrentPageNum(firstIndex)
  235 + // const tempIndex = this.findClassIndex(firstIndex)
  236 + if (firstIndex !== centerIndex) {
  237 + return
  238 + }
203 this.currentPageNum = `${centerIndex < 9 ? '0' + (centerIndex + 1) : centerIndex + 1}` 239 this.currentPageNum = `${centerIndex < 9 ? '0' + (centerIndex + 1) : centerIndex + 1}`
204 }) 240 })
205 .onScroll((scrollOffset: number, scrollState: ScrollState) => { 241 .onScroll((scrollOffset: number, scrollState: ScrollState) => {
@@ -222,23 +258,25 @@ export struct ENewspaperListDialog { @@ -222,23 +258,25 @@ export struct ENewspaperListDialog {
222 }) 258 })
223 } 259 }
224 260
225 - updateCurrentPageNum(firstIndex: number): void {  
226 - if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {  
227 - let index = 0;  
228 - for (let itemBean of this.newspaperListBean.list) {  
229 - if (itemBean.items && itemBean.items.length > 0) {  
230 - for (let item of itemBean.items) {  
231 - index++  
232 - if (index == firstIndex) {  
233 - this.currentPageNum = itemBean.pageNum  
234 - return  
235 - }  
236 - }  
237 - }  
238 - } 261 + updateRecordsData() {
  262 + // if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
  263 + // for (let itemBean of this.newspaperListBean.list) {
  264 + // index += itemBean.items.length
  265 + // this.records.push(index)
  266 + // }
  267 + // }
239 } 268 }
240 269
241 - } 270 + // findClassIndex(index: number): number {
  271 + // let ans = 0;
  272 + // for (let i = 0; i < this.records.length; i++) {
  273 + // if (index >= this.records[i] && index < this.records[i + 1]) {
  274 + // ans = i;
  275 + // break;
  276 + // }
  277 + // }
  278 + // return ans;
  279 + // }
242 } 280 }
243 281
244 282
1 import font from '@ohos.font' 1 import font from '@ohos.font'
2 import { LiveDetailsBean } from 'wdBean/Index' 2 import { LiveDetailsBean } from 'wdBean/Index'
3 -import { DateTimeUtils, StringUtils } from 'wdKit/Index' 3 +import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index'
4 import { LiveViewModel } from '../../viewModel/LiveViewModel' 4 import { LiveViewModel } from '../../viewModel/LiveViewModel'
5 import { HttpUtils } from 'wdNetwork/Index' 5 import { HttpUtils } from 'wdNetwork/Index'
6 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' 6 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
@@ -167,6 +167,11 @@ export struct LiveCountdownComponent { @@ -167,6 +167,11 @@ export struct LiveCountdownComponent {
167 (data) => { 167 (data) => {
168 if (data.success) { 168 if (data.success) {
169 this.isAppointmentLive = !this.isAppointmentLive 169 this.isAppointmentLive = !this.isAppointmentLive
  170 + if (this.isAppointmentLive) {
  171 + ToastUtils.showToast('预约成功', 1000)
  172 + } else {
  173 + ToastUtils.showToast('取消预约成功', 1000)
  174 + }
170 } 175 }
171 }, 176 },
172 () => { 177 () => {
@@ -34,7 +34,7 @@ export struct TabComponent { @@ -34,7 +34,7 @@ export struct TabComponent {
34 .layoutWeight(1) 34 .layoutWeight(1)
35 .vertical(false) 35 .vertical(false)
36 .barMode(BarMode.Fixed) 36 .barMode(BarMode.Fixed)
37 - .barWidth(200) 37 + .barWidth(70 * this.tabs.length)
38 .barHeight(48) 38 .barHeight(48)
39 .animationDuration(100) 39 .animationDuration(100)
40 .onChange((index: number) => { 40 .onChange((index: number) => {
1 import { LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index' 1 import { LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index'
2 -import { EmptyComponent, ErrorComponent, ListHasNoMoreDataUI,  
3 - WDViewDefaultType } from 'wdComponent/Index' 2 +import { EmptyComponent, ErrorComponent, ListHasNoMoreDataUI, WDViewDefaultType } from 'wdComponent/Index'
4 import { TabLiveItemComponent } from './TabLiveItemComponent' 3 import { TabLiveItemComponent } from './TabLiveItemComponent'
5 import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout' 4 import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout'
6 import { RefreshLayoutBean } from 'wdComponent/src/main/ets/components/page/RefreshLayoutBean' 5 import { RefreshLayoutBean } from 'wdComponent/src/main/ets/components/page/RefreshLayoutBean'
@@ -109,9 +108,14 @@ export struct TabLiveComponent { @@ -109,9 +108,14 @@ export struct TabLiveComponent {
109 let liveRoomItemBeanTemp: LiveRoomItemBean = {} as LiveRoomItemBean 108 let liveRoomItemBeanTemp: LiveRoomItemBean = {} as LiveRoomItemBean
110 liveRoomItemBeanTemp.text = this.liveDetailsBean.newIntroduction 109 liveRoomItemBeanTemp.text = this.liveDetailsBean.newIntroduction
111 liveRoomItemBeanTemp.senderUserName = '人民日报主持人' 110 liveRoomItemBeanTemp.senderUserName = '人民日报主持人'
112 - liveRoomItemBeanTemp.pictureUrls=[] 111 + liveRoomItemBeanTemp.pictureUrls = []
113 liveRoomItemBeanTemp.pictureUrls.push(this.liveDetailsBean?.fullColumnImgUrls[0]?.url) 112 liveRoomItemBeanTemp.pictureUrls.push(this.liveDetailsBean?.fullColumnImgUrls[0]?.url)
114 - liveRoomItemBeanTemp.dataType='ZH_TEXT_AND_IMAGE_MSG' 113 + liveRoomItemBeanTemp.dataType = 'ZH_TEXT_AND_IMAGE_MSG'
  114 + let temp = this.liveDetailsBean?.fullColumnImgUrls[0]
  115 + if (temp) {
  116 + liveRoomItemBeanTemp.pictureResolutions = []
  117 + liveRoomItemBeanTemp.pictureResolutions.push(`${temp.height}*${temp.weight}`)
  118 + }
115 this.liveList.push(liveRoomItemBeanTemp) 119 this.liveList.push(liveRoomItemBeanTemp)
116 } 120 }
117 } 121 }
@@ -28,7 +28,7 @@ export struct TabLiveItemComponent { @@ -28,7 +28,7 @@ export struct TabLiveItemComponent {
28 .fontSize('14fp') 28 .fontSize('14fp')
29 .fontWeight(400) 29 .fontWeight(400)
30 .fontColor('#222222') 30 .fontColor('#222222')
31 - Text('主持人') 31 + Text(this.item.role === 'host' ? '主持人' : '嘉宾')
32 .maxLines(1) 32 .maxLines(1)
33 .textOverflow({ overflow: TextOverflow.Ellipsis }) 33 .textOverflow({ overflow: TextOverflow.Ellipsis })
34 .fontSize('11fp') 34 .fontSize('11fp')
@@ -43,7 +43,7 @@ export struct TabLiveItemComponent { @@ -43,7 +43,7 @@ export struct TabLiveItemComponent {
43 }) 43 })
44 .borderRadius(2) 44 .borderRadius(2)
45 .margin({ left: 8 }) 45 .margin({ left: 8 })
46 - .visibility('host' == this.item.role ? Visibility.Visible : Visibility.None) 46 + .visibility(StringUtils.isNotEmpty(this.item.role) ? Visibility.Visible : Visibility.None)
47 Text(DateTimeUtils.getCommentTime(new Date(this.item.time).getTime())) 47 Text(DateTimeUtils.getCommentTime(new Date(this.item.time).getTime()))
48 .maxLines(1) 48 .maxLines(1)
49 .textOverflow({ overflow: TextOverflow.Ellipsis }) 49 .textOverflow({ overflow: TextOverflow.Ellipsis })
@@ -85,21 +85,21 @@ export struct TabLiveItemComponent { @@ -85,21 +85,21 @@ export struct TabLiveItemComponent {
85 List({ space: this.item.pictureUrls.length == 1 ? 0 : 5 }) { 85 List({ space: this.item.pictureUrls.length == 1 ? 0 : 5 }) {
86 ForEach(this.item.pictureUrls, (itemSub: string, index: number) => { 86 ForEach(this.item.pictureUrls, (itemSub: string, index: number) => {
87 ListItem() { 87 ListItem() {
  88 + if (this.item.pictureUrls.length > 1) {
88 Image(itemSub) 89 Image(itemSub)
89 .width(`${100 / this.item.pictureUrls.length}%`) 90 .width(`${100 / this.item.pictureUrls.length}%`)
90 - .height(this.item.pictureUrls.length > 1 ? 70 : 174) 91 + .height(70)
  92 + .objectFit(ImageFit.Auto)
  93 + .borderRadius(4)
  94 + } else {
  95 + Image(itemSub)
  96 + .width(`100%`)
  97 + // .aspectRatio(this.getAspectRation())
  98 + .height(177)
91 .objectFit(ImageFit.Auto) 99 .objectFit(ImageFit.Auto)
92 .borderRadius(4) 100 .borderRadius(4)
93 - }.onClick(() => {  
94 - this.photoList = []  
95 - for (let item of this.item.pictureUrls) {  
96 - this.photoList.push({  
97 - width: 0,  
98 - height: 0,  
99 - picPath: item,  
100 - picDesc: ''  
101 - })  
102 } 101 }
  102 + }.onClick(() => {
103 this.gotoMultipleListImagePage(index) 103 this.gotoMultipleListImagePage(index)
104 }) 104 })
105 }) 105 })
@@ -147,7 +147,7 @@ export struct TabLiveItemComponent { @@ -147,7 +147,7 @@ export struct TabLiveItemComponent {
147 .margin({ 147 .margin({
148 top: 8, 148 top: 8,
149 }) 149 })
150 - .aspectRatio(Number.parseFloat(this.item.pictureResolutions[0]?.split('*')[0]) / Number.parseFloat(this.item.pictureResolutions[0]?.split('*')[1])) 150 + .aspectRatio(this.getAspectRation())
151 .onClick(() => { 151 .onClick(() => {
152 this.gotoVideoPlayPage() 152 this.gotoVideoPlayPage()
153 }) 153 })
@@ -188,6 +188,15 @@ export struct TabLiveItemComponent { @@ -188,6 +188,15 @@ export struct TabLiveItemComponent {
188 * @param content 188 * @param content
189 * */ 189 * */
190 gotoMultipleListImagePage(index: number) { 190 gotoMultipleListImagePage(index: number) {
  191 + this.photoList = []
  192 + for (let item of this.item.pictureUrls) {
  193 + this.photoList.push({
  194 + width: 0,
  195 + height: 0,
  196 + picPath: item,
  197 + picDesc: ''
  198 + })
  199 + }
191 let taskAction: Action = { 200 let taskAction: Action = {
192 type: 'JUMP_DETAIL_PAGE', 201 type: 'JUMP_DETAIL_PAGE',
193 params: { 202 params: {
@@ -204,4 +213,20 @@ export struct TabLiveItemComponent { @@ -204,4 +213,20 @@ export struct TabLiveItemComponent {
204 aboutToDisappear(): void { 213 aboutToDisappear(): void {
205 214
206 } 215 }
  216 +
  217 + getAspectRation(): number {
  218 + try {
  219 + if (this.item && this.item.pictureResolutions && this.item.pictureResolutions.length > 0) {
  220 + let temp: string[] = this.item.pictureResolutions[0]?.split('*')
  221 + if (temp && temp.length == 2) {
  222 + let width = Number.parseFloat(this.item.pictureResolutions[0]?.split('*')[0])
  223 + let height = Number.parseFloat(this.item.pictureResolutions[0]?.split('*')[1])
  224 + return height / width
  225 + }
  226 + }
  227 + } catch (e) {
  228 + return 1
  229 + }
  230 + return 1
  231 + }
207 } 232 }
@@ -20,6 +20,9 @@ export struct PlayUIComponent { @@ -20,6 +20,9 @@ export struct PlayUIComponent {
20 @Consume displayDirection: DisplayDirection 20 @Consume displayDirection: DisplayDirection
21 21
22 onChangeMenuVisible() { 22 onChangeMenuVisible() {
  23 + if (!this.liveDetailsBean || !this.liveDetailsBean.liveInfo || this.liveDetailsBean?.liveInfo?.liveState === 'wait') {
  24 + return
  25 + }
23 let time: number = 0 26 let time: number = 0
24 if (this.isMenuVisible) { 27 if (this.isMenuVisible) {
25 setTimeout(() => { 28 setTimeout(() => {
@@ -38,15 +41,16 @@ export struct PlayUIComponent { @@ -38,15 +41,16 @@ export struct PlayUIComponent {
38 this.totalTime = DateFormatUtil.secondToTime(Math.floor(duration / 1000)); 41 this.totalTime = DateFormatUtil.secondToTime(Math.floor(duration / 1000));
39 this.progressVal = Math.floor(position * 100 / duration); 42 this.progressVal = Math.floor(position * 100 / duration);
40 } 43 }
41 -  
42 } 44 }
43 45
44 build() { 46 build() {
45 Column() { 47 Column() {
  48 + if (this.liveDetailsBean && this.liveDetailsBean.liveInfo) {
46 this.getTopUIComponent() 49 this.getTopUIComponent()
47 this.getMiddleUIComponent() 50 this.getMiddleUIComponent()
48 this.getBottomUIComponent() 51 this.getBottomUIComponent()
49 } 52 }
  53 + }
50 .width('100%') 54 .width('100%')
51 .height('100%') 55 .height('100%')
52 .alignItems(HorizontalAlign.Start) 56 .alignItems(HorizontalAlign.Start)
@@ -67,7 +71,7 @@ export struct PlayUIComponent { @@ -67,7 +71,7 @@ export struct PlayUIComponent {
67 this.displayDirection = DisplayDirection.VERTICAL 71 this.displayDirection = DisplayDirection.VERTICAL
68 WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ? 72 WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
69 window.Orientation.PORTRAIT : 73 window.Orientation.PORTRAIT :
70 - window.Orientation.LANDSCAPE) 74 + window.Orientation.LANDSCAPE_INVERTED)
71 // devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ? 75 // devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ?
72 // window.Orientation.PORTRAIT : 76 // window.Orientation.PORTRAIT :
73 // window.Orientation.LANDSCAPE); 77 // window.Orientation.LANDSCAPE);
@@ -106,15 +110,17 @@ export struct PlayUIComponent { @@ -106,15 +110,17 @@ export struct PlayUIComponent {
106 } 110 }
107 this.getLiveStatusView() 111 this.getLiveStatusView()
108 } 112 }
109 - }.width('100%') 113 + }
  114 + .width('100%')
110 .padding({ 115 .padding({
111 - top: 20, 116 + top: 15,
112 bottom: 6, 117 bottom: 6,
113 left: 10, 118 left: 10,
114 right: 10 119 right: 10
115 }) 120 })
116 .alignItems(HorizontalAlign.Start) 121 .alignItems(HorizontalAlign.Start)
117 .visibility(this.isMenuVisible ? Visibility.Visible : Visibility.None) 122 .visibility(this.isMenuVisible ? Visibility.Visible : Visibility.None)
  123 + .linearGradient({ angle: 0, colors: [['#00000000', 0], ['#99000000', 1]] })
118 } 124 }
119 125
120 @Builder 126 @Builder
@@ -194,6 +200,9 @@ export struct PlayUIComponent { @@ -194,6 +200,9 @@ export struct PlayUIComponent {
194 .layoutWeight(1) 200 .layoutWeight(1)
195 .width('100%') 201 .width('100%')
196 .onClick(() => { 202 .onClick(() => {
  203 + if (this.liveDetailsBean?.liveInfo?.liveState === 'wait') {
  204 + return
  205 + }
197 this.isMenuVisible = !this.isMenuVisible 206 this.isMenuVisible = !this.isMenuVisible
198 }) 207 })
199 } 208 }
@@ -233,11 +242,12 @@ export struct PlayUIComponent { @@ -233,11 +242,12 @@ export struct PlayUIComponent {
233 this.displayDirection = this.displayDirection == DisplayDirection.VERTICAL ? DisplayDirection.VIDEO_HORIZONTAL : DisplayDirection.VERTICAL 242 this.displayDirection = this.displayDirection == DisplayDirection.VERTICAL ? DisplayDirection.VIDEO_HORIZONTAL : DisplayDirection.VERTICAL
234 WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ? 243 WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
235 window.Orientation.PORTRAIT : 244 window.Orientation.PORTRAIT :
236 - window.Orientation.LANDSCAPE) 245 + window.Orientation.LANDSCAPE_INVERTED)
237 // devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ? 246 // devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ?
238 // window.Orientation.PORTRAIT : 247 // window.Orientation.PORTRAIT :
239 // window.Orientation.LANDSCAPE); 248 // window.Orientation.LANDSCAPE);
240 }) 249 })
  250 + .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
241 } 251 }
242 } 252 }
243 .alignItems(VerticalAlign.Center) 253 .alignItems(VerticalAlign.Center)
@@ -32,6 +32,7 @@ export struct TopPlayComponent { @@ -32,6 +32,7 @@ export struct TopPlayComponent {
32 playUrl = this.liveDetailsBean.liveInfo.vlive[0].replayUri 32 playUrl = this.liveDetailsBean.liveInfo.vlive[0].replayUri
33 } 33 }
34 this.playerController?.firstPlay(playUrl); 34 this.playerController?.firstPlay(playUrl);
  35 + // this.playerController?.firstPlay('https://rmrbcmsonline.peopleapp.com/upload/rmh/video/mp4/202404/1713752415708fb81d0b8f137b.mp4');
35 } 36 }
36 } 37 }
37 38