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
liyubing
2024-05-13 15:57:28 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
50330b2ef8918e6930e177a66a7ce5f2f21be873
50330b2e
2 parents
6c365128
33e7cb56
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
21 deletions
sight_harmony/features/wdBean/src/main/ets/bean/content/commentInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow06.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/LiveModel.ets
sight_harmony/features/wdBean/src/main/ets/bean/content/commentInfo.ets
View file @
50330b2
export interface commentInfo {
commentTitle: string,
newsTitle: string,
userName: string,
userHeaderUrl: string,
userId?: string,
userName?: string,
userHeaderUrl?: string,
publishTime: number,
commentId: string,
newsId: string,
relId: string;
relType: string;
userId: string;
newsType?: string
newsType?: string,
objectType?: string,
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow06.ets
View file @
50330b2
...
...
@@ -5,13 +5,10 @@ import { ProcessUtils } from 'wdRouter';
import { SpConstants } from 'wdConstant/Index'
import {
batchLikeAndCollectParams,
ContentDetailRequest,
contentListParams,
postExecuteCollectRecordParams,
postExecuteLikeParams,
postInteractAccentionOperateParams
} from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel';
import commentViewModel from '../../components/comment/viewmodel/CommentViewModel';
import { commentItemModel } from '../../components/comment/model/CommentModel'
/**
* 精选评论卡
...
...
@@ -40,13 +37,19 @@ export struct ZhSingleRow06 {
WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
return
}
const params: postExecuteLikeParams = {
status: this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1',
contentId: this.compDTO.operDataList[0]?.commentInfo?.newsId + '',
contentType: this.compDTO.operDataList[0]?.commentInfo?.newsType + '',
}
ContentDetailRequest.postExecuteLike(params).then(res => {
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1'
const commentInfo = this.compDTO.operDataList[0]?.commentInfo as commentInfo;
// commentLikeChange(this.item)
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser.likeStatus === '1' ? '0' : '1';
const commentLikeParam = {
targetId: commentInfo.newsId || '',
id: commentInfo.commentId,
targetType: commentInfo?.objectType || '',
api_status: this.newsStatusOfUser?.likeStatus == '1' ? false : true
} as commentItemModel;
commentViewModel.commentLike(commentLikeParam).then(() => {
}).catch(() => {
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser.likeStatus === '1' ? '0' : '1';
})
}
...
...
@@ -67,7 +70,7 @@ export struct ZhSingleRow06 {
]
}
let data = await MultiPictureDetailViewModel.getInteractDataStatus(params)
console.error
(TAG, 'ZhSingleRow06-data', JSON.stringify(data))
Logger.info
(TAG, 'ZhSingleRow06-data', JSON.stringify(data))
this.newsStatusOfUser = data[0];
Logger.info(TAG, `ZhSingleRow06-newsStatusOfUser:${JSON.stringify(this.newsStatusOfUser)}`)
} catch (exception) {
...
...
@@ -126,7 +129,7 @@ export struct ZhSingleRow06 {
.fontColor(0x999999)
Row(){
Image(
this.newsStatusOfUser?.likeStatus == '1'
? $r('app.media.icon_like_select') : $r('app.media.icon_like'))
Image(
Number(this.newsStatusOfUser?.likeStatus) == 1
? $r('app.media.icon_like_select') : $r('app.media.icon_like'))
.width(16)
.height(16)
.margin({right: 3})
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/LiveModel.ets
View file @
50330b2
...
...
@@ -49,9 +49,6 @@ export class LiveModel {
params['relationId'] = relationId
params['liveId'] = liveId
params['isSubscribe'] = `${isSubscribe}`
Logger.info('relationId', relationId)
Logger.info('liveId', liveId)
Logger.info('isSubscribe', typeof isSubscribe)
return new Promise<ResponseDTO<string>>((success, fail) => {
HttpRequest.post<ResponseDTO<string>>(
HttpUrlUtils.getLiveAppointmentUrl(),
...
...
Please
register
or
login
to post a comment