Showing
1 changed file
with
22 additions
and
3 deletions
| @@ -13,7 +13,10 @@ import router from '@ohos.router'; | @@ -13,7 +13,10 @@ import router from '@ohos.router'; | ||
| 13 | import inputMethod from '@ohos.inputMethod'; | 13 | import inputMethod from '@ohos.inputMethod'; |
| 14 | import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel'; | 14 | import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel'; |
| 15 | import { LikeComponent } from './LikeComponent'; | 15 | import { LikeComponent } from './LikeComponent'; |
| 16 | -import { CommentCustomDialog } from '../comment/view/CommentCustomDialog'; | 16 | +import { CommentTabComponent, CommentIconComponent, } from '../comment/view/CommentTabComponent'; |
| 17 | +import { publishCommentModel } from '../comment/model/PublishCommentModel' | ||
| 18 | + | ||
| 19 | +// import { CommentCustomDialog } from '../comment/view/CommentCustomDialog'; | ||
| 17 | import { HttpUrlUtils } from 'wdNetwork/Index'; | 20 | import { HttpUrlUtils } from 'wdNetwork/Index'; |
| 18 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | 21 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; |
| 19 | import { PageRepository } from '../../repository/PageRepository'; | 22 | import { PageRepository } from '../../repository/PageRepository'; |
| @@ -38,6 +41,7 @@ export struct OperRowListView { | @@ -38,6 +41,7 @@ export struct OperRowListView { | ||
| 38 | @State interactData: InteractDataDTO = {} as InteractDataDTO | 41 | @State interactData: InteractDataDTO = {} as InteractDataDTO |
| 39 | @State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态 | 42 | @State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态 |
| 40 | @State likeBean: Record<string, string> = {} | 43 | @State likeBean: Record<string, string> = {} |
| 44 | + @State publishCommentModel: publishCommentModel = new publishCommentModel() | ||
| 41 | 45 | ||
| 42 | @State operationList: OperationItem[] = [ | 46 | @State operationList: OperationItem[] = [ |
| 43 | { | 47 | { |
| @@ -81,13 +85,23 @@ export struct OperRowListView { | @@ -81,13 +85,23 @@ export struct OperRowListView { | ||
| 81 | this.likeBean['channelId'] = this.contentDetailData.reLInfo?.channelId + '' | 85 | this.likeBean['channelId'] = this.contentDetailData.reLInfo?.channelId + '' |
| 82 | console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData)) | 86 | console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData)) |
| 83 | console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean)) | 87 | console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean)) |
| 88 | + // 评论需要数据 | ||
| 89 | + this.publishCommentModel.targetId = this.contentDetailData.newsId + '' | ||
| 90 | + this.publishCommentModel.targetRelId = this.contentDetailData.reLInfo?.relId + '' | ||
| 91 | + this.publishCommentModel.targetTitle = this.contentDetailData.newsTitle + '' | ||
| 92 | + this.publishCommentModel.targetRelType = this.contentDetailData.reLInfo?.relType + '' | ||
| 93 | + this.publishCommentModel.targetRelObjectId = this.contentDetailData.reLInfo?.relObjectId + '' | ||
| 94 | + this.publishCommentModel.keyArticle = this.contentDetailData.keyArticle + '' | ||
| 95 | + this.publishCommentModel.targetType = this.contentDetailData.newsType + '' | ||
| 96 | + this.publishCommentModel.totalCommentNumer = '10' | ||
| 84 | } | 97 | } |
| 85 | 98 | ||
| 86 | build() { | 99 | build() { |
| 87 | Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems:ItemAlign.Center }){ | 100 | Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems:ItemAlign.Center }){ |
| 88 | Row() { | 101 | Row() { |
| 89 | Column() { | 102 | Column() { |
| 90 | - Image($r('app.media.icon_arrow_left_white')) | 103 | + // Image($r('app.media.icon_arrow_left_white')) |
| 104 | + Image($r('app.media.icon_arrow_left')) | ||
| 91 | .width(24) | 105 | .width(24) |
| 92 | .height(24) | 106 | .height(24) |
| 93 | .aspectRatio(1) | 107 | .aspectRatio(1) |
| @@ -109,6 +123,10 @@ export struct OperRowListView { | @@ -109,6 +123,10 @@ export struct OperRowListView { | ||
| 109 | /* CommentCustomDialog({ | 123 | /* CommentCustomDialog({ |
| 110 | placeHolderText: '说两句' | 124 | placeHolderText: '说两句' |
| 111 | })*/ | 125 | })*/ |
| 126 | + if (this.publishCommentModel?.targetId) { | ||
| 127 | + CommentTabComponent({publishCommentModel: this.publishCommentModel}) | ||
| 128 | + CommentIconComponent({publishCommentModel: this.publishCommentModel}) | ||
| 129 | + } | ||
| 112 | } | 130 | } |
| 113 | /*TextInput({placeholder:'说两句...'}) | 131 | /*TextInput({placeholder:'说两句...'}) |
| 114 | .placeholderColor('#999999') | 132 | .placeholderColor('#999999') |
| @@ -140,7 +158,8 @@ export struct OperRowListView { | @@ -140,7 +158,8 @@ export struct OperRowListView { | ||
| 140 | } | 158 | } |
| 141 | .width('100%') | 159 | .width('100%') |
| 142 | .height(50) | 160 | .height(50) |
| 143 | - .backgroundColor(Color.Black) | 161 | + // .backgroundColor(Color.Black) |
| 162 | + .backgroundColor(Color.White) | ||
| 144 | .margin({ | 163 | .margin({ |
| 145 | bottom: 20 | 164 | bottom: 20 |
| 146 | }) | 165 | }) |
-
Please register or login to post a comment