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-26 18:40:46 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5c0d3b38df79a420fa9d5ddafa6cf75f5b219fdf
5c0d3b38
1 parent
8e01a6fe
feat H5详情接入评论列表
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
5c0d3b3
...
...
@@ -20,6 +20,8 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel';
import { PageRepository } from '../repository/PageRepository';
import { detailedSkeleton } from './skeleton/detailSkeleton';
import { publishCommentModel } from '../components/comment/model/PublishCommentModel';
import { CommentComponent } from '../components/comment/view/CommentComponent'
const PATTERN_DATE_CN_RN: string = 'yyyy年MM月dd日 HH:mm';
...
...
@@ -36,6 +38,7 @@ export struct ImageAndTextPageComponent {
@State interactData: InteractDataDTO = {} as InteractDataDTO
@State isPageEnd: boolean = false
@State publishTime: string = ''
@State publishCommentModel: publishCommentModel = {} as publishCommentModel
build() {
Column() {
...
...
@@ -90,7 +93,7 @@ export struct ImageAndTextPageComponent {
.height(24)
.margin({ right: 5 })
}
if
(this.interactData?.likeNum !== '0')
{
if
(this.interactData?.likeNum !== '0')
{
Text(`${this.interactData?.likeNum}`)
.fontSize(16)
.fontColor(this.newsStatusOfUser?.likeStatus === '1' ? '#ED2800' : '#999999')
...
...
@@ -112,17 +115,17 @@ export struct ImageAndTextPageComponent {
}.width(CommonConstants.FULL_WIDTH).height(80)
.justifyContent(FlexAlign.Center)
Divider().strokeWidth(6).color('#f5f5f5')
}
if (this.recommendList.length > 0) {
Divider().strokeWidth(6).color('#f5f5f5')
RecommendList({ recommendList: this.recommendList })
}
// 评论
if(this.contentDetailData[0]?.openComment){
// CommentComponent({
//
// })
if (this.contentDetailData[0]?.openComment) {
Divider().strokeWidth(6).color('#f5f5f5')
CommentComponent({
publishCommentModel: this.publishCommentModel
})
}
}
}
...
...
@@ -139,7 +142,7 @@ export struct ImageAndTextPageComponent {
//底部交互区
if (this.contentDetailData?.length) {
OperRowListView({
contentDetailData: this.contentDetailData[0]
})
OperRowListView({
contentDetailData: this.contentDetailData[0]
})
}
}
...
...
@@ -177,6 +180,17 @@ export struct ImageAndTextPageComponent {
this.getInteractDataStatus()
this.queryContentInteractCount()
}
if (this.contentDetailData[0]?.openComment) {
this.publishCommentModel = {
targetId: String(this.contentDetailData[0]?.newsId || ''),
targetRelId: this.contentDetailData[0]?.reLInfo?.relId,
targetTitle: this.contentDetailData[0]?.newsTitle,
targetRelType: this.contentDetailData[0]?.reLInfo?.relType,
targetRelObjectId: String(this.contentDetailData[0]?.reLInfo?.relObjectId),
keyArticle: String(this.contentDetailData[0]?.keyArticle),
targetType: String(this.contentDetailData[0]?.newsType),
} as publishCommentModel
}
}
}
}
...
...
Please
register
or
login
to post a comment