王士厅

fix:人民日报早晚报内容后无法点赞-偶现

... ... @@ -6,6 +6,7 @@ import { HttpUrlUtils, WDHttp } from '../../../../Index';
import { RefreshTokenRes } from '../bean/RefreshTokenRes';
import { ResposeError } from '../bean/ResposeError';
import { HttpUtils } from '../utils/HttpUtils';
// import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
const TAG: string = 'HttpBizUtil'
... ...
... ... @@ -404,9 +404,17 @@ export struct ImageAndTextPageComponent {
if (this.newsStatusOfUser) {
//内容点赞、取消点赞Tracking 1点赞 0取消点赞
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1'
if (this.newsStatusOfUser.likeStatus === '1') {
this.likeNum = Number(this.likeNum) + 1
} else {
this.likeNum = Number(this.likeNum) - 1
}
console.log(TAG, '点赞newsStatusOfUser.likeStatus ', this.newsStatusOfUser.likeStatus)
this.queryContentInteractCount()
// this.queryContentInteractCount()
TrackingContent.like(this.newsStatusOfUser?.likeStatus == '1', TrackConstants.PageName.My, TrackConstants.PageName.My)
} else {
// 初次进入详情页偶现获取失败,重新获取newsStatusOfUser对象
this.getInteractDataStatus()
}
})
... ...
import { HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork';
import { HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork';
import { DateTimeUtils, EmitterEventId, EmitterUtils, Logger, SPHelper, StringUtils } from 'wdKit';
import {
... ... @@ -322,7 +322,7 @@ export class PageRepository {
*/
static postExecuteLike(params: postExecuteLikeParams): Promise<ResponseDTO> {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_EXECUTELIKE
return WDHttp.post(url, params)
return HttpBizUtil.post(url, params)
}
/**
... ... @@ -332,7 +332,7 @@ export class PageRepository {
*/
static postExecuteCollectRecord(params: postExecuteCollectRecordParams): Promise<ResponseDTO> {
let url = HttpUrlUtils.getExecuteCollcetUrl()
return WDHttp.post(url, params)
return HttpBizUtil.post(url, params)
}
/**
... ... @@ -364,7 +364,7 @@ export class PageRepository {
*/
private static postInteractAccentionOperateInfo(params: postInteractAccentionOperateParams): Promise<ResponseDTO> {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_ACCENTION_OPERATION
return WDHttp.post(url, params)
return HttpBizUtil.post(url, params)
}
/**
... ...