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-07-16 17:45:56 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4ce1feaa7e28021b4e0c39ae39f396c4dc602cd9
4ce1feaa
1 parent
3324b944
fix:人民日报早晚报内容后无法点赞-偶现
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
sight_harmony/commons/wdNetwork/src/main/ets/http/HttpBizUtil.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/repository/PageRepository.ets
sight_harmony/commons/wdNetwork/src/main/ets/http/HttpBizUtil.ets
View file @
4ce1fea
...
...
@@ -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'
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
4ce1fea
...
...
@@ -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()
}
})
...
...
sight_harmony/features/wdComponent/src/main/ets/repository/PageRepository.ets
View file @
4ce1fea
import { HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork';
import { Http
BizUtil, Http
UrlUtils, 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)
}
/**
...
...
Please
register
or
login
to post a comment