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