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
wangliang_wd
2024-09-24 10:19:18 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
88aa5043cb56ca961bf933e4dcc8ef776d3c1e2b
88aa5043
1 parent
60e3302f
feat:调整用户后台下线时,点赞、收藏提示逻辑
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
88aa504
...
...
@@ -5,7 +5,8 @@ import {
EmitterUtils,
EmitterEventId,
NetworkUtil,
DisplayUtils
DisplayUtils,
ToastUtils
} from 'wdKit';
import {
Action,
...
...
@@ -439,6 +440,9 @@ export struct ImageAndTextPageComponent {
PageRepository.postExecuteLike(params).then(res => {
// console.log(TAG, '点赞、res', JSON.stringify(res))
// console.log(TAG, '点赞、取消点赞 this.newsStatusOfUser', JSON.stringify(this.newsStatusOfUser))
if (res.code != 0){
ToastUtils.showToast(res.message, 1000);
}else {
if (this.newsStatusOfUser) {
//内容点赞、取消点赞Tracking 1点赞 0取消点赞
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1'
...
...
@@ -454,7 +458,7 @@ export struct ImageAndTextPageComponent {
// 初次进入详情页偶现获取失败,重新获取newsStatusOfUser对象
this.getInteractDataStatus()
}
}
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
View file @
88aa504
import { NumberFormatterUtils, SPHelper } from 'wdKit';
import { NumberFormatterUtils, SPHelper
, ToastUtils
} from 'wdKit';
import promptAction from '@ohos.promptAction';
import {
batchLikeAndCollectParams,
...
...
@@ -526,6 +526,9 @@ export struct OperRowListView {
console.log(TAG, '收藏点击', JSON.stringify(params))
PageRepository.postExecuteCollectRecord(params).then(res => {
if (res.code != 0){
ToastUtils.showToast(res.message, 1000);
}else {
if (this.newsStatusOfUser) {
this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1
if (this.newsStatusOfUser.collectStatus === 1) {
...
...
@@ -536,6 +539,7 @@ export struct OperRowListView {
}
this.queryContentInteractCount()
}
}
console.log(TAG, '收藏点击 this.newsStatusOfUser', JSON.stringify(this.newsStatusOfUser))
})
...
...
Please
register
or
login
to post a comment