ref |> 统一优化跳转详情页detailPageType
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Showing
5 changed files
with
28 additions
and
27 deletions
| @@ -49,9 +49,9 @@ export function registerRouter() { | @@ -49,9 +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) { | 52 | + if (action.params?.detailPageType == 2) { |
| 53 | return WDRouterPage.detailPlayLiveCommon | 53 | return WDRouterPage.detailPlayLiveCommon |
| 54 | - } else if (action.params?.detailPageType == 7 || action.params?.detailPageType == 8) { | 54 | + } else if (action.params?.detailPageType == 1) { |
| 55 | return WDRouterPage.detailVideoListPage | 55 | return WDRouterPage.detailVideoListPage |
| 56 | } else if (action.params?.detailPageType == 9) { | 56 | } else if (action.params?.detailPageType == 9) { |
| 57 | //图集详情页 | 57 | //图集详情页 |
| @@ -59,16 +59,19 @@ export function registerRouter() { | @@ -59,16 +59,19 @@ export function registerRouter() { | ||
| 59 | } else if (action.params?.detailPageType == 14 || action.params?.detailPageType == 15) { | 59 | } else if (action.params?.detailPageType == 14 || action.params?.detailPageType == 15) { |
| 60 | //动态详情页 | 60 | //动态详情页 |
| 61 | return WDRouterPage.dynamicDetailPage | 61 | return WDRouterPage.dynamicDetailPage |
| 62 | - } else if (action.params?.detailPageType == 17) { | ||
| 63 | - return WDRouterPage.multiPictureDetailPage | ||
| 64 | } else if (action.params?.detailPageType == 13) { | 62 | } else if (action.params?.detailPageType == 13) { |
| 65 | return WDRouterPage.audioDetail | 63 | return WDRouterPage.audioDetail |
| 66 | - } else if (action.params?.detailPageType == 18) { | 64 | + } else if (action.params?.detailPageType == 30) { |
| 65 | + return WDRouterPage.themeListPage | ||
| 66 | + } else if (action.params?.detailPageType == 8) { | ||
| 67 | + return WDRouterPage.imageTextDetailPage | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + //TODO: 以下两个最好改为pageID方式,以上都是有具体内容类型 对应详情页面 | ||
| 71 | + else if (action.params?.detailPageType == 18) { | ||
| 67 | return WDRouterPage.multiPictureListPage | 72 | return WDRouterPage.multiPictureListPage |
| 68 | } else if (action.params?.detailPageType == 19) { | 73 | } else if (action.params?.detailPageType == 19) { |
| 69 | return WDRouterPage.videoPlayPage | 74 | return WDRouterPage.videoPlayPage |
| 70 | - }else if (action.params?.detailPageType == 30) { | ||
| 71 | - return WDRouterPage.themeListPage | ||
| 72 | } | 75 | } |
| 73 | return WDRouterPage.detailPlayVodPage | 76 | return WDRouterPage.detailPlayVodPage |
| 74 | }) | 77 | }) |
| @@ -3,6 +3,7 @@ import App from '@system.app' | @@ -3,6 +3,7 @@ import App from '@system.app' | ||
| 3 | import { Action, Params } from 'wdBean/Index' | 3 | import { Action, Params } from 'wdBean/Index' |
| 4 | import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO' | 4 | import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO' |
| 5 | import { Logger } from 'wdKit/Index' | 5 | import { Logger } from 'wdKit/Index' |
| 6 | +import { ContentType } from '../common/ContentType' | ||
| 6 | import { WDRouterRule } from '../router/WDRouterRule' | 7 | import { WDRouterRule } from '../router/WDRouterRule' |
| 7 | import { ProcessUtils } from './ProcessUtils' | 8 | import { ProcessUtils } from './ProcessUtils' |
| 8 | 9 | ||
| @@ -111,13 +112,13 @@ export class AppInnerLink { | @@ -111,13 +112,13 @@ export class AppInnerLink { | ||
| 111 | } | 112 | } |
| 112 | private static contentTypeWithType(type?: string) : number | undefined { | 113 | private static contentTypeWithType(type?: string) : number | undefined { |
| 113 | switch (type) { | 114 | switch (type) { |
| 114 | - case "video": return 1 | ||
| 115 | - case "dynamic": return 14 | ||
| 116 | - case "live": return 2 | ||
| 117 | - case "audio": return 13 | ||
| 118 | - case "picture": return 9 | ||
| 119 | - case "article": return 8 | ||
| 120 | - case "ask": return 16 | 115 | + case "video": return ContentType.Video |
| 116 | + case "dynamic": return ContentType.DynamicImageText | ||
| 117 | + case "live": return ContentType.Live | ||
| 118 | + case "audio": return ContentType.Audio | ||
| 119 | + case "picture": return ContentType.Pictures | ||
| 120 | + case "article": return ContentType.ImageText | ||
| 121 | + case "ask": return ContentType.Ask | ||
| 121 | } | 122 | } |
| 122 | return | 123 | return |
| 123 | } | 124 | } |
| @@ -304,7 +304,7 @@ export class ProcessUtils { | @@ -304,7 +304,7 @@ export class ProcessUtils { | ||
| 304 | let taskAction: Action = { | 304 | let taskAction: Action = { |
| 305 | type: 'JUMP_DETAIL_PAGE', | 305 | type: 'JUMP_DETAIL_PAGE', |
| 306 | params: { | 306 | params: { |
| 307 | - detailPageType: 7, | 307 | + detailPageType: 1, |
| 308 | contentID: content?.objectId, | 308 | contentID: content?.objectId, |
| 309 | extra: { | 309 | extra: { |
| 310 | relType: content?.relType, | 310 | relType: content?.relType, |
| @@ -382,7 +382,7 @@ export class ProcessUtils { | @@ -382,7 +382,7 @@ export class ProcessUtils { | ||
| 382 | let taskAction: Action = { | 382 | let taskAction: Action = { |
| 383 | type: 'JUMP_DETAIL_PAGE', | 383 | type: 'JUMP_DETAIL_PAGE', |
| 384 | params: { | 384 | params: { |
| 385 | - detailPageType: 17, | 385 | + detailPageType: 9, |
| 386 | contentID: content?.objectId, | 386 | contentID: content?.objectId, |
| 387 | extra: { | 387 | extra: { |
| 388 | relType: content?.relType, | 388 | relType: content?.relType, |
| @@ -10,16 +10,13 @@ export interface Params { | @@ -10,16 +10,13 @@ export interface Params { | ||
| 10 | // 详情页类型 | 10 | // 详情页类型 |
| 11 | // 1.点播详情页 | 11 | // 1.点播详情页 |
| 12 | // 2.直播详情页 | 12 | // 2.直播详情页 |
| 13 | - // 3.图文详情页 | ||
| 14 | - // 4.全民播详情页 | ||
| 15 | - // 5.欢喜详情页 | ||
| 16 | - // 6.挂件详情页 | ||
| 17 | - // 7.沉浸式竖屏详情页 | ||
| 18 | - // 8.专辑竖屏详情页 | ||
| 19 | - // 13.音频详情页 | ||
| 20 | - // 17.多图(图集)详情页 | ||
| 21 | - // 18.大图列表页 | ||
| 22 | - // 19.单个视频播放页 | 13 | + // 8.图文详情页 |
| 14 | + // 9.多图(图集)详情页 | ||
| 15 | + // 14和15 动态详情页 | ||
| 16 | + // 13 音频详情页 | ||
| 17 | + // 30 金刚位 | ||
| 18 | + // 18.大图列表页 - 图片预览 ------ 需要变更待定 | ||
| 19 | + // 19.单个视频播放页 - 视频播放 ----- 需要变更待定 | ||
| 23 | detailPageType?: number; // 详情页类型 | 20 | detailPageType?: number; // 详情页类型 |
| 24 | liveStyle?: number; // 直播类型:0横屏,1竖屏 | 21 | liveStyle?: number; // 直播类型:0横屏,1竖屏 |
| 25 | creatorId?: string; //号主id | 22 | creatorId?: string; //号主id |
| @@ -116,7 +116,7 @@ export struct Card17Component { | @@ -116,7 +116,7 @@ export struct Card17Component { | ||
| 116 | let taskAction: Action = { | 116 | let taskAction: Action = { |
| 117 | type: 'JUMP_DETAIL_PAGE', | 117 | type: 'JUMP_DETAIL_PAGE', |
| 118 | params: { | 118 | params: { |
| 119 | - detailPageType: 17, | 119 | + detailPageType: 9, |
| 120 | contentID: this.contentDTO.objectId, | 120 | contentID: this.contentDTO.objectId, |
| 121 | extra: { | 121 | extra: { |
| 122 | relType: this.contentDTO.relType, | 122 | relType: this.contentDTO.relType, |
-
Please register or login to post a comment