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
zhenghy
2024-05-13 15:58:43 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
62ee66815af5f53b78d646580bc9f51a23700a10
62ee6681
1 parent
a9b8e21e
视频频道点击底部或顶部tab刷新页面
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
3 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/BottomNavigationComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/VideoChannelPage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerTitleComponent.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/BottomNavigationComponent.ets
View file @
62ee668
...
...
@@ -85,6 +85,7 @@ export struct BottomNavigationComponent {
VideoChannelPage({
topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),
_currentNavIndex: $currentNavIndex,
autoRefresh: this.autoRefresh
})
} else {
TopNavigationComponent({
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/VideoChannelPage.ets
View file @
62ee668
...
...
@@ -13,6 +13,8 @@ export struct VideoChannelPage {
readonly MAX_LINE: number = 1;
private groupId: number = 0
private swiperController: SwiperController = new SwiperController()
// 自动刷新触发(双击tab自动刷新)
@Prop autoRefresh: number = 0
@Prop topNavList: TopNavDTO[]
@Link _currentNavIndex?: number;
@Consume barBackgroundColor: Color
...
...
@@ -91,8 +93,12 @@ export struct VideoChannelPage {
right: $r('app.float.top_tab_item_padding_horizontal'),
})
.onClick(() => {
if (this.currentTopNavSelectedIndex === index) {
this.autoRefresh++
}
this.currentTopNavSelectedIndex = index
this.swiperController.changeIndex(index, true)
})
}, (item: TopNavDTO) => item.channelId + '')
}
...
...
@@ -113,6 +119,7 @@ export struct VideoChannelPage {
groupId: this.groupId + '',
pageId: item.pageId + '',
channelId: item.channelId + '',
autoRefresh: this.autoRefresh,
})
} else {
// 直播
...
...
@@ -121,7 +128,7 @@ export struct VideoChannelPage {
navIndex: index,
pageId: item.pageId + '',
channelId: item.channelId + '',
autoRefresh: this.autoRefresh
2Page
autoRefresh: this.autoRefresh
}).margin({ top: 40 })
}
}, (item: TopNavDTO) => item.channelId + '')
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
View file @
62ee668
...
...
@@ -164,11 +164,12 @@ export struct PlayUIComponent {
LottieView({
name: 'live_status_wait',
path: "lottie/live_detail_living.json",
lottieWidth:
8
,
lottieWidth:
9
,
lottieHeight: 9,
autoplay: true,
loop: true,
})
.margin({ right: 2 })
}
Text('直播中')
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerTitleComponent.ets
View file @
62ee668
...
...
@@ -61,11 +61,12 @@ export struct PlayerTitleComponent {
LottieView({
name: 'live_status_wait',
path: "lottie/live_detail_living.json",
lottieWidth:
8
,
lottieWidth:
9
,
lottieHeight: 9,
autoplay: true,
loop: true,
})
.margin({ right: 2 })
}.margin({ right: 1 })
// Image($r('app.media.icon_live_status_running'))
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
View file @
62ee668
...
...
@@ -39,6 +39,7 @@ export struct VideoChannelDetail {
// private recommend?: string = '' // 0.非推荐,1.推荐;
@Link @Watch('navIndexChange') bottomNavIndex: number
@Link @Watch('navIndexChange') topNavIndex: number
@Prop @Watch('autoRefreshChange') autoRefresh: number = 0
@Consume barBackgroundColor: Color
private swiperController: SwiperController = new SwiperController()
@Provide showComment: boolean = false
...
...
@@ -54,6 +55,18 @@ export struct VideoChannelDetail {
@State isMouted: boolean = false
@State isRequestError: boolean = false
autoRefreshChange() {
if (this.topNavIndex === 0) {
this.data = []
this.interactDataList = []
this.totalCount = 0
this.isMouted = false
this.getRecCompInfo()
this.getRecCompInfo()
}
}
pageShowChange() {
if (this.bottomNavIndex === 2 && this.topNavIndex === 0) {
this.barBackgroundColor = Color.Black
...
...
Please
register
or
login
to post a comment