Showing
5 changed files
with
18 additions
and
6 deletions
| @@ -38,7 +38,11 @@ export struct CommentListDialogView { | @@ -38,7 +38,11 @@ export struct CommentListDialogView { | ||
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | closeAction() { | 40 | closeAction() { |
| 41 | - this.showCommentList = false | 41 | + if (this.onClose) { |
| 42 | + this.onClose() | ||
| 43 | + } else { | ||
| 44 | + this.showCommentList = false | ||
| 45 | + } | ||
| 42 | } | 46 | } |
| 43 | 47 | ||
| 44 | build() { | 48 | build() { |
| @@ -182,7 +182,8 @@ export struct DetailPlayShortVideoPage { | @@ -182,7 +182,8 @@ export struct DetailPlayShortVideoPage { | ||
| 182 | index: $index, | 182 | index: $index, |
| 183 | currentIndex: $currentIndex, | 183 | currentIndex: $currentIndex, |
| 184 | showCommentList: $showCommentList, | 184 | showCommentList: $showCommentList, |
| 185 | - publishCommentModel: $publishCommentModel | 185 | + publishCommentModel: $publishCommentModel, |
| 186 | + interactData: $interactData, | ||
| 186 | }) | 187 | }) |
| 187 | this.playerViewBuilder() | 188 | this.playerViewBuilder() |
| 188 | 189 |
| 1 | -import { ContentDetailDTO, PageInfoDTO } from 'wdBean/Index' | 1 | +import { ContentDetailDTO, InteractDataDTO, PageInfoDTO } from 'wdBean/Index' |
| 2 | 2 | ||
| 3 | import { CommentListDialogView, publishCommentModel } from 'wdComponent/Index' | 3 | import { CommentListDialogView, publishCommentModel } from 'wdComponent/Index' |
| 4 | 4 | ||
| @@ -9,6 +9,7 @@ export struct CommentDialogView { | @@ -9,6 +9,7 @@ export struct CommentDialogView { | ||
| 9 | @Link currentIndex: number | 9 | @Link currentIndex: number |
| 10 | @Link publishCommentModel: publishCommentModel | 10 | @Link publishCommentModel: publishCommentModel |
| 11 | @Consume contentDetailData: ContentDetailDTO | 11 | @Consume contentDetailData: ContentDetailDTO |
| 12 | + @Link interactData: InteractDataDTO | ||
| 12 | @State fakePageInfo: PageInfoDTO = {} as PageInfoDTO | 13 | @State fakePageInfo: PageInfoDTO = {} as PageInfoDTO |
| 13 | @State dialogOffsetY: number = 0 // (this.windowHeight - this.windowWidth * 9 / 16) | 14 | @State dialogOffsetY: number = 0 // (this.windowHeight - this.windowWidth * 9 / 16) |
| 14 | 15 | ||
| @@ -34,6 +35,9 @@ export struct CommentDialogView { | @@ -34,6 +35,9 @@ export struct CommentDialogView { | ||
| 34 | pageInfo: this.fakePageInfo, | 35 | pageInfo: this.fakePageInfo, |
| 35 | onClose: () => { | 36 | onClose: () => { |
| 36 | this.showCommentList = false | 37 | this.showCommentList = false |
| 38 | + if (Number.parseInt(this.publishCommentModel.totalCommentNumer) > Number.parseInt(this.interactData.commentNum + "")) { | ||
| 39 | + this.interactData.commentNum = Number.parseInt(this.publishCommentModel.totalCommentNumer) | ||
| 40 | + } | ||
| 37 | } | 41 | } |
| 38 | }) | 42 | }) |
| 39 | } | 43 | } |
| @@ -387,7 +387,7 @@ export struct PlayerRightView { | @@ -387,7 +387,7 @@ export struct PlayerRightView { | ||
| 387 | .width(32) | 387 | .width(32) |
| 388 | .aspectRatio(1) | 388 | .aspectRatio(1) |
| 389 | 389 | ||
| 390 | - Text(this.transNum2String('commentNum') || '抢首评') | 390 | + Text(this.interactData.commentNum > 0 ? this.transNum2String('commentNum') : '抢首评') |
| 391 | .width('100%') | 391 | .width('100%') |
| 392 | .fontWeight(500) | 392 | .fontWeight(500) |
| 393 | .textAlign(TextAlign.Center) | 393 | .textAlign(TextAlign.Center) |
| @@ -6,7 +6,8 @@ import { | @@ -6,7 +6,8 @@ import { | ||
| 6 | postInteractBrowsOperateParams, | 6 | postInteractBrowsOperateParams, |
| 7 | postBatchAttentionStatusParams, | 7 | postBatchAttentionStatusParams, |
| 8 | postInteractAccentionOperateParams, | 8 | postInteractAccentionOperateParams, |
| 9 | - Params | 9 | + Params, |
| 10 | + InteractDataDTO | ||
| 10 | } from 'wdBean'; | 11 | } from 'wdBean'; |
| 11 | import display from '@ohos.display'; | 12 | import display from '@ohos.display'; |
| 12 | import { DateTimeUtils } from 'wdKit/Index'; | 13 | import { DateTimeUtils } from 'wdKit/Index'; |
| @@ -59,6 +60,7 @@ export struct MultiPictureDetailPageComponent { | @@ -59,6 +60,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 59 | @State operationButtonList: string[] = ['comment', 'like', 'collect', 'share'] | 60 | @State operationButtonList: string[] = ['comment', 'like', 'collect', 'share'] |
| 60 | @State currentOffset: number = 0 | 61 | @State currentOffset: number = 0 |
| 61 | @State duration: number = 0 | 62 | @State duration: number = 0 |
| 63 | + @Provide interactData: InteractDataDTO = {} as InteractDataDTO | ||
| 62 | pageParam: ParamType = {} | 64 | pageParam: ParamType = {} |
| 63 | followUserId: string = '' | 65 | followUserId: string = '' |
| 64 | followUserName: string = '' | 66 | followUserName: string = '' |
| @@ -116,7 +118,8 @@ export struct MultiPictureDetailPageComponent { | @@ -116,7 +118,8 @@ export struct MultiPictureDetailPageComponent { | ||
| 116 | index: $index, | 118 | index: $index, |
| 117 | currentIndex: $currentIndex, | 119 | currentIndex: $currentIndex, |
| 118 | showCommentList: $showCommentList, | 120 | showCommentList: $showCommentList, |
| 119 | - publishCommentModel: $publishCommentModel | 121 | + publishCommentModel: $publishCommentModel, |
| 122 | + interactData:$interactData | ||
| 120 | }) | 123 | }) |
| 121 | 124 | ||
| 122 | } | 125 | } |
-
Please register or login to post a comment