wangliang_wd

feat:优化个人刷新

... ... @@ -50,6 +50,7 @@ export struct HomePageBottomCommentComponent {
CustomPullToRefresh({
alldata:this.data_comment,
scroller:this.scroller,
hasMore:this.hasMore,
customList:()=>{
this.ListLayout()
},
... ... @@ -184,7 +185,7 @@ export struct HomePageBottomCommentComponent {
this.count = this.data_comment.totalCount()
this.commentNum = value.totalCount
if (this.data_comment.totalCount() < value.totalCount) {
if (value.pageNum === 1) {
this.curPageNum++
} else {
this.hasMore = false
... ... @@ -217,7 +218,7 @@ export struct HomePageBottomCommentComponent {
this.count = this.data_comment.totalCount()
this.commentNum = value.totalCount
if (this.data_comment.totalCount() < value.totalCount) {
if (value.pageNum === 1) {
this.curPageNum++
} else {
this.hasMore = false
... ...
... ... @@ -50,6 +50,7 @@ export struct OtherHomePageBottomCommentComponent {
CustomPullToRefresh({
alldata:this.data_comment,
scroller:this.scroller,
hasMore:this.hasMore,
customList:()=>{
this.ListLayout()
},
... ... @@ -69,6 +70,7 @@ export struct OtherHomePageBottomCommentComponent {
this.isLoading = true
//加载分页数据
this.getNewPageData()
if(resolve) resolve('刷新成功')
}
}
})
... ... @@ -108,6 +110,13 @@ export struct OtherHomePageBottomCommentComponent {
}
}
}
// .onReachEnd(()=>{
// if (!this.isLoading) {
// this.isLoading = true
// //加载分页数据
// this.getNewPageData()
// }
// })
.cachedCount(5)
.layoutWeight(1)
.scrollBar(BarState.Off)
... ... @@ -185,7 +194,7 @@ export struct OtherHomePageBottomCommentComponent {
this.count = this.data_comment.totalCount()
this.commentNum = value.totalCount
if (this.data_comment.totalCount() < value.totalCount) {
if (value.hasNext === 1) {
this.curPageNum++
} else {
this.hasMore = false
... ... @@ -214,7 +223,7 @@ export struct OtherHomePageBottomCommentComponent {
this.count = this.data_comment.totalCount()
this.commentNum = value.totalCount
if (this.data_comment.totalCount() < value.totalCount) {
if (value.hasNext === 1) {
this.curPageNum++
} else {
this.hasMore = false
... ...