Showing
2 changed files
with
14 additions
and
4 deletions
| @@ -50,6 +50,7 @@ export struct HomePageBottomCommentComponent { | @@ -50,6 +50,7 @@ export struct HomePageBottomCommentComponent { | ||
| 50 | CustomPullToRefresh({ | 50 | CustomPullToRefresh({ |
| 51 | alldata:this.data_comment, | 51 | alldata:this.data_comment, |
| 52 | scroller:this.scroller, | 52 | scroller:this.scroller, |
| 53 | + hasMore:this.hasMore, | ||
| 53 | customList:()=>{ | 54 | customList:()=>{ |
| 54 | this.ListLayout() | 55 | this.ListLayout() |
| 55 | }, | 56 | }, |
| @@ -184,7 +185,7 @@ export struct HomePageBottomCommentComponent { | @@ -184,7 +185,7 @@ export struct HomePageBottomCommentComponent { | ||
| 184 | 185 | ||
| 185 | this.count = this.data_comment.totalCount() | 186 | this.count = this.data_comment.totalCount() |
| 186 | this.commentNum = value.totalCount | 187 | this.commentNum = value.totalCount |
| 187 | - if (this.data_comment.totalCount() < value.totalCount) { | 188 | + if (value.pageNum === 1) { |
| 188 | this.curPageNum++ | 189 | this.curPageNum++ |
| 189 | } else { | 190 | } else { |
| 190 | this.hasMore = false | 191 | this.hasMore = false |
| @@ -217,7 +218,7 @@ export struct HomePageBottomCommentComponent { | @@ -217,7 +218,7 @@ export struct HomePageBottomCommentComponent { | ||
| 217 | 218 | ||
| 218 | this.count = this.data_comment.totalCount() | 219 | this.count = this.data_comment.totalCount() |
| 219 | this.commentNum = value.totalCount | 220 | this.commentNum = value.totalCount |
| 220 | - if (this.data_comment.totalCount() < value.totalCount) { | 221 | + if (value.pageNum === 1) { |
| 221 | this.curPageNum++ | 222 | this.curPageNum++ |
| 222 | } else { | 223 | } else { |
| 223 | this.hasMore = false | 224 | this.hasMore = false |
| @@ -50,6 +50,7 @@ export struct OtherHomePageBottomCommentComponent { | @@ -50,6 +50,7 @@ export struct OtherHomePageBottomCommentComponent { | ||
| 50 | CustomPullToRefresh({ | 50 | CustomPullToRefresh({ |
| 51 | alldata:this.data_comment, | 51 | alldata:this.data_comment, |
| 52 | scroller:this.scroller, | 52 | scroller:this.scroller, |
| 53 | + hasMore:this.hasMore, | ||
| 53 | customList:()=>{ | 54 | customList:()=>{ |
| 54 | this.ListLayout() | 55 | this.ListLayout() |
| 55 | }, | 56 | }, |
| @@ -69,6 +70,7 @@ export struct OtherHomePageBottomCommentComponent { | @@ -69,6 +70,7 @@ export struct OtherHomePageBottomCommentComponent { | ||
| 69 | this.isLoading = true | 70 | this.isLoading = true |
| 70 | //加载分页数据 | 71 | //加载分页数据 |
| 71 | this.getNewPageData() | 72 | this.getNewPageData() |
| 73 | + if(resolve) resolve('刷新成功') | ||
| 72 | } | 74 | } |
| 73 | } | 75 | } |
| 74 | }) | 76 | }) |
| @@ -108,6 +110,13 @@ export struct OtherHomePageBottomCommentComponent { | @@ -108,6 +110,13 @@ export struct OtherHomePageBottomCommentComponent { | ||
| 108 | } | 110 | } |
| 109 | } | 111 | } |
| 110 | } | 112 | } |
| 113 | + // .onReachEnd(()=>{ | ||
| 114 | + // if (!this.isLoading) { | ||
| 115 | + // this.isLoading = true | ||
| 116 | + // //加载分页数据 | ||
| 117 | + // this.getNewPageData() | ||
| 118 | + // } | ||
| 119 | + // }) | ||
| 111 | .cachedCount(5) | 120 | .cachedCount(5) |
| 112 | .layoutWeight(1) | 121 | .layoutWeight(1) |
| 113 | .scrollBar(BarState.Off) | 122 | .scrollBar(BarState.Off) |
| @@ -185,7 +194,7 @@ export struct OtherHomePageBottomCommentComponent { | @@ -185,7 +194,7 @@ export struct OtherHomePageBottomCommentComponent { | ||
| 185 | 194 | ||
| 186 | this.count = this.data_comment.totalCount() | 195 | this.count = this.data_comment.totalCount() |
| 187 | this.commentNum = value.totalCount | 196 | this.commentNum = value.totalCount |
| 188 | - if (this.data_comment.totalCount() < value.totalCount) { | 197 | + if (value.hasNext === 1) { |
| 189 | this.curPageNum++ | 198 | this.curPageNum++ |
| 190 | } else { | 199 | } else { |
| 191 | this.hasMore = false | 200 | this.hasMore = false |
| @@ -214,7 +223,7 @@ export struct OtherHomePageBottomCommentComponent { | @@ -214,7 +223,7 @@ export struct OtherHomePageBottomCommentComponent { | ||
| 214 | 223 | ||
| 215 | this.count = this.data_comment.totalCount() | 224 | this.count = this.data_comment.totalCount() |
| 216 | this.commentNum = value.totalCount | 225 | this.commentNum = value.totalCount |
| 217 | - if (this.data_comment.totalCount() < value.totalCount) { | 226 | + if (value.hasNext === 1) { |
| 218 | this.curPageNum++ | 227 | this.curPageNum++ |
| 219 | } else { | 228 | } else { |
| 220 | this.hasMore = false | 229 | this.hasMore = false |
-
Please register or login to post a comment