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
xugenyuan
2024-05-28 15:22:11 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
523c84995118e86607a44e3c6a1f3ce2b5a5d5b6
523c8499
1 parent
f2ceb574
ref |> 解决评论列表翻页新问题
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
View file @
523c849
...
...
@@ -260,7 +260,6 @@ export struct CommentComponent {
this.publishCommentModel.targetType)
.then(commentListModel => {
console.log('评论:', JSON.stringify(commentListModel.list))
this.currentPage++
if (Number.parseInt(commentListModel.totalCommentNum) >
Number.parseInt(this.publishCommentModel.totalCommentNumer)) {
...
...
@@ -279,7 +278,9 @@ export struct CommentComponent {
if (commentListModel && commentListModel.list && commentListModel.list.length > 0) {
this.allDatas.clearAllData() // 防止数据重复问题
if (this.currentPage == 1) {
this.allDatas.clearAllData() // 防止数据重复问题
}
commentListModel.list.forEach(element => {
element.hasMore = Number.parseInt(element.childCommentNum) ? true : false
let newModel = commentViewModel.deepCopyCommentItemModel(element)
...
...
@@ -293,6 +294,8 @@ export struct CommentComponent {
} else {
this.hasMore = false
}
this.currentPage++
if (!this.fixedHeightMode && this.reachEndLoadMoreFinish) {
this.reachEndLoadMoreFinish()
}
...
...
Please
register
or
login
to post a comment