wangliang_wd

feat:优化动态详情页顶部logo显示

... ... @@ -276,8 +276,7 @@ export class ProcessUtils {
relType: content?.relType,
relId: content?.relId,
sourcePage: '5',
commentId: content?.commentInfo?.commentId,
rmhPlatform:content?.rmhPlatform
commentId: content?.commentInfo?.commentId
} as ExtraDTO,
targetLayout: content.customParamTargetLayout
} as Params,
... ... @@ -437,8 +436,7 @@ export class ProcessUtils {
relId: content?.relId,
channelId: content?.channelId,
sourcePage: '5',
commentId: content?.commentInfo?.commentId,
rmhPlatform: content?.rmhPlatform
commentId: content?.commentInfo?.commentId
} as ExtraDTO,
targetLayout: content.customParamTargetLayout,
} as Params,
... ...
... ... @@ -21,5 +21,4 @@ export interface ExtraDTO extends ItemDTO {
extra?:string
title: string
showComment?:boolean
rmhPlatform?: number
}
\ No newline at end of file
... ...
... ... @@ -99,7 +99,6 @@ 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
... ... @@ -108,7 +107,6 @@ 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) => {
... ... @@ -700,7 +698,7 @@ export struct DynamicDetailComponent {
@Builder topNav() {
//logo、日期
Row() {
if (this.pageRmhPlatform == 1) { // 人民号
if (this.contentDetailData.rmhPlatform == 1) { // 人民号
if (this.contentDetailData?.rmhInfo?.userType == "5") { // 内容源账号
Blank().height(1)
} else {
... ... @@ -709,7 +707,7 @@ export struct DynamicDetailComponent {
.height($r('app.float.margin_28'))
.margin({ left: $r('app.float.margin_16') })
}
} else if (this.pageRmhPlatform == 2) { // 普通用户
} else if (this.contentDetailData.rmhPlatform == 2) { // 普通用户
Blank().height(1)
} else {
Image($r('app.media.logo_rmrb'))
... ... @@ -799,7 +797,6 @@ 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)
... ...
... ... @@ -77,8 +77,6 @@ export struct ImageAndTextPageComponent {
lastTimeoutId?: number
@State needAnimation: boolean = false;
@State pageRmhPlatform: number = 0;
@State @Watch("webPageIsPageEnd") isPageEnd: boolean = false
@Consume @Watch('pageShowForUpdateData') pageShow :number
@Consume @Watch('pageHideForUpdateData') pageHide :number
... ... @@ -275,13 +273,13 @@ export struct ImageAndTextPageComponent {
Column() {
Row() {
if (this.isNetConnected && !this.detailContentEmpty) {
if (this.pageRmhPlatform == 1) { // 人民号
if (this.contentDetailData.rmhPlatform == 1) { // 人民号
if (this.contentDetailData?.rmhInfo?.userType == "5") { // 内容源账号
Blank().height(1)
} else {
Image($r('app.media.logo_rmh')).width(80) .height(28)
}
} else if (this.pageRmhPlatform == 2) { // 普通用户
} else if (this.contentDetailData.rmhPlatform == 2) { // 普通用户
Blank().height(1)
} else {
Image($r('app.media.logo_rmrb')).width(80) .height(28)
... ... @@ -354,7 +352,6 @@ 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)
... ... @@ -521,8 +518,6 @@ export struct ImageAndTextPageComponent {
aboutToAppear() {
// Logger.debug(TAG, '文章详情页 aboutToAppear,开始请求接口数据');
this.pageRmhPlatform = this.action.params?.extra?.rmhPlatform || 2;
this.getDetail()
this.screenHeight = DisplayUtils.getDeviceHeight()
this.initAnimationConfig();
... ...