Showing
5 changed files
with
9 additions
and
5 deletions
| @@ -11,6 +11,7 @@ export struct CommentListDialogView { | @@ -11,6 +11,7 @@ export struct CommentListDialogView { | ||
| 11 | @Link @Watch('showCommentListChange') showCommentList: boolean | 11 | @Link @Watch('showCommentListChange') showCommentList: boolean |
| 12 | @Link contentDetailData: ContentDetailDTO // 详情页传 | 12 | @Link contentDetailData: ContentDetailDTO // 详情页传 |
| 13 | @Link pageInfo: PageInfoDTO // 专题页传 | 13 | @Link pageInfo: PageInfoDTO // 专题页传 |
| 14 | + @Link publishCommentModel: publishCommentModel | ||
| 14 | onClose?: () => void | 15 | onClose?: () => void |
| 15 | 16 | ||
| 16 | // @Consume pageId: TrackConstants.PageName | 17 | // @Consume pageId: TrackConstants.PageName |
| @@ -19,6 +20,7 @@ export struct CommentListDialogView { | @@ -19,6 +20,7 @@ export struct CommentListDialogView { | ||
| 19 | private dialogController: CustomDialogController = new CustomDialogController({ | 20 | private dialogController: CustomDialogController = new CustomDialogController({ |
| 20 | builder: CommentListDialog({ | 21 | builder: CommentListDialog({ |
| 21 | contentDetailData: this.contentDetailData, | 22 | contentDetailData: this.contentDetailData, |
| 23 | + publishCommentModel:this.publishCommentModel, | ||
| 22 | pageInfo: this.pageInfo, | 24 | pageInfo: this.pageInfo, |
| 23 | onClose: this.onClose | 25 | onClose: this.onClose |
| 24 | }), | 26 | }), |
| @@ -47,7 +49,7 @@ export struct CommentListDialogView { | @@ -47,7 +49,7 @@ export struct CommentListDialogView { | ||
| 47 | struct CommentListDialog { | 49 | struct CommentListDialog { |
| 48 | 50 | ||
| 49 | /// 内部使用 | 51 | /// 内部使用 |
| 50 | - @State private publishCommentModel: publishCommentModel = new publishCommentModel() | 52 | + @Link publishCommentModel: publishCommentModel |
| 51 | @State private operationButtonList: string[] = [] | 53 | @State private operationButtonList: string[] = [] |
| 52 | controller?: CustomDialogController | 54 | controller?: CustomDialogController |
| 53 | @State windowWidth: number = AppStorage.get<number>('windowWidth') || 0 | 55 | @State windowWidth: number = AppStorage.get<number>('windowWidth') || 0 |
| @@ -505,7 +505,7 @@ export struct OperRowListView { | @@ -505,7 +505,7 @@ export struct OperRowListView { | ||
| 505 | // 评论组件需要数据 | 505 | // 评论组件需要数据 |
| 506 | if (Number.parseInt(this.interactData.commentNum) > | 506 | if (Number.parseInt(this.interactData.commentNum) > |
| 507 | Number.parseInt(this.publishCommentModel.totalCommentNumer)) { | 507 | Number.parseInt(this.publishCommentModel.totalCommentNumer)) { |
| 508 | - this.publishCommentModel.totalCommentNumer = this.interactData.commentNum + '' || '0' | 508 | + this.publishCommentModel.totalCommentNumer = this.interactData.commentNum + '' |
| 509 | } | 509 | } |
| 510 | } | 510 | } |
| 511 | // console.log(TAG, '获取互动点赞等数据===', JSON.stringify(res)) | 511 | // console.log(TAG, '获取互动点赞等数据===', JSON.stringify(res)) |
| @@ -182,7 +182,7 @@ export struct DetailPlayShortVideoPage { | @@ -182,7 +182,7 @@ 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 | }) | 186 | }) |
| 187 | this.playerViewBuilder() | 187 | this.playerViewBuilder() |
| 188 | 188 |
| 1 | import { ContentDetailDTO, PageInfoDTO } from 'wdBean/Index' | 1 | import { ContentDetailDTO, PageInfoDTO } from 'wdBean/Index' |
| 2 | 2 | ||
| 3 | -import { CommentListDialogView } from 'wdComponent/Index' | 3 | +import { CommentListDialogView, publishCommentModel } from 'wdComponent/Index' |
| 4 | 4 | ||
| 5 | @Component | 5 | @Component |
| 6 | export struct CommentDialogView { | 6 | export struct CommentDialogView { |
| 7 | @Link @Watch('showCommentListChange') showCommentList: boolean | 7 | @Link @Watch('showCommentListChange') showCommentList: boolean |
| 8 | @Link index: number | 8 | @Link index: number |
| 9 | @Link currentIndex: number | 9 | @Link currentIndex: number |
| 10 | + @Link publishCommentModel: publishCommentModel | ||
| 10 | @Consume contentDetailData: ContentDetailDTO | 11 | @Consume contentDetailData: ContentDetailDTO |
| 11 | @State fakePageInfo: PageInfoDTO = {} as PageInfoDTO | 12 | @State fakePageInfo: PageInfoDTO = {} as PageInfoDTO |
| 12 | @State dialogOffsetY: number = 0 // (this.windowHeight - this.windowWidth * 9 / 16) | 13 | @State dialogOffsetY: number = 0 // (this.windowHeight - this.windowWidth * 9 / 16) |
| @@ -29,6 +30,7 @@ export struct CommentDialogView { | @@ -29,6 +30,7 @@ export struct CommentDialogView { | ||
| 29 | CommentListDialogView({ | 30 | CommentListDialogView({ |
| 30 | showCommentList: this.innerShowComment, | 31 | showCommentList: this.innerShowComment, |
| 31 | contentDetailData: this.contentDetailData, | 32 | contentDetailData: this.contentDetailData, |
| 33 | + publishCommentModel: this.publishCommentModel, | ||
| 32 | pageInfo: this.fakePageInfo, | 34 | pageInfo: this.fakePageInfo, |
| 33 | onClose: () => { | 35 | onClose: () => { |
| 34 | this.showCommentList = false | 36 | this.showCommentList = false |
| @@ -116,7 +116,7 @@ export struct MultiPictureDetailPageComponent { | @@ -116,7 +116,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 116 | index: $index, | 116 | index: $index, |
| 117 | currentIndex: $currentIndex, | 117 | currentIndex: $currentIndex, |
| 118 | showCommentList: $showCommentList, | 118 | showCommentList: $showCommentList, |
| 119 | - // publishCommentModel: $publishCommentModel | 119 | + publishCommentModel: $publishCommentModel |
| 120 | }) | 120 | }) |
| 121 | 121 | ||
| 122 | } | 122 | } |
-
Please register or login to post a comment