Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yuzhilin
2024-04-28 18:30:19 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0ce1ad5aa28ffa7e49ef9e3ea18471ea27b71589
0ce1ad5a
1 parent
b5d50c94
fix:专题页互动组件必传值
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletions
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
View file @
0ce1ad5
...
...
@@ -7,6 +7,7 @@ import { detailedSkeleton } from './skeleton/detailSkeleton'
import { NativeCallH5Type } from 'wdWebComponent/src/main/ets/pages/NativeCallH5Type';
import { OperRowListView } from './view/OperRowListView';
import DetailViewModel from '../viewmodel/DetailViewModel';
import { publishCommentModel } from '../components/comment/model/PublishCommentModel';
const TAG: string = 'SpacialTopicPageComponent'
...
...
@@ -21,6 +22,7 @@ export struct SpacialTopicPageComponent {
private h5ReceiveAppData: H5ReceiveDetailBean = { dataSource: '2' } as H5ReceiveDetailBean
private webPrepared = false;
private dataPrepared = false;
@State publishCommentModel: publishCommentModel = new publishCommentModel()
private trySendData2H5() {
if (!this.webPrepared || !this.dataPrepared) {
...
...
@@ -61,6 +63,15 @@ export struct SpacialTopicPageComponent {
let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType)
if (detailBeans && detailBeans.length > 0) {
this.contentDetailData = detailBeans;
if (this.contentDetailData[0]?.openComment) {
this.publishCommentModel.targetId = String(this.contentDetailData[0]?.newsId || '')
this.publishCommentModel.targetRelId = String(this.contentDetailData[0]?.reLInfo?.relId)
this.publishCommentModel.targetTitle = this.contentDetailData[0]?.newsTitle
this.publishCommentModel.targetRelType = String(this.contentDetailData[0]?.reLInfo?.relType)
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData[0]?.reLInfo?.relObjectId)
this.publishCommentModel.keyArticle = String(this.contentDetailData[0]?.keyArticle)
this.publishCommentModel.targetType = String(this.contentDetailData[0]?.newsType)
}
this.trySendData2H5()
}
}
...
...
@@ -86,7 +97,9 @@ export struct SpacialTopicPageComponent {
detailedSkeleton()
}
//底部交互区
OperRowListView({ contentDetailData: this.contentDetailData[0] })
OperRowListView({ contentDetailData: this.contentDetailData[0],
publishCommentModel: this.publishCommentModel
})
}
}.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT)
}
...
...
Please
register
or
login
to post a comment