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
wangyujian_wd
2024-04-12 17:41:19 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9c1a33bf35339f1db53eb6ac715af39ac10b07b1
9c1a33bf
1 parent
639366cc
feat:1)直播详情页入口逻辑添加
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
32 deletions
sight_harmony/commons/wdRouter/src/main/ets/router/Action2Page.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
sight_harmony/features/wdComponent/src/main/ets/constants/ContentConstants.ets
sight_harmony/features/wdComponent/src/main/ets/utils/ProcessUtils.ets
sight_harmony/commons/wdRouter/src/main/ets/router/Action2Page.ets
View file @
9c1a33b
...
...
@@ -49,10 +49,9 @@ export function registerRouter() {
// })
Action2Page.register("JUMP_DETAIL_PAGE", (action: Action) => {
// if (action.params?.detailPageType == 2 || action.params?.detailPageType == 6) {
// return WDRouterPage.detailPlayLivePage
// }
if (action.params?.detailPageType == 7 || action.params?.detailPageType == 8) {
if (action.params?.detailPageType == 2 || action.params?.detailPageType == 6) {
return WDRouterPage.detailPlayLivePage
} else if (action.params?.detailPageType == 7 || action.params?.detailPageType == 8) {
return WDRouterPage.detailVideoListPage
} else if (action.params?.detailPageType == 17) {
return WDRouterPage.multiPictureDetailPage
...
...
@@ -75,8 +74,6 @@ export function registerRouter() {
return WDRouterPage.imageTextDetailPage
} else if (action.params?.pageID == "BroadcastPage") {
return WDRouterPage.broadcastPage
} else if (action.params?.pageID == "LIVE_DETAILS_PAGER") {
return WDRouterPage.detailPlayLivePage
}
return undefined
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
View file @
9c1a33b
...
...
@@ -134,15 +134,6 @@ export struct TopNavigationComponent {
};
WDRouterRule.jumpWithAction(taskAction)
}
jumpToLiveDetailsPaper() {
let taskAction: Action = {
type: 'JUMP_INNER_NEW_PAGE',
params: {
pageID: 'LIVE_DETAILS_PAGER'
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
}
build() {
Column() {
...
...
@@ -154,23 +145,9 @@ export struct TopNavigationComponent {
Image($r('app.media.icon_ren_min_ri_bao'))
.width(72)
.height(29)
.gesture(
GestureGroup(GestureMode.Exclusive,
//播放器双击
TapGesture({ count: 2 })
.onAction((event?: GestureEvent) => {
if (event) {
this.jumpToLiveDetailsPaper()
}
}),
//播放器单击
TapGesture({ count: 1 })
.onAction((event?: GestureEvent) => {
if (event) {
this.jumpToENewPaper()
}
})))
.onClick(()=>{
this.jumpToENewPaper()
})
Stack({ alignContent: Alignment.Center }) {
Image($r('app.media.background_read_paper_home'))
.width('100%')
...
...
sight_harmony/features/wdComponent/src/main/ets/constants/ContentConstants.ets
View file @
9c1a33b
...
...
@@ -9,6 +9,10 @@ export class ContentConstants {
*/
static readonly TYPE_VOD: string = "1";
/**
* 2:直播
*/
static readonly TYPE_LIVE: string = "2";
/**
* 5:专题详情
*/
static readonly TYPE_SPECIAL_TOPIC: string = "5";
...
...
sight_harmony/features/wdComponent/src/main/ets/utils/ProcessUtils.ets
View file @
9c1a33b
...
...
@@ -32,6 +32,9 @@ export class ProcessUtils {
Logger.debug(TAG, "processPage, nonsupport!!!");
ProcessUtils.gotoVod(content)
break;
case ContentConstants.TYPE_LIVE:
ProcessUtils.gotoLive(content)
break
case ContentConstants.TYPE_AUDIO:
ProcessUtils.gotoAudio(content)
break;
...
...
@@ -98,6 +101,21 @@ export class ProcessUtils {
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoVod, ${content.objectId}`);
}
private static gotoLive(content: ContentDTO) {
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType: 2,
contentID: content?.objectId,
extra:{
relType: content?.relType,
relId: content?.relId,
} as ExtraDTO
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoLive, ${content.objectId}`);
}
private static gotoAudio(content: ContentDTO) {
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
...
...
Please
register
or
login
to post a comment