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
王士厅
2024-06-07 17:27:39 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bb2a1a3e2aad19eb053fb010755788ae0f7f119b
bb2a1a3e
1 parent
8da7aa93
图文、动态详情页点赞,返回重新进入文章详情页,未展示已点赞状态。
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 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/DynamicDetailComponent.ets
View file @
bb2a1a3
...
...
@@ -648,7 +648,7 @@ export struct DynamicDetailComponent {
{
contentId: this.contentDetailData?.newsId + '',
contentType: this.contentDetailData?.newsType + '',
contentRelId: this.contentDetailData?.reLInfo?.relId + '',
contentRelId: this.contentDetailData?.reLInfo?.relId
|| ''
+ '',
}
]
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
bb2a1a3
...
...
@@ -95,7 +95,7 @@ export struct ImageAndTextPageComponent {
if (this.contentDetailData?.openLikes && this.contentDetailData?.likesStyle !== 4) {
Row() {
Row() {
if (this.newsStatusOfUser?.likeStatus ==
=
'1') {
if (this.newsStatusOfUser?.likeStatus == '1') {
Image(this.contentDetailData?.likesStyle === 1 ? $r('app.media.ic_like_check') :
(this.contentDetailData?.likesStyle === 2 ? $r('app.media.icon_prayer_active') :
$r('app.media.icon_candle_active')))
...
...
@@ -112,7 +112,7 @@ export struct ImageAndTextPageComponent {
if (this.likeNum > 0) {
Text(NumberFormatterUtils.formatNumberWithWan(this.likeNum))
.fontSize(16)
.fontColor(this.newsStatusOfUser?.likeStatus ==
=
'1' ? '#ED2800' : '#999999')
.fontColor(this.newsStatusOfUser?.likeStatus == '1' ? '#ED2800' : '#999999')
.fontWeight(500)
.margin({ left: 5 })
}
...
...
@@ -343,7 +343,7 @@ export struct ImageAndTextPageComponent {
{
contentId: this.contentDetailData?.newsId + '',
contentType: this.contentDetailData?.newsType + '',
contentRelId: this.contentDetailData?.reLInfo?.relId + '',
contentRelId: this.contentDetailData?.reLInfo?.relId
|| ''
+ '',
}
]
}
...
...
@@ -367,7 +367,7 @@ export struct ImageAndTextPageComponent {
return
}
const params: postExecuteLikeParams = {
status: this.newsStatusOfUser?.likeStatus ==
=
'1' ? '0' : '1',
status: this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1',
contentId: this.contentDetailData?.newsId + '',
contentType: this.contentDetailData?.newsType + '',
}
...
...
@@ -375,7 +375,7 @@ export struct ImageAndTextPageComponent {
console.log(TAG, '点赞、取消点赞', 'toggleLikeStatus==',)
if (this.newsStatusOfUser) {
//内容点赞、取消点赞Tracking 1点赞 0取消点赞
TrackingContent.like(this.newsStatusOfUser?.likeStatus ==
=
'1', TrackConstants.PageName.My, TrackConstants.PageName.My)
TrackingContent.like(this.newsStatusOfUser?.likeStatus == '1', TrackConstants.PageName.My, TrackConstants.PageName.My)
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1'
this.queryContentInteractCount()
}
...
...
@@ -395,6 +395,7 @@ export struct ImageAndTextPageComponent {
}]
}
PageRepository.getContentInteract(params).then(res => {
console.error(TAG, 'res', JSON.stringify(res))
if (res.data) {
this.interactData = res.data[0]
this.likeNum = Number(res.data[0]?.likeNum) || 0
...
...
Please
register
or
login
to post a comment