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
xugenyuan
2024-05-15 17:09:46 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c25005713d73788a884f711575e3eefd7605c4f3
c2500571
1 parent
f126b612
ref |> 解决内容稿件无法评论问题
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
52 deletions
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MultiPictureDetailPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/CommentComponentPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
View file @
c250057
...
...
@@ -70,6 +70,7 @@ export struct DynamicDetailComponent {
@State isPageEnd: boolean = false
@State publishCommentModel: publishCommentModel = new publishCommentModel()
@State reachEndIncreament: number = 0
@State operationButtonList: string[] = []
async aboutToAppear() {
await this.getContentDetailData()
...
...
@@ -532,15 +533,7 @@ export struct DynamicDetailComponent {
if (this.contentDetailData?.openComment) {
Divider().strokeWidth(6).color('#f5f5f5').margin({ top: $r('app.float.margin_24') })
CommentComponent({
publishCommentModel: {
targetId: String(this.contentDetailData?.newsId || ''),
targetRelId: this.contentDetailData?.reLInfo?.relId,
targetTitle: this.contentDetailData?.newsTitle,
targetRelType: this.contentDetailData?.reLInfo?.relType,
targetRelObjectId: String(this.contentDetailData?.reLInfo?.relObjectId),
keyArticle: String(this.contentDetailData?.keyArticle),
targetType: String(this.contentDetailData?.newsType),
} as publishCommentModel
publishCommentModel: this.publishCommentModel
})
}
Blank().layoutWeight(1)
...
...
@@ -557,7 +550,7 @@ export struct DynamicDetailComponent {
OperRowListView({
contentDetailData: this.contentDetailData,
publishCommentModel: this.publishCommentModel,
operationButtonList:
['comment', 'collect', 'share']
,
operationButtonList:
this.operationButtonList
,
styleType: 1,
})
...
...
@@ -574,13 +567,6 @@ export struct DynamicDetailComponent {
* */
private async getContentDetailData() {
this.isNetConnected = NetworkUtil.isNetConnected()
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType)
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
try {
let data = await MultiPictureDetailViewModel.getDetailData(this.relId, this.contentId, this.relType)
this.isPageEnd = true;
...
...
@@ -590,6 +576,20 @@ export struct DynamicDetailComponent {
let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN)
this.publishTime = DateTimeUtils.removeTrailingZeros(_publishTime)
console.log('动态详情', JSON.stringify(this.contentDetailData))
if (this.contentDetailData?.openComment) {
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '')
this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
}
this.operationButtonList = ['comment', 'collect', 'share']
} catch (exception) {
console.log('请求失败', JSON.stringify(exception))
this.isPageEnd = true;
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
c250057
...
...
@@ -234,13 +234,13 @@ export struct ImageAndTextPageComponent {
}
if (this.contentDetailData?.openComment) {
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId
|| ''
)
this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType)
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
}
if (this.contentDetailData?.openAudio && this.contentDetailData?.audioList?.length &&
this.contentDetailData?.audioList[0].audioUrl) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MultiPictureDetailPageComponent.ets
View file @
c250057
...
...
@@ -445,13 +445,13 @@ export struct MultiPictureDetailPageComponent {
// }
if (this.contentDetailData?.openComment) {
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId
|| ''
)
this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType)
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
}
// this.contentDetailData.photoList = []
if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length === 0) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
View file @
c250057
...
...
@@ -72,13 +72,13 @@ export struct SpacialTopicPageComponent {
this.contentDetailData = detailBeans[0];
// if (this.contentDetailData[0]?.openComment) {
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId
|| ''
)
this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType)
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
// }
this.trySendData2H5()
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
View file @
c250057
...
...
@@ -64,13 +64,13 @@ export struct DetailPlayLiveCommon {
// if (this.contentDetailData.openComment === 1) {
console.log(TAG, '查询视频详情用于评论展示 openComment:', this.contentDetailData.openComment)
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId
|| ''
)
this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType)
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
this.publishCommentModel.commentContent = ''
// }
}
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
c250057
...
...
@@ -166,12 +166,13 @@ export struct DetailPlayShortVideoPage {
this.queryNewsInfoOfUser()
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId
|| ''
)
this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType)
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
this.publishCommentModel.commentContent = ''
}
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/CommentComponentPage.ets
View file @
c250057
...
...
@@ -17,13 +17,13 @@ export struct CommentComponentPage {
aboutToAppear(): void {
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId
|| ''
)
this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType)
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
}
build() {
...
...
Please
register
or
login
to post a comment