Showing
2 changed files
with
26 additions
and
17 deletions
| @@ -48,19 +48,26 @@ export struct PeopleShipHomeArticleListComponent { | @@ -48,19 +48,26 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 48 | } else if (this.viewType == 2) { | 48 | } else if (this.viewType == 2) { |
| 49 | ErrorComponent() | 49 | ErrorComponent() |
| 50 | } else { | 50 | } else { |
| 51 | - this.ListLayout() | ||
| 52 | - // CustomPullToRefresh({ | ||
| 53 | - // alldata:this.arr, | ||
| 54 | - // scroller:this.scroller, | ||
| 55 | - // hasMore: false, | ||
| 56 | - // customList:()=>{ | ||
| 57 | - // this.ListLayout() | ||
| 58 | - // }, | ||
| 59 | - // onRefresh:(resolve)=>{ | ||
| 60 | - // this.currentPage = 1 | ||
| 61 | - // this.getPeopleShipPageArticleList(resolve) | ||
| 62 | - // }, | ||
| 63 | - // }) | 51 | + CustomPullToRefresh({ |
| 52 | + alldata:this.arr, | ||
| 53 | + scroller:this.scroller, | ||
| 54 | + hasMore:this.hasMore, | ||
| 55 | + customList:()=>{ | ||
| 56 | + this.ListLayout() | ||
| 57 | + }, | ||
| 58 | + onRefresh:(resolve)=>{ | ||
| 59 | + this.currentPage = 1 | ||
| 60 | + this.getPeopleShipPageArticleList(resolve) | ||
| 61 | + }, | ||
| 62 | + onLoadMore:(resolve)=> { | ||
| 63 | + if (this.hasMore === false) { | ||
| 64 | + if(resolve) resolve('') | ||
| 65 | + return | ||
| 66 | + } | ||
| 67 | + this.currentPage++ | ||
| 68 | + this.getPeopleShipPageArticleList(resolve) | ||
| 69 | + } | ||
| 70 | + }) | ||
| 64 | } | 71 | } |
| 65 | 72 | ||
| 66 | } | 73 | } |
| @@ -90,14 +97,16 @@ export struct PeopleShipHomeArticleListComponent { | @@ -90,14 +97,16 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 90 | 97 | ||
| 91 | // 加载更多 | 98 | // 加载更多 |
| 92 | ListItem() { | 99 | ListItem() { |
| 93 | - if (this.hasMore && this.arr && this.arr.length > 0) { | ||
| 94 | - LoadMoreLayout({ isVisible: this.hasMore }) | ||
| 95 | - } else if (!this.hasMore && !this.isLoading) { | 100 | + // if (this.hasMore && this.arr && this.arr.length > 0) { |
| 101 | + // LoadMoreLayout({ isVisible: this.hasMore }) | ||
| 102 | + // } else | ||
| 103 | + if (!this.hasMore && !this.isLoading) { | ||
| 96 | PeopleShipNoMoreData() | 104 | PeopleShipNoMoreData() |
| 97 | } | 105 | } |
| 98 | } | 106 | } |
| 99 | } | 107 | } |
| 100 | .cachedCount(4) | 108 | .cachedCount(4) |
| 109 | + .scrollBar(BarState.Off) | ||
| 101 | .backgroundColor(Color.Transparent) | 110 | .backgroundColor(Color.Transparent) |
| 102 | .width("100%") | 111 | .width("100%") |
| 103 | .height("100%") | 112 | .height("100%") |
| @@ -104,8 +104,8 @@ struct LaunchAdvertisingPage { | @@ -104,8 +104,8 @@ struct LaunchAdvertisingPage { | ||
| 104 | .margin({top:'10lpx',right:'19lpx'}) | 104 | .margin({top:'10lpx',right:'19lpx'}) |
| 105 | .backgroundColor('#80000000') | 105 | .backgroundColor('#80000000') |
| 106 | .onClick(() => { | 106 | .onClick(() => { |
| 107 | - this.enter() | ||
| 108 | this.trackingLaunchJumpOver() | 107 | this.trackingLaunchJumpOver() |
| 108 | + this.enter() | ||
| 109 | }).margin({right:16}) | 109 | }).margin({right:16}) |
| 110 | 110 | ||
| 111 | }.margin({top:50}).width('100%').height('56lpx') | 111 | }.margin({top:50}).width('100%').height('56lpx') |
-
Please register or login to post a comment