王士厅
@@ -93,7 +93,8 @@ export struct CardMediaInfo { @@ -93,7 +93,8 @@ export struct CardMediaInfo {
93 .fontFamily('BebasNeue') 93 .fontFamily('BebasNeue')
94 94
95 } 95 }
96 - } .margin({ left: 68,top: 135}) 96 + }
  97 + // .margin({ left: 68,top: 135})
97 } else if (this.contentDTO.objectType === '2') { 98 } else if (this.contentDTO.objectType === '2') {
98 // liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 99 // liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停
99 // 显示直播信息 100 // 显示直播信息
@@ -191,7 +192,7 @@ export struct CardMediaInfo { @@ -191,7 +192,7 @@ export struct CardMediaInfo {
191 .mediaTextImgtype() 192 .mediaTextImgtype()
192 .fontFamily('BebasNeue') 193 .fontFamily('BebasNeue')
193 } 194 }
194 - .margin({ left: 80,top: 55}) 195 + // .margin({ left: 80,top: 55})
195 196
196 } else if (this.contentDTO.objectType === '13') { 197 } else if (this.contentDTO.objectType === '13') {
197 // 显示音频信息 198 // 显示音频信息
@@ -4,7 +4,7 @@ import router from '@ohos.router'; @@ -4,7 +4,7 @@ import router from '@ohos.router';
4 4
5 import { DetailPlayLivePage } from './DetailPlayLivePage'; 5 import { DetailPlayLivePage } from './DetailPlayLivePage';
6 import { DetailPlayVLivePage } from './DetailPlayVLivePage'; 6 import { DetailPlayVLivePage } from './DetailPlayVLivePage';
7 -import { DateTimeUtils, Logger, ToastUtils } from 'wdKit/Index'; 7 +import { DateTimeUtils, Logger, ToastUtils, WindowModel } from 'wdKit/Index';
8 import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel'; 8 import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel';
9 import { PictureLoading } from '../widgets/vertical/PictureLoading'; 9 import { PictureLoading } from '../widgets/vertical/PictureLoading';
10 import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index'; 10 import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index';
@@ -26,6 +26,8 @@ export struct DetailPlayLiveCommon { @@ -26,6 +26,8 @@ export struct DetailPlayLiveCommon {
26 private liveViewModel: LiveViewModel = new LiveViewModel() 26 private liveViewModel: LiveViewModel = new LiveViewModel()
27 pageShowTime: number = 0; 27 pageShowTime: number = 0;
28 28
  29 + @Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  30 + @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
29 @Provide relId: string = '' 31 @Provide relId: string = ''
30 @Provide contentId: string = '' 32 @Provide contentId: string = ''
31 @Provide relType: string = '' 33 @Provide relType: string = ''
@@ -83,7 +85,7 @@ export struct DetailPlayLiveCommon { @@ -83,7 +85,7 @@ export struct DetailPlayLiveCommon {
83 .height('100%') 85 .height('100%')
84 .width('100%') 86 .width('100%')
85 .backgroundColor(Color.Black) 87 .backgroundColor(Color.Black)
86 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) 88 + // .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
87 } 89 }
88 90
89 /** 91 /**
@@ -153,9 +155,11 @@ export struct DetailPlayLiveCommon { @@ -153,9 +155,11 @@ export struct DetailPlayLiveCommon {
153 this.pageShow = Math.random() 155 this.pageShow = Math.random()
154 Logger.info(TAG, 'onPageShow') 156 Logger.info(TAG, 'onPageShow')
155 this.pageShowTime = DateTimeUtils.getTimeStamp() 157 this.pageShowTime = DateTimeUtils.getTimeStamp()
  158 + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff'})
156 } 159 }
157 160
158 onPageHide() { 161 onPageHide() {
  162 + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000'})
159 this.pageHide = Math.random() 163 this.pageHide = Math.random()
160 Logger.info(TAG, 'onPageHide') 164 Logger.info(TAG, 'onPageHide')
161 //页面浏览 165 //页面浏览
@@ -166,6 +170,7 @@ export struct DetailPlayLiveCommon { @@ -166,6 +170,7 @@ export struct DetailPlayLiveCommon {
166 } 170 }
167 171
168 onBackPress(): boolean | void { 172 onBackPress(): boolean | void {
  173 +
169 this.pageBackPress = Math.random() 174 this.pageBackPress = Math.random()
170 Logger.info(TAG, 'onBackPress') 175 Logger.info(TAG, 'onBackPress')
171 return true 176 return true
@@ -39,6 +39,8 @@ export struct DetailPlayLivePage { @@ -39,6 +39,8 @@ export struct DetailPlayLivePage {
39 // 尽量不要动属性。用来作为输入了评论之后,值传递 39 // 尽量不要动属性。用来作为输入了评论之后,值传递
40 @State lastInputedLiveComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的直播间消息 40 @State lastInputedLiveComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的直播间消息
41 @State lastInputedChatComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的大家聊消息 41 @State lastInputedChatComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的大家聊消息
  42 + // 顶部状态栏高度
  43 + @Consume topSafeHeight: number
42 44
43 aboutToAppear(): void { 45 aboutToAppear(): void {
44 Logger.info(TAG, `wyj-aboutToAppear`) 46 Logger.info(TAG, `wyj-aboutToAppear`)
@@ -50,7 +52,7 @@ export struct DetailPlayLivePage { @@ -50,7 +52,7 @@ export struct DetailPlayLivePage {
50 } else { 52 } else {
51 this.displayDirection = DisplayDirection.VERTICAL 53 this.displayDirection = DisplayDirection.VERTICAL
52 } 54 }
53 - WindowModel.shared.setMainWindowFullScreen(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) 55 + // WindowModel.shared.setMainWindowFullScreen(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL)
54 }) 56 })
55 this.getLiveDetails() 57 this.getLiveDetails()
56 this.getLiveRoomData() 58 this.getLiveRoomData()
@@ -66,9 +68,11 @@ export struct DetailPlayLivePage { @@ -66,9 +68,11 @@ export struct DetailPlayLivePage {
66 68
67 build() { 69 build() {
68 Column() { 70 Column() {
69 -  
70 TopPlayComponent({ playerController: this.playerController }) 71 TopPlayComponent({ playerController: this.playerController })
71 .height(this.displayDirection == DisplayDirection.VERTICAL ? 211 : '100%') 72 .height(this.displayDirection == DisplayDirection.VERTICAL ? 211 : '100%')
  73 + .margin({
  74 + top: this.displayDirection == DisplayDirection.VERTICAL ? px2vp(this.topSafeHeight) : 0
  75 + })
72 76
73 TabComponent({ 77 TabComponent({
74 tabs: this.tabs, 78 tabs: this.tabs,
@@ -114,7 +118,6 @@ export struct DetailPlayLivePage { @@ -114,7 +118,6 @@ export struct DetailPlayLivePage {
114 .height('100%') 118 .height('100%')
115 .width('100%') 119 .width('100%')
116 120
117 - // 设置底部绘制延伸到导航条  
118 } 121 }
119 122
120 onPageShowCus(): void { 123 onPageShowCus(): void {
@@ -23,8 +23,8 @@ export struct DetailPlayVLivePage { @@ -23,8 +23,8 @@ export struct DetailPlayVLivePage {
23 private playerController: WDAliPlayerController = new WDAliPlayerController(); 23 private playerController: WDAliPlayerController = new WDAliPlayerController();
24 private swiperController: SwiperController = new SwiperController() 24 private swiperController: SwiperController = new SwiperController()
25 @Consume contentDetailData: ContentDetailDTO 25 @Consume contentDetailData: ContentDetailDTO
26 - @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0  
27 - @Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 26 + @Consume bottomSafeHeight: number
  27 + @Consume topSafeHeight: number
28 @Provide liveRoomDataBean: LiveRoomDataBean = {} as LiveRoomDataBean 28 @Provide liveRoomDataBean: LiveRoomDataBean = {} as LiveRoomDataBean
29 @Provide isShowControl: boolean = false 29 @Provide isShowControl: boolean = false
30 @Provide displayDirection: DisplayDirection = DisplayDirection.VERTICAL //横竖屏,默认竖屏 30 @Provide displayDirection: DisplayDirection = DisplayDirection.VERTICAL //横竖屏,默认竖屏
@@ -53,14 +53,16 @@ export struct DetailPlayVLivePage { @@ -53,14 +53,16 @@ export struct DetailPlayVLivePage {
53 53
54 openFullScreen() { 54 openFullScreen() {
55 console.log(TAG, 'openFullScreen') 55 console.log(TAG, 'openFullScreen')
56 - WindowModel.shared.setWindowLayoutFullScreen(true)  
57 - WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) 56 + // WindowModel.shared.setWindowLayoutFullScreen(true)
  57 + // WindowModel.shared.setSpecificSystemBarEnabled()
  58 + // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
58 } 59 }
59 60
60 closeFullScreen() { 61 closeFullScreen() {
61 console.log(TAG, 'closeFullScreen') 62 console.log(TAG, 'closeFullScreen')
62 - WindowModel.shared.setWindowLayoutFullScreen(false)  
63 - WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) 63 + // WindowModel.shared.setWindowLayoutFullScreen(false)
  64 + // WindowModel.shared.setSpecificSystemBarEnabled(true)
  65 + // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
64 } 66 }
65 67
66 build() { 68 build() {
@@ -72,7 +74,6 @@ export struct DetailPlayVLivePage { @@ -72,7 +74,6 @@ export struct DetailPlayVLivePage {
72 .width('100%') 74 .width('100%')
73 .blur(100) 75 .blur(100)
74 .renderFit(RenderFit.RESIZE_COVER) 76 .renderFit(RenderFit.RESIZE_COVER)
75 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])  
76 // 直播结束且无回看 77 // 直播结束且无回看
77 if (this.liveState === 'end' && !this.playUrl) { 78 if (this.liveState === 'end' && !this.playUrl) {
78 PlayerEndView() 79 PlayerEndView()
@@ -101,9 +101,8 @@ export struct PlayUIComponent { @@ -101,9 +101,8 @@ export struct PlayUIComponent {
101 WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ? 101 WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
102 window.Orientation.PORTRAIT : 102 window.Orientation.PORTRAIT :
103 window.Orientation.LANDSCAPE_INVERTED) 103 window.Orientation.LANDSCAPE_INVERTED)
104 - // devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ?  
105 - // window.Orientation.PORTRAIT :  
106 - // window.Orientation.LANDSCAPE); 104 + WindowModel.shared.setSpecificSystemBarEnabled(true)
  105 +
107 }) 106 })
108 if (this.contentDetailData.liveInfo?.liveState != 'wait') { 107 if (this.contentDetailData.liveInfo?.liveState != 'wait') {
109 Text(this.contentDetailData.newsTitle) 108 Text(this.contentDetailData.newsTitle)
@@ -310,12 +309,14 @@ export struct PlayUIComponent { @@ -310,12 +309,14 @@ export struct PlayUIComponent {
310 this.displayDirection = 309 this.displayDirection =
311 this.displayDirection == DisplayDirection.VERTICAL ? DisplayDirection.VIDEO_HORIZONTAL : 310 this.displayDirection == DisplayDirection.VERTICAL ? DisplayDirection.VIDEO_HORIZONTAL :
312 DisplayDirection.VERTICAL 311 DisplayDirection.VERTICAL
  312 +
  313 + WindowModel.shared.setSpecificSystemBarEnabled(false)
  314 +
313 WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ? 315 WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
314 window.Orientation.PORTRAIT : 316 window.Orientation.PORTRAIT :
315 window.Orientation.LANDSCAPE_INVERTED) 317 window.Orientation.LANDSCAPE_INVERTED)
316 - // devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ?  
317 - // window.Orientation.PORTRAIT :  
318 - // window.Orientation.LANDSCAPE); 318 +
  319 +
319 }) 320 })
320 .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) 321 .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
321 } 322 }
@@ -178,7 +178,6 @@ export struct TopPlayComponent { @@ -178,7 +178,6 @@ export struct TopPlayComponent {
178 178
179 if (this.liveDetailPageLogic.showPad) { 179 if (this.liveDetailPageLogic.showPad) {
180 180
181 -  
182 } else { 181 } else {
183 // 视频资源播放 182 // 视频资源播放
184 WDPlayerRenderLiveView({ 183 WDPlayerRenderLiveView({
@@ -128,7 +128,7 @@ export struct PlayerCommentComponent { @@ -128,7 +128,7 @@ export struct PlayerCommentComponent {
128 } 128 }
129 }, 129 },
130 onBack: () => { 130 onBack: () => {
131 - WindowModel.shared.setWindowLayoutFullScreen(false) 131 + // WindowModel.shared.setWindowLayoutFullScreen(false)
132 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) 132 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
133 } 133 }
134 }) 134 })
@@ -5,7 +5,7 @@ import { SPHelper } from 'wdKit/Index'; @@ -5,7 +5,7 @@ import { SPHelper } from 'wdKit/Index';
5 import { SpConstants } from 'wdConstant/Index'; 5 import { SpConstants } from 'wdConstant/Index';
6 import { ButtonOptions, promptAction, window } from '@kit.ArkUI'; 6 import { ButtonOptions, promptAction, window } from '@kit.ArkUI';
7 import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index'; 7 import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index';
8 -import { ImageKnifeComponent } from '@ohos/imageknife'; 8 +import { ImageKnifeComponent,ScaleType } from '@ohos/imageknife';
9 9
10 @Entry 10 @Entry
11 @Component 11 @Component
@@ -13,6 +13,8 @@ struct LaunchInterestsHobbiesPage { @@ -13,6 +13,8 @@ struct LaunchInterestsHobbiesPage {
13 @State message: string = 'Hello World' 13 @State message: string = 'Hello World'
14 @State selectCount: number = 0 14 @State selectCount: number = 0
15 @State interestsArray: InterestsList[] = [] 15 @State interestsArray: InterestsList[] = []
  16 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
  17 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
16 18
17 aboutToAppear(){ 19 aboutToAppear(){
18 //请求接口,获取兴趣偏好数据 20 //请求接口,获取兴趣偏好数据
@@ -39,6 +41,7 @@ struct LaunchInterestsHobbiesPage { @@ -39,6 +41,7 @@ struct LaunchInterestsHobbiesPage {
39 this.trackingLaunchJumpOver(false) 41 this.trackingLaunchJumpOver(false)
40 }) 42 })
41 } 43 }
  44 + .margin({top:px2vp(this.topSafeHeight)})
42 .width('100%') 45 .width('100%')
43 .justifyContent(FlexAlign.End) 46 .justifyContent(FlexAlign.End)
44 47
@@ -62,7 +65,7 @@ struct LaunchInterestsHobbiesPage { @@ -62,7 +65,7 @@ struct LaunchInterestsHobbiesPage {
62 ForEach(this.interestsArray,(item:InterestsList,index:number)=>{ 65 ForEach(this.interestsArray,(item:InterestsList,index:number)=>{
63 GridItem(){ 66 GridItem(){
64 Stack({alignContent:Alignment.TopStart}){ 67 Stack({alignContent:Alignment.TopStart}){
65 - ImageKnifeComponent({imageKnifeOption:{loadSrc:item.pic}}) 68 + ImageKnifeComponent({imageKnifeOption:{loadSrc:item.pic,mainScaleType:ScaleType.FIT_XY}})
66 .width('100%') 69 .width('100%')
67 .height('100%') 70 .height('100%')
68 .backgroundColor(Color.White) 71 .backgroundColor(Color.White)
@@ -98,7 +101,7 @@ struct LaunchInterestsHobbiesPage { @@ -98,7 +101,7 @@ struct LaunchInterestsHobbiesPage {
98 Image(item.choose ? $r('app.media.interestsSelected') : $r('app.media.interestsSelectNot')) 101 Image(item.choose ? $r('app.media.interestsSelected') : $r('app.media.interestsSelectNot'))
99 .height('32lpx') 102 .height('32lpx')
100 .width('32lpx') 103 .width('32lpx')
101 - .margin({top:'80lpx',left:'110lpx'}) 104 + .margin({top:'80lpx',left:'120lpx'})
102 105
103 }.justifyContent(FlexAlign.Start) 106 }.justifyContent(FlexAlign.Start)
104 } 107 }
@@ -118,8 +121,7 @@ struct LaunchInterestsHobbiesPage { @@ -118,8 +121,7 @@ struct LaunchInterestsHobbiesPage {
118 }) 121 })
119 } 122 }
120 .width('90%') 123 .width('90%')
121 - // .height('70%')  
122 - .margin({top:'61lpx',bottom:'240lpx'}) 124 + .margin({top:'61lpx',bottom:'300lpx'})
123 .columnsTemplate('1fr 1fr 1fr') 125 .columnsTemplate('1fr 1fr 1fr')
124 .columnsGap('23lpx') 126 .columnsGap('23lpx')
125 .rowsGap('23lpx') 127 .rowsGap('23lpx')
@@ -129,7 +131,7 @@ struct LaunchInterestsHobbiesPage { @@ -129,7 +131,7 @@ struct LaunchInterestsHobbiesPage {
129 .height('100%') 131 .height('100%')
130 } 132 }
131 .width('100%') 133 .width('100%')
132 - .height(`calc(100% - ${108 + 'lpx'})`) 134 + .height(`calc(100% - ${158 + 'lpx'})`)
133 // .backgroundColor(Color.Red) 135 // .backgroundColor(Color.Red)
134 136
135 Stack({alignContent:Alignment.Center}){ 137 Stack({alignContent:Alignment.Center}){