wangyujian_wd

feat:1)直播详情页入口逻辑添加

... ... @@ -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
})
... ...
... ... @@ -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%')
... ...
... ... @@ -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";
... ...
... ... @@ -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',
... ...