Showing
4 changed files
with
6 additions
and
17 deletions
| @@ -276,8 +276,7 @@ export class ProcessUtils { | @@ -276,8 +276,7 @@ export class ProcessUtils { | ||
| 276 | relType: content?.relType, | 276 | relType: content?.relType, |
| 277 | relId: content?.relId, | 277 | relId: content?.relId, |
| 278 | sourcePage: '5', | 278 | sourcePage: '5', |
| 279 | - commentId: content?.commentInfo?.commentId, | ||
| 280 | - rmhPlatform:content?.rmhPlatform | 279 | + commentId: content?.commentInfo?.commentId |
| 281 | } as ExtraDTO, | 280 | } as ExtraDTO, |
| 282 | targetLayout: content.customParamTargetLayout | 281 | targetLayout: content.customParamTargetLayout |
| 283 | } as Params, | 282 | } as Params, |
| @@ -437,8 +436,7 @@ export class ProcessUtils { | @@ -437,8 +436,7 @@ export class ProcessUtils { | ||
| 437 | relId: content?.relId, | 436 | relId: content?.relId, |
| 438 | channelId: content?.channelId, | 437 | channelId: content?.channelId, |
| 439 | sourcePage: '5', | 438 | sourcePage: '5', |
| 440 | - commentId: content?.commentInfo?.commentId, | ||
| 441 | - rmhPlatform: content?.rmhPlatform | 439 | + commentId: content?.commentInfo?.commentId |
| 442 | } as ExtraDTO, | 440 | } as ExtraDTO, |
| 443 | targetLayout: content.customParamTargetLayout, | 441 | targetLayout: content.customParamTargetLayout, |
| 444 | } as Params, | 442 | } as Params, |
| @@ -99,7 +99,6 @@ export struct DynamicDetailComponent { | @@ -99,7 +99,6 @@ export struct DynamicDetailComponent { | ||
| 99 | pageParam: ParamType = {} | 99 | pageParam: ParamType = {} |
| 100 | commentListAreaInfo?: Area | 100 | commentListAreaInfo?: Area |
| 101 | lastTimeoutId?: number | 101 | lastTimeoutId?: number |
| 102 | - @State pageRmhPlatform: number = 0; | ||
| 103 | 102 | ||
| 104 | // @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | 103 | // @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 |
| 105 | @Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | 104 | @Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 |
| @@ -108,7 +107,6 @@ export struct DynamicDetailComponent { | @@ -108,7 +107,6 @@ export struct DynamicDetailComponent { | ||
| 108 | // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | 107 | // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 |
| 109 | this.likesStyle = this.contentDetailData.likesStyle | 108 | this.likesStyle = this.contentDetailData.likesStyle |
| 110 | this.openLikes = this.contentDetailData.openLikes == 1 ? true : false | 109 | this.openLikes = this.contentDetailData.openLikes == 1 ? true : false |
| 111 | - this.pageRmhPlatform = this.action.params?.extra?.rmhPlatform || 2; | ||
| 112 | 110 | ||
| 113 | //注册通知,来自别的组件的评论成功通知 | 111 | //注册通知,来自别的组件的评论成功通知 |
| 114 | EmitterUtils.receiveEvent(EmitterEventId.COMMENT_PUBLISH, (targetId?: string) => { | 112 | EmitterUtils.receiveEvent(EmitterEventId.COMMENT_PUBLISH, (targetId?: string) => { |
| @@ -700,7 +698,7 @@ export struct DynamicDetailComponent { | @@ -700,7 +698,7 @@ export struct DynamicDetailComponent { | ||
| 700 | @Builder topNav() { | 698 | @Builder topNav() { |
| 701 | //logo、日期 | 699 | //logo、日期 |
| 702 | Row() { | 700 | Row() { |
| 703 | - if (this.pageRmhPlatform == 1) { // 人民号 | 701 | + if (this.contentDetailData.rmhPlatform == 1) { // 人民号 |
| 704 | if (this.contentDetailData?.rmhInfo?.userType == "5") { // 内容源账号 | 702 | if (this.contentDetailData?.rmhInfo?.userType == "5") { // 内容源账号 |
| 705 | Blank().height(1) | 703 | Blank().height(1) |
| 706 | } else { | 704 | } else { |
| @@ -709,7 +707,7 @@ export struct DynamicDetailComponent { | @@ -709,7 +707,7 @@ export struct DynamicDetailComponent { | ||
| 709 | .height($r('app.float.margin_28')) | 707 | .height($r('app.float.margin_28')) |
| 710 | .margin({ left: $r('app.float.margin_16') }) | 708 | .margin({ left: $r('app.float.margin_16') }) |
| 711 | } | 709 | } |
| 712 | - } else if (this.pageRmhPlatform == 2) { // 普通用户 | 710 | + } else if (this.contentDetailData.rmhPlatform == 2) { // 普通用户 |
| 713 | Blank().height(1) | 711 | Blank().height(1) |
| 714 | } else { | 712 | } else { |
| 715 | Image($r('app.media.logo_rmrb')) | 713 | Image($r('app.media.logo_rmrb')) |
| @@ -799,7 +797,6 @@ export struct DynamicDetailComponent { | @@ -799,7 +797,6 @@ export struct DynamicDetailComponent { | ||
| 799 | let data = await MultiPictureDetailViewModel.getDetailData(relId, contentId, relType) | 797 | let data = await MultiPictureDetailViewModel.getDetailData(relId, contentId, relType) |
| 800 | this.isPageEnd = true; | 798 | this.isPageEnd = true; |
| 801 | this.contentDetailData = data[0]; | 799 | this.contentDetailData = data[0]; |
| 802 | - this.pageRmhPlatform = this.contentDetailData.rmhPlatform | ||
| 803 | let dateTime = | 800 | let dateTime = |
| 804 | DateTimeUtils.parseDate(this.contentDetailData?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN); | 801 | DateTimeUtils.parseDate(this.contentDetailData?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN); |
| 805 | let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN) | 802 | let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN) |
| @@ -77,8 +77,6 @@ export struct ImageAndTextPageComponent { | @@ -77,8 +77,6 @@ export struct ImageAndTextPageComponent { | ||
| 77 | lastTimeoutId?: number | 77 | lastTimeoutId?: number |
| 78 | @State needAnimation: boolean = false; | 78 | @State needAnimation: boolean = false; |
| 79 | 79 | ||
| 80 | - @State pageRmhPlatform: number = 0; | ||
| 81 | - | ||
| 82 | @State @Watch("webPageIsPageEnd") isPageEnd: boolean = false | 80 | @State @Watch("webPageIsPageEnd") isPageEnd: boolean = false |
| 83 | @Consume @Watch('pageShowForUpdateData') pageShow :number | 81 | @Consume @Watch('pageShowForUpdateData') pageShow :number |
| 84 | @Consume @Watch('pageHideForUpdateData') pageHide :number | 82 | @Consume @Watch('pageHideForUpdateData') pageHide :number |
| @@ -275,13 +273,13 @@ export struct ImageAndTextPageComponent { | @@ -275,13 +273,13 @@ export struct ImageAndTextPageComponent { | ||
| 275 | Column() { | 273 | Column() { |
| 276 | Row() { | 274 | Row() { |
| 277 | if (this.isNetConnected && !this.detailContentEmpty) { | 275 | if (this.isNetConnected && !this.detailContentEmpty) { |
| 278 | - if (this.pageRmhPlatform == 1) { // 人民号 | 276 | + if (this.contentDetailData.rmhPlatform == 1) { // 人民号 |
| 279 | if (this.contentDetailData?.rmhInfo?.userType == "5") { // 内容源账号 | 277 | if (this.contentDetailData?.rmhInfo?.userType == "5") { // 内容源账号 |
| 280 | Blank().height(1) | 278 | Blank().height(1) |
| 281 | } else { | 279 | } else { |
| 282 | Image($r('app.media.logo_rmh')).width(80) .height(28) | 280 | Image($r('app.media.logo_rmh')).width(80) .height(28) |
| 283 | } | 281 | } |
| 284 | - } else if (this.pageRmhPlatform == 2) { // 普通用户 | 282 | + } else if (this.contentDetailData.rmhPlatform == 2) { // 普通用户 |
| 285 | Blank().height(1) | 283 | Blank().height(1) |
| 286 | } else { | 284 | } else { |
| 287 | Image($r('app.media.logo_rmrb')).width(80) .height(28) | 285 | Image($r('app.media.logo_rmrb')).width(80) .height(28) |
| @@ -354,7 +352,6 @@ export struct ImageAndTextPageComponent { | @@ -354,7 +352,6 @@ export struct ImageAndTextPageComponent { | ||
| 354 | } | 352 | } |
| 355 | if (detailBeans && detailBeans.length > 0) { | 353 | if (detailBeans && detailBeans.length > 0) { |
| 356 | this.contentDetailData = detailBeans[0]; | 354 | this.contentDetailData = detailBeans[0]; |
| 357 | - this.pageRmhPlatform = this.contentDetailData.rmhPlatform | ||
| 358 | let dateTime = | 355 | let dateTime = |
| 359 | DateTimeUtils.parseDate(this.contentDetailData?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN); | 356 | DateTimeUtils.parseDate(this.contentDetailData?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN); |
| 360 | let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN) | 357 | let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN) |
| @@ -521,8 +518,6 @@ export struct ImageAndTextPageComponent { | @@ -521,8 +518,6 @@ export struct ImageAndTextPageComponent { | ||
| 521 | 518 | ||
| 522 | aboutToAppear() { | 519 | aboutToAppear() { |
| 523 | // Logger.debug(TAG, '文章详情页 aboutToAppear,开始请求接口数据'); | 520 | // Logger.debug(TAG, '文章详情页 aboutToAppear,开始请求接口数据'); |
| 524 | - this.pageRmhPlatform = this.action.params?.extra?.rmhPlatform || 2; | ||
| 525 | - | ||
| 526 | this.getDetail() | 521 | this.getDetail() |
| 527 | this.screenHeight = DisplayUtils.getDeviceHeight() | 522 | this.screenHeight = DisplayUtils.getDeviceHeight() |
| 528 | this.initAnimationConfig(); | 523 | this.initAnimationConfig(); |
-
Please register or login to post a comment