王士厅

cms发布的稿件点赞状态

... ... @@ -784,13 +784,13 @@ export struct DynamicDetailComponent {
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 + '',
}
ContentDetailRequest.postExecuteLike(params).then(res => {
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1'
if (this.newsStatusOfUser.likeStatus === '1') {
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1'
if (this.newsStatusOfUser.likeStatus == '1') {
this.interactDataDTO.likeNum = Number(this.interactDataDTO.likeNum) + 1
} else {
this.interactDataDTO.likeNum = Number(this.interactDataDTO.likeNum) - 1
... ... @@ -798,7 +798,7 @@ export struct DynamicDetailComponent {
console.log('点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactDataDTO?.likeNum)
//内容点赞、取消点赞Tracking 1点赞 0取消点赞
TrackingContent.like(this.newsStatusOfUser?.likeStatus === '1', TrackConstants.PageName.DynamicDetail, TrackConstants.PageName.DynamicDetail,
TrackingContent.like(this.newsStatusOfUser?.likeStatus == '1', TrackConstants.PageName.DynamicDetail, TrackConstants.PageName.DynamicDetail,
{
'contentType': `${this.contentDetailData.newsType}`,
'contentId': `${this.contentDetailData.newsId}`,
... ...
... ... @@ -373,8 +373,11 @@ export struct ImageAndTextPageComponent {
status: this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1',
contentId: this.contentDetailData?.newsId + '',
contentType: this.contentDetailData?.newsType + '',
contentRelId: this.contentDetailData?.reLInfo?.relId || '' + '',
}
console.log(TAG, '点赞、取消点赞params', JSON.stringify(params))
PageRepository.postExecuteLike(params).then(res => {
console.log(TAG, '点赞、res', JSON.stringify(res))
console.log(TAG, '点赞、取消点赞', 'toggleLikeStatus==',)
if (this.newsStatusOfUser) {
//内容点赞、取消点赞Tracking 1点赞 0取消点赞
... ...
... ... @@ -33,6 +33,7 @@ export interface recommentVideoListParams {
interface contentListItem {
contentId: string;
contentType: number;
contentRelId?:string
}
export interface contentListParams {
... ...