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
陈剑华
2024-05-20 17:01:42 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
63085e256f7335c4fc46d175663426718242c122
63085e25
2 parents
f1c059f0
d24ce08f
Merge remote-tracking branch 'origin/main'
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
7 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/BottomNavigationComponent.ets
sight_harmony/features/wdComponent/src/main/ets/utils/PullUpLoadMore.ets
sight_harmony/features/wdComponent/src/main/ets/utils/RefreshConstants.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageHelper.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdPlayer/src/main/ets/pages/WDPlayerRenderView.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/BottomNavigationComponent.ets
View file @
63085e2
...
...
@@ -98,6 +98,7 @@ export struct BottomNavigationComponent {
});
}
.zIndex(10)
.scrollable(false)
.animationDuration(0)
.barHeight($r('app.float.bottom_navigation_barHeight'))
...
...
@@ -132,6 +133,7 @@ export struct BottomNavigationComponent {
.fontColor(this.currentNavIndex === index ? navItem.nameCColor : navItem.nameColor)
.opacity(this.currentNavIndex === index ? this.FULL_OPACITY : this.SIXTY_OPACITY)
}
.zIndex(10)
.height($r('app.float.bottom_navigation_barHeight'))
.hoverEffect(HoverEffect.Highlight)
.onClick(() => {
...
...
sight_harmony/features/wdComponent/src/main/ets/utils/PullUpLoadMore.ets
View file @
63085e2
...
...
@@ -29,7 +29,7 @@ export function touchUpLoadMore(model: PageModel) {
if ((self.isCanLoadMore === true) && (self.hasMore === true) && (self.isLoading === false)) {
self.isLoading = true;
setTimeout(() => {
closeLoadMore(model);
//
closeLoadMore(model);
PageHelper.loadMore(self)
}, Const.DELAY_TIME);
} else {
...
...
sight_harmony/features/wdComponent/src/main/ets/utils/RefreshConstants.ets
View file @
63085e2
...
...
@@ -13,7 +13,7 @@ export class RefreshConstants {
/**
* The delay time.
*/
static readonly DELAY_TIME: number =
20
0;
static readonly DELAY_TIME: number =
5
0;
/**
* The animation duration.
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageHelper.ets
View file @
63085e2
...
...
@@ -14,6 +14,7 @@ import { BaseDTO } from 'wdBean/src/main/ets/bean/component/BaseDTO';
import { viewBlogInsightIntentShare, ActionMode } from '../utils/InsightIntentShare'
import { common } from '@kit.AbilityKit';
import { CacheData } from 'wdNetwork/Index';
import { closeLoadMore } from '../utils/PullUpLoadMore';
const TAG = 'PageHelper';
...
...
@@ -37,7 +38,7 @@ export class PageHelper {
if (!netStatus) {
ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
setTimeout(() => {
closeRefresh
(pageModel, false)
this.refreshUIEnd
(pageModel, false)
}, 500)
return
}
...
...
@@ -46,6 +47,10 @@ export class PageHelper {
this.getPageInfo(pageModel, pageAdvModel)
}
private refreshUIEnd(pageModel: PageModel, isRefreshSuccess: boolean) {
closeRefresh(pageModel, isRefreshSuccess)
}
/**
* 分页加载
*/
...
...
@@ -60,6 +65,10 @@ export class PageHelper {
this.compLoadMore(pageModel)
}
private loadMoreEnd(pageModel: PageModel) {
closeLoadMore(pageModel)
}
/**
* 进页面请求数据
*/
...
...
@@ -105,7 +114,7 @@ export class PageHelper {
} else {
//更新数据
pageModel.compList.addItems(liveReviewDTO.list);
closeRefresh
(pageModel, true);
this.refreshUIEnd
(pageModel, true);
}
}).catch((err: string | Resource) => {
promptAction.showToast({ message: err });
...
...
@@ -233,7 +242,7 @@ export class PageHelper {
//
pageModel.currentPage++
pageModel.viewType = ViewType.LOADED
closeRefresh
(pageModel, true)
this.refreshUIEnd
(pageModel, true)
if (pageModel.compList.isEmpty()) {
// 没数据,展示空页面
...
...
@@ -277,6 +286,7 @@ export class PageHelper {
//聚合页
if (pageModel.pageType == 1) {
PageViewModel.postThemeList(pageModel.currentPage, pageModel.pageSize, pageModel.extra).then((liveReviewDTO) => {
this.loadMoreEnd(pageModel)
if (liveReviewDTO == null || liveReviewDTO.list == null || liveReviewDTO.list.length == 0) {
pageModel.hasMore = false;
return;
...
...
@@ -290,6 +300,7 @@ export class PageHelper {
}
}).catch((err: string | Resource) => {
promptAction.showToast({ message: err });
this.loadMoreEnd(pageModel)
})
} else {
...
...
@@ -301,7 +312,7 @@ export class PageHelper {
// 默认加载更多走 楼层接口
PageViewModel.getPageGroupCompData(pageModel.bizCopy())
.then((data: PageDTO) => {
this.loadMoreEnd(pageModel)
if (data == null || data.compList == null || data.compList.length == 0) {
pageModel.hasMore = false;
} else {
...
...
@@ -316,6 +327,7 @@ export class PageHelper {
}
}).catch((err: string | Resource) => {
promptAction.showToast({ message: err });
this.loadMoreEnd(pageModel)
})
}
}
...
...
@@ -651,6 +663,7 @@ export class PageHelper {
let pageSize = Normal_Page_Size
PageViewModel.getLiveReviewUrl(currentPage, pageSize).then((liveReviewDTO) => {
this.loadMoreEnd(pageModel)
if (liveReviewDTO == null || liveReviewDTO.list == null || liveReviewDTO.list.length == 0) {
pageModel.hasMore = false;
} else {
...
...
@@ -696,9 +709,9 @@ export class PageHelper {
this.getLiveRoomDataInfo(pageInfo.oneRequestPageGroupCompList.convertToArray())
}
}).catch((err: string | Resource) => {
promptAction.showToast({ message: err });
this.loadMoreEnd(pageModel)
})
}
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
63085e2
...
...
@@ -17,6 +17,7 @@ import { PlayerBottomView } from '../view/PlayerBottomView';
import { PlayerRightView } from '../view/PlayerRightView';
import { DisplayDirection } from 'wdConstant/Index';
import { CommentDialogView } from '../view/CommentDialogView';
import { window } from '@kit.ArkUI';
const TAG = 'DetailPlayShortVideoPage';
...
...
@@ -294,6 +295,15 @@ export struct DetailPlayShortVideoPage {
.margin({ top: 280 })
.onClick(() => {
// 全屏方案待定
// this.displayDirection = DisplayDirection.VERTICAL
this.displayDirection = this.displayDirection == DisplayDirection.VERTICAL ?
DisplayDirection.VIDEO_HORIZONTAL :
DisplayDirection.VERTICAL
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE_INVERTED)
})
}
...
...
sight_harmony/features/wdPlayer/src/main/ets/pages/WDPlayerRenderView.ets
View file @
63085e2
...
...
@@ -96,6 +96,7 @@ export struct WDPlayerRenderView {
this.onLoad(event)
}
})
.zIndex(1000)
.width(this.selfSize.width)
.height(this.selfSize.height)
}
...
...
Please
register
or
login
to post a comment