Showing
3 changed files
with
33 additions
and
29 deletions
| @@ -71,40 +71,44 @@ export struct PageComponent { | @@ -71,40 +71,44 @@ export struct PageComponent { | ||
| 71 | @Builder | 71 | @Builder |
| 72 | ListLayout() { | 72 | ListLayout() { |
| 73 | List() { | 73 | List() { |
| 74 | - // 下拉刷新 | ||
| 75 | - ListItem() { | ||
| 76 | - RefreshLayout({ | ||
| 77 | - refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullDown, this.pageModel.pullDownRefreshImage, | ||
| 78 | - this.pageModel.pullDownRefreshText, this.pageModel.pullDownRefreshHeight) | ||
| 79 | - }) | 74 | + if (this.name !== '视频') { |
| 75 | + // 下拉刷新 | ||
| 76 | + ListItem() { | ||
| 77 | + RefreshLayout({ | ||
| 78 | + refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullDown, this.pageModel.pullDownRefreshImage, | ||
| 79 | + this.pageModel.pullDownRefreshText, this.pageModel.pullDownRefreshHeight) | ||
| 80 | + }) | ||
| 81 | + } | ||
| 80 | } | 82 | } |
| 81 | 83 | ||
| 82 | - LazyForEach(this.pageModel.compList, (compDTO: CompDTO, compIndex: number) => { | ||
| 83 | - ListItem() { | ||
| 84 | - Column() { | ||
| 85 | - if (this.name == '视频') { | ||
| 86 | - VideoChannelDetail() | ||
| 87 | - } else { | 84 | + if (this.name === '视频') { |
| 85 | + VideoChannelDetail() | ||
| 86 | + } else { | ||
| 87 | + LazyForEach(this.pageModel.compList, (compDTO: CompDTO, compIndex: number) => { | ||
| 88 | + ListItem() { | ||
| 89 | + Column() { | ||
| 88 | CompParser({ compDTO: compDTO, compIndex: compIndex }); | 90 | CompParser({ compDTO: compDTO, compIndex: compIndex }); |
| 89 | } | 91 | } |
| 90 | - | ||
| 91 | } | 92 | } |
| 92 | - } | ||
| 93 | - }, | ||
| 94 | - (compDTO: CompDTO, compIndex: number) => compDTO.id + compIndex.toString() + this.pageModel.timestamp | ||
| 95 | - ) | ||
| 96 | - | ||
| 97 | - // 加载更多 | ||
| 98 | - ListItem() { | ||
| 99 | - if (this.pageModel.hasMore) { | ||
| 100 | - LoadMoreLayout({ | ||
| 101 | - refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullUpLoad, this.pageModel.pullUpLoadImage, | ||
| 102 | - this.pageModel.pullUpLoadText, this.pageModel.pullUpLoadHeight) | ||
| 103 | - }) | ||
| 104 | - } else { | ||
| 105 | - NoMoreLayout() | 93 | + }, |
| 94 | + (compDTO: CompDTO, compIndex: number) => compDTO.id + compIndex.toString() + this.pageModel.timestamp | ||
| 95 | + ) | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + if (this.name !== '视频') { | ||
| 99 | + // 加载更多 | ||
| 100 | + ListItem() { | ||
| 101 | + if (this.pageModel.hasMore) { | ||
| 102 | + LoadMoreLayout({ | ||
| 103 | + refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullUpLoad, this.pageModel.pullUpLoadImage, | ||
| 104 | + this.pageModel.pullUpLoadText, this.pageModel.pullUpLoadHeight) | ||
| 105 | + }) | ||
| 106 | + } else { | ||
| 107 | + NoMoreLayout() | ||
| 108 | + } | ||
| 106 | } | 109 | } |
| 107 | } | 110 | } |
| 111 | + | ||
| 108 | } | 112 | } |
| 109 | .scrollBar(BarState.Off) | 113 | .scrollBar(BarState.Off) |
| 110 | .cachedCount(8) | 114 | .cachedCount(8) |
| @@ -37,7 +37,7 @@ export struct DetailPlayShortVideoPage { | @@ -37,7 +37,7 @@ export struct DetailPlayShortVideoPage { | ||
| 37 | if (this.currentIndex != this.index) { | 37 | if (this.currentIndex != this.index) { |
| 38 | this.playerController.pause() | 38 | this.playerController.pause() |
| 39 | 39 | ||
| 40 | - if (this.index < this.currentIndex - 5 && this.playerController.getPlayer()) { | 40 | + if (this.index < this.currentIndex - 3 && this.playerController.getPlayer()) { |
| 41 | this.playerController.release() | 41 | this.playerController.release() |
| 42 | } | 42 | } |
| 43 | 43 |
| @@ -147,7 +147,7 @@ export class WDPlayerController { | @@ -147,7 +147,7 @@ export class WDPlayerController { | ||
| 147 | if (this.avPlayer == null) { | 147 | if (this.avPlayer == null) { |
| 148 | return | 148 | return |
| 149 | } | 149 | } |
| 150 | - Logger.error("开始播放") | 150 | + Logger.error("开始播放", this.url) |
| 151 | this.avPlayer.url = this.url; | 151 | this.avPlayer.url = this.url; |
| 152 | } | 152 | } |
| 153 | 153 |
-
Please register or login to post a comment