Showing
3 changed files
with
16 additions
and
2 deletions
| @@ -13,6 +13,7 @@ import font from '@ohos.font'; | @@ -13,6 +13,7 @@ import font from '@ohos.font'; | ||
| 13 | import { OperRowListView } from './view/OperRowListView'; | 13 | import { OperRowListView } from './view/OperRowListView'; |
| 14 | import { MultiPictureDetailItemComponent } from './MultiPictureDetailItemComponent'; | 14 | import { MultiPictureDetailItemComponent } from './MultiPictureDetailItemComponent'; |
| 15 | import { ImageDownloadComponent } from '../components/ImageDownloadComponent'; | 15 | import { ImageDownloadComponent } from '../components/ImageDownloadComponent'; |
| 16 | +import { publishCommentModel } from '../components/comment/model/PublishCommentModel'; | ||
| 16 | import { EmptyComponent } from './view/EmptyComponent'; | 17 | import { EmptyComponent } from './view/EmptyComponent'; |
| 17 | import { DateTimeUtils } from 'wdKit/Index'; | 18 | import { DateTimeUtils } from 'wdKit/Index'; |
| 18 | import { HttpUrlUtils } from 'wdNetwork/Index'; | 19 | import { HttpUrlUtils } from 'wdNetwork/Index'; |
| @@ -42,6 +43,7 @@ export struct MultiPictureDetailPageComponent { | @@ -42,6 +43,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 42 | private scroller: Scroller = new Scroller() | 43 | private scroller: Scroller = new Scroller() |
| 43 | @State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图 | 44 | @State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图 |
| 44 | @State showDownload: Boolean = false // 控制是否显示下载默认隐藏 | 45 | @State showDownload: Boolean = false // 控制是否显示下载默认隐藏 |
| 46 | + @State publishCommentModel: publishCommentModel = new publishCommentModel() | ||
| 45 | 47 | ||
| 46 | //watch监听页码回调 | 48 | //watch监听页码回调 |
| 47 | onCurrentPageNumUpdated(): void { | 49 | onCurrentPageNumUpdated(): void { |
| @@ -302,6 +304,7 @@ export struct MultiPictureDetailPageComponent { | @@ -302,6 +304,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 302 | } | 304 | } |
| 303 | OperRowListView({ | 305 | OperRowListView({ |
| 304 | contentDetailData: this.contentDetailData, | 306 | contentDetailData: this.contentDetailData, |
| 307 | + publishCommentModel: this.publishCommentModel, | ||
| 305 | }) | 308 | }) |
| 306 | .width('100%') | 309 | .width('100%') |
| 307 | .height(56) | 310 | .height(56) |
| @@ -369,6 +372,15 @@ export struct MultiPictureDetailPageComponent { | @@ -369,6 +372,15 @@ export struct MultiPictureDetailPageComponent { | ||
| 369 | statusBarContentColor: '#ffffff', | 372 | statusBarContentColor: '#ffffff', |
| 370 | }) | 373 | }) |
| 371 | } | 374 | } |
| 375 | + if (this.contentDetailData?.openComment) { | ||
| 376 | + this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '') | ||
| 377 | + this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId) | ||
| 378 | + this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle | ||
| 379 | + this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType) | ||
| 380 | + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId) | ||
| 381 | + this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle) | ||
| 382 | + this.publishCommentModel.targetType = String(this.contentDetailData?.newsType) | ||
| 383 | + } | ||
| 372 | // this.contentDetailData.photoList = [] | 384 | // this.contentDetailData.photoList = [] |
| 373 | if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length === 0) { | 385 | if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length === 0) { |
| 374 | // 暂无内容 | 386 | // 暂无内容 |
| @@ -16,6 +16,7 @@ import { LikeComponent } from './LikeComponent'; | @@ -16,6 +16,7 @@ import { LikeComponent } from './LikeComponent'; | ||
| 16 | import { CommentTabComponent, CommentIconComponent, } from '../comment/view/CommentTabComponent'; | 16 | import { CommentTabComponent, CommentIconComponent, } from '../comment/view/CommentTabComponent'; |
| 17 | import { publishCommentModel } from '../comment/model/PublishCommentModel' | 17 | import { publishCommentModel } from '../comment/model/PublishCommentModel' |
| 18 | // import { AudioBarView } from '../MorningEveningPaper/AudioBarView' | 18 | // import { AudioBarView } from '../MorningEveningPaper/AudioBarView' |
| 19 | +// import { AudioDialog } from '../../dialog/AudioDialog' | ||
| 19 | import { HttpUrlUtils } from 'wdNetwork/Index'; | 20 | import { HttpUrlUtils } from 'wdNetwork/Index'; |
| 20 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | 21 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; |
| 21 | import { PageRepository } from '../../repository/PageRepository'; | 22 | import { PageRepository } from '../../repository/PageRepository'; |
| @@ -41,7 +42,7 @@ const TAG = 'OperRowListView'; | @@ -41,7 +42,7 @@ const TAG = 'OperRowListView'; | ||
| 41 | @Component | 42 | @Component |
| 42 | export struct OperRowListView { | 43 | export struct OperRowListView { |
| 43 | @Prop contentDetailData: ContentDetailDTO // 稿件详情 | 44 | @Prop contentDetailData: ContentDetailDTO // 稿件详情 |
| 44 | - @Prop operationButtonList?: string[] = ['comment', 'collect', 'share'] // 组件展示条件 | 45 | + @State operationButtonList: string[] = ['comment', 'collect', 'share'] // 组件展示条件 |
| 45 | @ObjectLink publishCommentModel: publishCommentModel | 46 | @ObjectLink publishCommentModel: publishCommentModel |
| 46 | // @State contentDetailData: ContentDetailDTO = {} as ContentDetailDTO | 47 | // @State contentDetailData: ContentDetailDTO = {} as ContentDetailDTO |
| 47 | @State interactData: InteractDataDTO = {} as InteractDataDTO | 48 | @State interactData: InteractDataDTO = {} as InteractDataDTO |
| @@ -82,6 +83,7 @@ export struct OperRowListView { | @@ -82,6 +83,7 @@ export struct OperRowListView { | ||
| 82 | 83 | ||
| 83 | build() { | 84 | build() { |
| 84 | Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { | 85 | Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { |
| 86 | + // AudioDialog() | ||
| 85 | Row() { | 87 | Row() { |
| 86 | Column() { | 88 | Column() { |
| 87 | Image($r('app.media.icon_arrow_left')) | 89 | Image($r('app.media.icon_arrow_left')) |
-
Please register or login to post a comment