王士厅

fix: 折叠屏--直播预告稿件详情页面,上方展示的大图被过度拉近,导致直播的文字信息展示不完整

... ... @@ -2,8 +2,8 @@
"app": {
"bundleName": "com.peopledailychina.hosactivity",
"vendor": "$string:app_vendor",
"versionCode": 7393,
"versionName": "7.3.9.3",
"versionCode": 7394,
"versionName": "7.3.9.4",
"icon": "$media:app_icon",
"label": "$string:app_name"
}
... ...
import { ContentDetailDTO, LiveRoomItemBean } from 'wdBean/Index';
import { Logger, StringUtils } from 'wdKit/Index';
import { Logger, StringUtils, WindowModel } from 'wdKit/Index';
import { PlayerConstants, WDAliPlayerController, WDPlayerRenderLiveView } from 'wdPlayer/Index';
import { PlayUIComponent } from './PlayUIComponent';
import { PictureLoading } from '../../vertical/PictureLoading';
... ... @@ -7,6 +7,7 @@ import { TrackConstants } from 'wdTracking/Index';
import { LiveDetailPageLogic } from '../../../viewModel/LiveDetailPageLogic';
import { LiveEmptyComponent, WDLiveViewDefaultType } from 'wdComponent/Index';
import { LiveMessageOptType } from 'wdBean/src/main/ets/bean/live/LiveRoomBean';
import { window } from '@kit.ArkUI';
const TAG: string = 'TopPlayComponent'
... ... @@ -42,6 +43,11 @@ export struct TopPlayComponent {
@Prop @Watch("liveIMControlMessageChange") lastLiveControl: LiveRoomItemBean = {} as LiveRoomItemBean // IM 控制消息
///是否是手动点击暂停,手动暂停的,页面重新出现时,不自动恢复播放
manualClickPauseOrPlay: boolean = false
private windowClass?: window.Window
private screenWidth: number = 0
@State isZDP: boolean = false // 是否折叠屏 默认false
@State windowWidth: number = AppStorage.get<number>('windowWidth') || 0
pageShowChange() {
if (this.manualClickPauseOrPlay) {
return
... ... @@ -81,6 +87,21 @@ export struct TopPlayComponent {
}
}
this.updateData()
this.windowClass = WindowModel.shared.getWindowClass(); // 获取应用主窗口
this.screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width
console.log('ENewspaperPageComponent this.screenWidth', this.screenWidth)
// 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件
this.isZDP = this.screenWidth > 2000 ? true : false
this.resizeWindow()
}
resizeWindow() {
this.windowClass?.on('windowSizeChange', () => {
this.screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width || this.windowWidth
// 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件
this.isZDP = this.screenWidth > 2000 ? true : false
});
}
/**
... ... @@ -242,13 +263,14 @@ export struct TopPlayComponent {
} else {
// 直播房间图
Image(this.previewUrl)
.objectFit(ImageFit.Cover)
.objectFit(this.isZDP ? ImageFit.Contain : ImageFit.Fill)
.alt($r('app.media.live_room_image_fail'))
.visibility(this.isWait || this.isEnd ? Visibility.Visible :
Visibility.None)// .contrast(this.isEnd ? 0.4 : 1)
.blur(this.isEnd ? 20 : 0)
.width('100%')
if (this.liveDetailPageLogic.showPad) {
// 有垫片
if (this.liveDetailPageLogic.padImageUri.length > 0) {
... ...