wangliang_wd

feat:优化直播详情页转屏

... ... @@ -276,7 +276,8 @@ export class ProcessUtils {
relType: content?.relType,
relId: content?.relId,
sourcePage: '5',
commentId: content?.commentInfo?.commentId
commentId: content?.commentInfo?.commentId,
rmhPlatform:content?.rmhPlatform
} as ExtraDTO,
targetLayout: content.customParamTargetLayout
} as Params,
... ... @@ -436,7 +437,8 @@ export class ProcessUtils {
relId: content?.relId,
channelId: content?.channelId,
sourcePage: '5',
commentId: content?.commentInfo?.commentId
commentId: content?.commentInfo?.commentId,
rmhPlatform:content?.rmhPlatform
} as ExtraDTO,
targetLayout: content.customParamTargetLayout,
} as Params,
... ...
... ... @@ -21,4 +21,5 @@ export interface ExtraDTO extends ItemDTO {
extra?:string
title: string
showComment?:boolean
rmhPlatform?: number
}
\ No newline at end of file
... ...
... ... @@ -99,6 +99,7 @@ export struct DynamicDetailComponent {
pageParam: ParamType = {}
commentListAreaInfo?: Area
lastTimeoutId?: number
@State pageRmhPlatform: number = 0;
// @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
... ... @@ -107,6 +108,7 @@ export struct DynamicDetailComponent {
// 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
this.likesStyle = this.contentDetailData.likesStyle
this.openLikes = this.contentDetailData.openLikes == 1 ? true : false
this.pageRmhPlatform = this.action.params?.extra?.rmhPlatform || 2;
//注册通知,来自别的组件的评论成功通知
EmitterUtils.receiveEvent(EmitterEventId.COMMENT_PUBLISH, (targetId?: string) => {
... ... @@ -698,7 +700,7 @@ export struct DynamicDetailComponent {
@Builder topNav() {
//logo、日期
Row() {
if (this.contentDetailData.rmhPlatform == 1) { // 人民号
if (this.pageRmhPlatform == 1) { // 人民号
if (this.contentDetailData?.rmhInfo?.userType == "5") { // 内容源账号
Blank().height(1)
} else {
... ... @@ -707,7 +709,7 @@ export struct DynamicDetailComponent {
.height($r('app.float.margin_28'))
.margin({ left: $r('app.float.margin_16') })
}
} else if (this.contentDetailData.rmhPlatform == 2) { // 普通用户
} else if (this.pageRmhPlatform == 2) { // 普通用户
Blank().height(1)
} else {
Image($r('app.media.logo_rmrb'))
... ... @@ -797,6 +799,7 @@ export struct DynamicDetailComponent {
let data = await MultiPictureDetailViewModel.getDetailData(relId, contentId, relType)
this.isPageEnd = true;
this.contentDetailData = data[0];
this.pageRmhPlatform = this.contentDetailData.rmhPlatform
let dateTime =
DateTimeUtils.parseDate(this.contentDetailData?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN);
let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN)
... ...
... ... @@ -76,6 +76,7 @@ export struct ImageAndTextPageComponent {
pageHideTime:number = 0;
lastTimeoutId?: number
@State needAnimation: boolean = false;
@State pageRmhPlatform: number = 0;
@State @Watch("webPageIsPageEnd") isPageEnd: boolean = false
@Consume @Watch('pageShowForUpdateData') pageShow :number
... ... @@ -273,13 +274,13 @@ export struct ImageAndTextPageComponent {
Column() {
Row() {
if (this.isNetConnected && !this.detailContentEmpty) {
if (this.contentDetailData.rmhPlatform == 1) { // 人民号
if (this.pageRmhPlatform == 1) { // 人民号
if (this.contentDetailData?.rmhInfo?.userType == "5") { // 内容源账号
Blank().height(1)
} else {
Image($r('app.media.logo_rmh')).width(80) .height(28)
}
} else if (this.contentDetailData.rmhPlatform == 2) { // 普通用户
} else if (this.pageRmhPlatform == 2) { // 普通用户
Blank().height(1)
} else {
Image($r('app.media.logo_rmrb')).width(80) .height(28)
... ... @@ -352,6 +353,8 @@ export struct ImageAndTextPageComponent {
}
if (detailBeans && detailBeans.length > 0) {
this.contentDetailData = detailBeans[0];
this.pageRmhPlatform = this.contentDetailData.rmhPlatform
let dateTime =
DateTimeUtils.parseDate(this.contentDetailData?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN);
let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN)
... ... @@ -518,6 +521,7 @@ export struct ImageAndTextPageComponent {
aboutToAppear() {
// Logger.debug(TAG, '文章详情页 aboutToAppear,开始请求接口数据');
this.pageRmhPlatform = this.action.params?.extra?.rmhPlatform || 2;
this.getDetail()
this.screenHeight = DisplayUtils.getDeviceHeight()
this.initAnimationConfig();
... ...
... ... @@ -461,11 +461,16 @@ export struct PlayUIComponent {
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE).then(()=>{
WindowModel.shared.setSpecificSystemBarEnabled(true)
EmitterUtils.sendEvent(EmitterEventId.live_FULL_SCREEN, 0)
})
let timer = setTimeout(() => {
EmitterUtils.sendEvent(EmitterEventId.live_half_SCREEN, 0)
EmitterUtils.sendEvent(EmitterEventId.live_FULL_SCREEN, 0)
clearTimeout(timer)
}, 100)
let timer1 = setTimeout(() => {
EmitterUtils.sendEvent(EmitterEventId.live_half_SCREEN, 0)
clearTimeout(timer1)
}, 200)
}
}
\ No newline at end of file
... ...