wangliang_wd

feat:优化点赞,评论判断逻辑

... ... @@ -159,11 +159,21 @@ export struct H5NewsWebPageComponent {
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
}
this.operationButtonList = []
if ( this.contentDetailData.openComment === 1) {
this.operationButtonList.push('comment')
}
if (this.contentDetailData.openLikes === 1) {
this.operationButtonList.push('like')
}
if (this.contentDetailData?.openAudio && this.contentDetailData?.audioList?.length &&
this.contentDetailData?.audioList[0].audioUrl) {
this.operationButtonList = ['comment', 'collect', 'listen', 'share']
} else {
this.operationButtonList = ['comment', 'collect', 'share']
this.operationButtonList.push('listen')
}
this.operationButtonList.push('collect')
if (this.contentDetailData.shareInfo?.shareOpen === 1) {
this.operationButtonList.push('share')
}
}
}
... ...
... ... @@ -325,7 +325,7 @@ export struct OperRowListView {
LikeComponent({
data: this.likeBean,
styleType: this.styleType,
componentType: this.componentType,
componentType: 5,
pageComponentType: this.pageComponentType
})
}
... ...