Showing
3 changed files
with
8 additions
and
4 deletions
| @@ -784,13 +784,13 @@ export struct DynamicDetailComponent { | @@ -784,13 +784,13 @@ export struct DynamicDetailComponent { | ||
| 784 | return | 784 | return |
| 785 | } | 785 | } |
| 786 | const params: postExecuteLikeParams = { | 786 | const params: postExecuteLikeParams = { |
| 787 | - status: this.newsStatusOfUser?.likeStatus === '1' ? 0 : 1, | 787 | + status: this.newsStatusOfUser?.likeStatus == '1' ? 0 : 1, |
| 788 | contentId: this.contentDetailData?.newsId + '', | 788 | contentId: this.contentDetailData?.newsId + '', |
| 789 | contentType: this.contentDetailData?.newsType + '', | 789 | contentType: this.contentDetailData?.newsType + '', |
| 790 | } | 790 | } |
| 791 | ContentDetailRequest.postExecuteLike(params).then(res => { | 791 | ContentDetailRequest.postExecuteLike(params).then(res => { |
| 792 | - this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1' | ||
| 793 | - if (this.newsStatusOfUser.likeStatus === '1') { | 792 | + this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1' |
| 793 | + if (this.newsStatusOfUser.likeStatus == '1') { | ||
| 794 | this.interactDataDTO.likeNum = Number(this.interactDataDTO.likeNum) + 1 | 794 | this.interactDataDTO.likeNum = Number(this.interactDataDTO.likeNum) + 1 |
| 795 | } else { | 795 | } else { |
| 796 | this.interactDataDTO.likeNum = Number(this.interactDataDTO.likeNum) - 1 | 796 | this.interactDataDTO.likeNum = Number(this.interactDataDTO.likeNum) - 1 |
| @@ -798,7 +798,7 @@ export struct DynamicDetailComponent { | @@ -798,7 +798,7 @@ export struct DynamicDetailComponent { | ||
| 798 | console.log('点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactDataDTO?.likeNum) | 798 | console.log('点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactDataDTO?.likeNum) |
| 799 | 799 | ||
| 800 | //内容点赞、取消点赞Tracking 1点赞 0取消点赞 | 800 | //内容点赞、取消点赞Tracking 1点赞 0取消点赞 |
| 801 | - TrackingContent.like(this.newsStatusOfUser?.likeStatus === '1', TrackConstants.PageName.DynamicDetail, TrackConstants.PageName.DynamicDetail, | 801 | + TrackingContent.like(this.newsStatusOfUser?.likeStatus == '1', TrackConstants.PageName.DynamicDetail, TrackConstants.PageName.DynamicDetail, |
| 802 | { | 802 | { |
| 803 | 'contentType': `${this.contentDetailData.newsType}`, | 803 | 'contentType': `${this.contentDetailData.newsType}`, |
| 804 | 'contentId': `${this.contentDetailData.newsId}`, | 804 | 'contentId': `${this.contentDetailData.newsId}`, |
| @@ -373,8 +373,11 @@ export struct ImageAndTextPageComponent { | @@ -373,8 +373,11 @@ export struct ImageAndTextPageComponent { | ||
| 373 | status: this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1', | 373 | status: this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1', |
| 374 | contentId: this.contentDetailData?.newsId + '', | 374 | contentId: this.contentDetailData?.newsId + '', |
| 375 | contentType: this.contentDetailData?.newsType + '', | 375 | contentType: this.contentDetailData?.newsType + '', |
| 376 | + contentRelId: this.contentDetailData?.reLInfo?.relId || '' + '', | ||
| 376 | } | 377 | } |
| 378 | + console.log(TAG, '点赞、取消点赞params', JSON.stringify(params)) | ||
| 377 | PageRepository.postExecuteLike(params).then(res => { | 379 | PageRepository.postExecuteLike(params).then(res => { |
| 380 | + console.log(TAG, '点赞、res', JSON.stringify(res)) | ||
| 378 | console.log(TAG, '点赞、取消点赞', 'toggleLikeStatus==',) | 381 | console.log(TAG, '点赞、取消点赞', 'toggleLikeStatus==',) |
| 379 | if (this.newsStatusOfUser) { | 382 | if (this.newsStatusOfUser) { |
| 380 | //内容点赞、取消点赞Tracking 1点赞 0取消点赞 | 383 | //内容点赞、取消点赞Tracking 1点赞 0取消点赞 |
| @@ -33,6 +33,7 @@ export interface recommentVideoListParams { | @@ -33,6 +33,7 @@ export interface recommentVideoListParams { | ||
| 33 | interface contentListItem { | 33 | interface contentListItem { |
| 34 | contentId: string; | 34 | contentId: string; |
| 35 | contentType: number; | 35 | contentType: number; |
| 36 | + contentRelId?:string | ||
| 36 | } | 37 | } |
| 37 | 38 | ||
| 38 | export interface contentListParams { | 39 | export interface contentListParams { |
-
Please register or login to post a comment