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
daijian_wd
2024-04-26 17:34:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6776d747a5003aeb80c09b126f030d8a9af4d393
6776d747
1 parent
87840774
评论组件对接参数1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
View file @
6776d74
...
...
@@ -13,7 +13,10 @@ import router from '@ohos.router';
import inputMethod from '@ohos.inputMethod';
import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel';
import { LikeComponent } from './LikeComponent';
import { CommentCustomDialog } from '../comment/view/CommentCustomDialog';
import { CommentTabComponent, CommentIconComponent, } from '../comment/view/CommentTabComponent';
import { publishCommentModel } from '../comment/model/PublishCommentModel'
// import { CommentCustomDialog } from '../comment/view/CommentCustomDialog';
import { HttpUrlUtils } from 'wdNetwork/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { PageRepository } from '../../repository/PageRepository';
...
...
@@ -38,6 +41,7 @@ export struct OperRowListView {
@State interactData: InteractDataDTO = {} as InteractDataDTO
@State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态
@State likeBean: Record<string, string> = {}
@State publishCommentModel: publishCommentModel = new publishCommentModel()
@State operationList: OperationItem[] = [
{
...
...
@@ -81,13 +85,23 @@ export struct OperRowListView {
this.likeBean['channelId'] = this.contentDetailData.reLInfo?.channelId + ''
console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData))
console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean))
// 评论需要数据
this.publishCommentModel.targetId = this.contentDetailData.newsId + ''
this.publishCommentModel.targetRelId = this.contentDetailData.reLInfo?.relId + ''
this.publishCommentModel.targetTitle = this.contentDetailData.newsTitle + ''
this.publishCommentModel.targetRelType = this.contentDetailData.reLInfo?.relType + ''
this.publishCommentModel.targetRelObjectId = this.contentDetailData.reLInfo?.relObjectId + ''
this.publishCommentModel.keyArticle = this.contentDetailData.keyArticle + ''
this.publishCommentModel.targetType = this.contentDetailData.newsType + ''
this.publishCommentModel.totalCommentNumer = '10'
}
build() {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems:ItemAlign.Center }){
Row() {
Column() {
Image($r('app.media.icon_arrow_left_white'))
// Image($r('app.media.icon_arrow_left_white'))
Image($r('app.media.icon_arrow_left'))
.width(24)
.height(24)
.aspectRatio(1)
...
...
@@ -109,6 +123,10 @@ export struct OperRowListView {
/* CommentCustomDialog({
placeHolderText: '说两句'
})*/
if (this.publishCommentModel?.targetId) {
CommentTabComponent({publishCommentModel: this.publishCommentModel})
CommentIconComponent({publishCommentModel: this.publishCommentModel})
}
}
/*TextInput({placeholder:'说两句...'})
.placeholderColor('#999999')
...
...
@@ -140,7 +158,8 @@ export struct OperRowListView {
}
.width('100%')
.height(50)
.backgroundColor(Color.Black)
// .backgroundColor(Color.Black)
.backgroundColor(Color.White)
.margin({
bottom: 20
})
...
...
Please
register
or
login
to post a comment