daijian_wd

fix: 解决收藏bug

... ... @@ -23,6 +23,7 @@ export struct SpacialTopicPageComponent {
private webPrepared = false;
private dataPrepared = false;
@State publishCommentModel: publishCommentModel = new publishCommentModel()
@State operationButtonList: string[] = ['comment', 'collect', 'share']
private trySendData2H5() {
if (!this.webPrepared || !this.dataPrepared) {
... ... @@ -63,7 +64,7 @@ export struct SpacialTopicPageComponent {
let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType)
if (detailBeans && detailBeans.length > 0) {
this.contentDetailData = detailBeans;
if (this.contentDetailData[0]?.openComment) {
// 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
... ... @@ -71,7 +72,7 @@ export struct SpacialTopicPageComponent {
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()
}
}
... ... @@ -98,7 +99,8 @@ export struct SpacialTopicPageComponent {
//底部交互区
OperRowListView({
contentDetailData: this.contentDetailData[0],
publishCommentModel: this.publishCommentModel
publishCommentModel: this.publishCommentModel,
operationButtonList: this.operationButtonList,
})
}
}.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT)
... ...
... ... @@ -184,8 +184,7 @@ export struct OperRowListView {
builderCollect() {
Column() {
Stack({ alignContent: Alignment.TopEnd }) {
Image(this.newsStatusOfUser?.collectStatus == 1 ? $r('app.media.ic_collect_check') :
$r('app.media.iv_live_comment_collect_un'))
Image(this.newsStatusOfUser?.collectStatus == 1 ? $r('app.media.ic_collect_check1') : $r('app.media.iv_live_comment_collect_un'))
.width(24)
.height(24)
.interpolation(ImageInterpolation.High)
... ...