wangyujian_wd

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

@@ -49,10 +49,9 @@ export function registerRouter() { @@ -49,10 +49,9 @@ export function registerRouter() {
49 // }) 49 // })
50 50
51 Action2Page.register("JUMP_DETAIL_PAGE", (action: Action) => { 51 Action2Page.register("JUMP_DETAIL_PAGE", (action: Action) => {
52 - // if (action.params?.detailPageType == 2 || action.params?.detailPageType == 6) {  
53 - // return WDRouterPage.detailPlayLivePage  
54 - // }  
55 - if (action.params?.detailPageType == 7 || action.params?.detailPageType == 8) { 52 + if (action.params?.detailPageType == 2 || action.params?.detailPageType == 6) {
  53 + return WDRouterPage.detailPlayLivePage
  54 + } else if (action.params?.detailPageType == 7 || action.params?.detailPageType == 8) {
56 return WDRouterPage.detailVideoListPage 55 return WDRouterPage.detailVideoListPage
57 } else if (action.params?.detailPageType == 17) { 56 } else if (action.params?.detailPageType == 17) {
58 return WDRouterPage.multiPictureDetailPage 57 return WDRouterPage.multiPictureDetailPage
@@ -75,8 +74,6 @@ export function registerRouter() { @@ -75,8 +74,6 @@ export function registerRouter() {
75 return WDRouterPage.imageTextDetailPage 74 return WDRouterPage.imageTextDetailPage
76 } else if (action.params?.pageID == "BroadcastPage") { 75 } else if (action.params?.pageID == "BroadcastPage") {
77 return WDRouterPage.broadcastPage 76 return WDRouterPage.broadcastPage
78 - } else if (action.params?.pageID == "LIVE_DETAILS_PAGER") {  
79 - return WDRouterPage.detailPlayLivePage  
80 } 77 }
81 return undefined 78 return undefined
82 }) 79 })
@@ -134,15 +134,6 @@ export struct TopNavigationComponent { @@ -134,15 +134,6 @@ export struct TopNavigationComponent {
134 }; 134 };
135 WDRouterRule.jumpWithAction(taskAction) 135 WDRouterRule.jumpWithAction(taskAction)
136 } 136 }
137 - jumpToLiveDetailsPaper() {  
138 - let taskAction: Action = {  
139 - type: 'JUMP_INNER_NEW_PAGE',  
140 - params: {  
141 - pageID: 'LIVE_DETAILS_PAGER'  
142 - } as Params,  
143 - };  
144 - WDRouterRule.jumpWithAction(taskAction)  
145 - }  
146 137
147 build() { 138 build() {
148 Column() { 139 Column() {
@@ -154,23 +145,9 @@ export struct TopNavigationComponent { @@ -154,23 +145,9 @@ export struct TopNavigationComponent {
154 Image($r('app.media.icon_ren_min_ri_bao')) 145 Image($r('app.media.icon_ren_min_ri_bao'))
155 .width(72) 146 .width(72)
156 .height(29) 147 .height(29)
157 - .gesture(  
158 - GestureGroup(GestureMode.Exclusive,  
159 - //播放器双击  
160 - TapGesture({ count: 2 })  
161 - .onAction((event?: GestureEvent) => {  
162 - if (event) {  
163 - this.jumpToLiveDetailsPaper()  
164 - }  
165 - }),  
166 - //播放器单击  
167 - TapGesture({ count: 1 })  
168 - .onAction((event?: GestureEvent) => {  
169 - if (event) { 148 + .onClick(()=>{
170 this.jumpToENewPaper() 149 this.jumpToENewPaper()
171 - }  
172 - })))  
173 - 150 + })
174 Stack({ alignContent: Alignment.Center }) { 151 Stack({ alignContent: Alignment.Center }) {
175 Image($r('app.media.background_read_paper_home')) 152 Image($r('app.media.background_read_paper_home'))
176 .width('100%') 153 .width('100%')
@@ -9,6 +9,10 @@ export class ContentConstants { @@ -9,6 +9,10 @@ export class ContentConstants {
9 */ 9 */
10 static readonly TYPE_VOD: string = "1"; 10 static readonly TYPE_VOD: string = "1";
11 /** 11 /**
  12 + * 2:直播
  13 + */
  14 + static readonly TYPE_LIVE: string = "2";
  15 + /**
12 * 5:专题详情 16 * 5:专题详情
13 */ 17 */
14 static readonly TYPE_SPECIAL_TOPIC: string = "5"; 18 static readonly TYPE_SPECIAL_TOPIC: string = "5";
@@ -32,6 +32,9 @@ export class ProcessUtils { @@ -32,6 +32,9 @@ export class ProcessUtils {
32 Logger.debug(TAG, "processPage, nonsupport!!!"); 32 Logger.debug(TAG, "processPage, nonsupport!!!");
33 ProcessUtils.gotoVod(content) 33 ProcessUtils.gotoVod(content)
34 break; 34 break;
  35 + case ContentConstants.TYPE_LIVE:
  36 + ProcessUtils.gotoLive(content)
  37 + break
35 case ContentConstants.TYPE_AUDIO: 38 case ContentConstants.TYPE_AUDIO:
36 ProcessUtils.gotoAudio(content) 39 ProcessUtils.gotoAudio(content)
37 break; 40 break;
@@ -98,6 +101,21 @@ export class ProcessUtils { @@ -98,6 +101,21 @@ export class ProcessUtils {
98 WDRouterRule.jumpWithAction(taskAction) 101 WDRouterRule.jumpWithAction(taskAction)
99 Logger.debug(TAG, `gotoVod, ${content.objectId}`); 102 Logger.debug(TAG, `gotoVod, ${content.objectId}`);
100 } 103 }
  104 + private static gotoLive(content: ContentDTO) {
  105 + let taskAction: Action = {
  106 + type: 'JUMP_DETAIL_PAGE',
  107 + params: {
  108 + detailPageType: 2,
  109 + contentID: content?.objectId,
  110 + extra:{
  111 + relType: content?.relType,
  112 + relId: content?.relId,
  113 + } as ExtraDTO
  114 + } as Params,
  115 + };
  116 + WDRouterRule.jumpWithAction(taskAction)
  117 + Logger.debug(TAG, `gotoLive, ${content.objectId}`);
  118 + }
101 private static gotoAudio(content: ContentDTO) { 119 private static gotoAudio(content: ContentDTO) {
102 let taskAction: Action = { 120 let taskAction: Action = {
103 type: 'JUMP_DETAIL_PAGE', 121 type: 'JUMP_DETAIL_PAGE',