Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
wangliang_wd
2024-10-31 16:30:36 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ea65e9396458265bee1e4d7cd00a416f67378e12
ea65e939
1 parent
d1f4eee7
feat:优化动态详情页顶部logo显示
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
17 deletions
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
sight_harmony/features/wdBean/src/main/ets/bean/component/extra/ExtraDTO.ts
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
View file @
ea65e93
...
...
@@ -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,
...
...
sight_harmony/features/wdBean/src/main/ets/bean/component/extra/ExtraDTO.ts
View file @
ea65e93
...
...
@@ -21,5 +21,4 @@ export interface ExtraDTO extends ItemDTO {
extra
?:
string
title
:
string
showComment
?:
boolean
rmhPlatform
?:
number
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
View file @
ea65e93
...
...
@@ -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.
pageR
mhPlatform == 1) { // 人民号
if (this.
contentDetailData.r
mhPlatform == 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.
pageR
mhPlatform == 2) { // 普通用户
} else if (this.
contentDetailData.r
mhPlatform == 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)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
ea65e93
...
...
@@ -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.
pageR
mhPlatform == 1) { // 人民号
if (this.
contentDetailData.r
mhPlatform == 1) { // 人民号
if (this.contentDetailData?.rmhInfo?.userType == "5") { // 内容源账号
Blank().height(1)
} else {
Image($r('app.media.logo_rmh')).width(80) .height(28)
}
} else if (this.
pageR
mhPlatform == 2) { // 普通用户
} else if (this.
contentDetailData.r
mhPlatform == 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();
...
...
Please
register
or
login
to post a comment