Showing
1 changed file
with
14 additions
and
1 deletions
| @@ -7,6 +7,7 @@ import { detailedSkeleton } from './skeleton/detailSkeleton' | @@ -7,6 +7,7 @@ import { detailedSkeleton } from './skeleton/detailSkeleton' | ||
| 7 | import { NativeCallH5Type } from 'wdWebComponent/src/main/ets/pages/NativeCallH5Type'; | 7 | import { NativeCallH5Type } from 'wdWebComponent/src/main/ets/pages/NativeCallH5Type'; |
| 8 | import { OperRowListView } from './view/OperRowListView'; | 8 | import { OperRowListView } from './view/OperRowListView'; |
| 9 | import DetailViewModel from '../viewmodel/DetailViewModel'; | 9 | import DetailViewModel from '../viewmodel/DetailViewModel'; |
| 10 | +import { publishCommentModel } from '../components/comment/model/PublishCommentModel'; | ||
| 10 | 11 | ||
| 11 | const TAG: string = 'SpacialTopicPageComponent' | 12 | const TAG: string = 'SpacialTopicPageComponent' |
| 12 | 13 | ||
| @@ -21,6 +22,7 @@ export struct SpacialTopicPageComponent { | @@ -21,6 +22,7 @@ export struct SpacialTopicPageComponent { | ||
| 21 | private h5ReceiveAppData: H5ReceiveDetailBean = { dataSource: '2' } as H5ReceiveDetailBean | 22 | private h5ReceiveAppData: H5ReceiveDetailBean = { dataSource: '2' } as H5ReceiveDetailBean |
| 22 | private webPrepared = false; | 23 | private webPrepared = false; |
| 23 | private dataPrepared = false; | 24 | private dataPrepared = false; |
| 25 | + @State publishCommentModel: publishCommentModel = new publishCommentModel() | ||
| 24 | 26 | ||
| 25 | private trySendData2H5() { | 27 | private trySendData2H5() { |
| 26 | if (!this.webPrepared || !this.dataPrepared) { | 28 | if (!this.webPrepared || !this.dataPrepared) { |
| @@ -61,6 +63,15 @@ export struct SpacialTopicPageComponent { | @@ -61,6 +63,15 @@ export struct SpacialTopicPageComponent { | ||
| 61 | let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) | 63 | let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) |
| 62 | if (detailBeans && detailBeans.length > 0) { | 64 | if (detailBeans && detailBeans.length > 0) { |
| 63 | this.contentDetailData = detailBeans; | 65 | this.contentDetailData = detailBeans; |
| 66 | + if (this.contentDetailData[0]?.openComment) { | ||
| 67 | + this.publishCommentModel.targetId = String(this.contentDetailData[0]?.newsId || '') | ||
| 68 | + this.publishCommentModel.targetRelId = String(this.contentDetailData[0]?.reLInfo?.relId) | ||
| 69 | + this.publishCommentModel.targetTitle = this.contentDetailData[0]?.newsTitle | ||
| 70 | + this.publishCommentModel.targetRelType = String(this.contentDetailData[0]?.reLInfo?.relType) | ||
| 71 | + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData[0]?.reLInfo?.relObjectId) | ||
| 72 | + this.publishCommentModel.keyArticle = String(this.contentDetailData[0]?.keyArticle) | ||
| 73 | + this.publishCommentModel.targetType = String(this.contentDetailData[0]?.newsType) | ||
| 74 | + } | ||
| 64 | this.trySendData2H5() | 75 | this.trySendData2H5() |
| 65 | } | 76 | } |
| 66 | } | 77 | } |
| @@ -86,7 +97,9 @@ export struct SpacialTopicPageComponent { | @@ -86,7 +97,9 @@ export struct SpacialTopicPageComponent { | ||
| 86 | detailedSkeleton() | 97 | detailedSkeleton() |
| 87 | } | 98 | } |
| 88 | //底部交互区 | 99 | //底部交互区 |
| 89 | - OperRowListView({ contentDetailData: this.contentDetailData[0] }) | 100 | + OperRowListView({ contentDetailData: this.contentDetailData[0], |
| 101 | + publishCommentModel: this.publishCommentModel | ||
| 102 | + }) | ||
| 90 | } | 103 | } |
| 91 | }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT) | 104 | }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT) |
| 92 | } | 105 | } |
-
Please register or login to post a comment