王士厅

配置多图详情页

@@ -54,6 +54,8 @@ export function registerRouter() { @@ -54,6 +54,8 @@ export function registerRouter() {
54 // } 54 // }
55 if (action.params?.detailPageType == 7 || action.params?.detailPageType == 8) { 55 if (action.params?.detailPageType == 7 || action.params?.detailPageType == 8) {
56 return WDRouterPage.detailPlayShortVideoPage 56 return WDRouterPage.detailPlayShortVideoPage
  57 + } else if (action.params?.detailPageType == 9 ) {
  58 + return WDRouterPage.multiPictureDetailPage
57 } 59 }
58 return WDRouterPage.detailPlayVodPage 60 return WDRouterPage.detailPlayVodPage
59 }) 61 })
@@ -32,6 +32,8 @@ export class WDRouterPage { @@ -32,6 +32,8 @@ export class WDRouterPage {
32 static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage"); 32 static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage");
33 // 直播详情页 33 // 直播详情页
34 static detailPlayLivePage = new WDRouterPage("wdDetailPlayLive", "ets/pages/DetailPlayLivePage"); 34 static detailPlayLivePage = new WDRouterPage("wdDetailPlayLive", "ets/pages/DetailPlayLivePage");
  35 + // 多图(图集)详情页
  36 + static multiPictureDetailPage = new WDRouterPage("phone", "ets/pages/detail/MultiPictureDetailPage");
35 37
36 static loginPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginPage"); 38 static loginPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginPage");
37 39
@@ -16,5 +16,6 @@ export interface Params { @@ -16,5 +16,6 @@ export interface Params {
16 // 6.挂件详情页 16 // 6.挂件详情页
17 // 7.沉浸式竖屏详情页 17 // 7.沉浸式竖屏详情页
18 // 8.专辑竖屏详情页 18 // 8.专辑竖屏详情页
  19 + // 9.多图(图集)详情页
19 detailPageType?:number; // 详情页类型 20 detailPageType?:number; // 详情页类型
20 } 21 }
1 -import { CompDTO } from 'wdBean'; 1 +import { CompDTO, ContentDTO } from 'wdBean';
2 import { CommonConstants, CompStyle } from 'wdConstant'; 2 import { CommonConstants, CompStyle } from 'wdConstant';
3 import { BannerComponent } from './view/BannerComponent'; 3 import { BannerComponent } from './view/BannerComponent';
4 import { LabelComponent } from './view/LabelComponent'; 4 import { LabelComponent } from './view/LabelComponent';
@@ -16,14 +16,78 @@ import { @@ -16,14 +16,78 @@ import {
16 import { 16 import {
17 HorizontalStrokeCardThreeTwoRadioForOneComponent 17 HorizontalStrokeCardThreeTwoRadioForOneComponent
18 } from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent'; 18 } from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent';
  19 +import {
  20 + HorizontalStrokeCardThreeTwoRadioForTwoComponent
  21 +} from './view/HorizontalStrokeCardThreeTwoRadioForTwoComponent';
19 import { AlbumCardComponent } from './view/AlbumCardComponent'; 22 import { AlbumCardComponent } from './view/AlbumCardComponent';
20 23
21 /** 24 /**
22 * comp适配器. 25 * comp适配器.
23 */ 26 */
  27 +@Preview
24 @Component 28 @Component
25 export struct CompParser { 29 export struct CompParser {
26 - compDTO: CompDTO = {} as CompDTO; 30 + @State compDTO: CompDTO = {
  31 + compStyle: '17',
  32 + imageScale: 3,
  33 + operDataList: [
  34 + {
  35 + title: 'title0',
  36 + description: "description0",
  37 + coverUrl: 'https://uatjdcdnphoto.aikan.pdnews' +
  38 + '.cn/sjbj-20231208/image/display/d4496925a1264a749975ae9b01a4ef46.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
  39 + fullColumnImgUrls: [{
  40 + url: "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20240104/image/display/c4a9b526e0994d1bbd3ac8450f5cfc6c.jpg?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
  41 + },{
  42 + url:'https://uatjdcdnphoto.aikan.pdnews' +
  43 + '.cn/sjbj-20231208/image/display/d4496925a1264a749975ae9b01a4ef46.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
  44 + },{
  45 + url: 'https://uatjdcdnphoto.aikan.pdnews' +
  46 + '.cn/sjbj-20231208/image/display/d4496925a1264a749975ae9b01a4ef46.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
  47 + }]
  48 + } as ContentDTO,
  49 + {
  50 + title: 'title1 title1 title1 title1 title1 title1 title1 title1 title1',
  51 + description: "description1",
  52 + coverUrl: "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20240104/image/display/c4a9b526e0994d1bbd3ac8450f5cfc6c.jpg?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
  53 + } as ContentDTO,
  54 + {
  55 + title: 'title2',
  56 + description: "description2",
  57 + coverUrl: "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231206/image/live/bbe6d821e92b48919d90c7dadfd1f05a.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
  58 + } as ContentDTO,
  59 + {
  60 + title: 'title3',
  61 + description: "description3",
  62 + coverUrl: 'https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231109/image/live/102e6eb9356b4ef19405b04c1f6ff875.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg'
  63 + } as ContentDTO,
  64 + {
  65 + title: 'title4',
  66 + description: "description4",
  67 + coverUrl: "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231218/image/display/62bdbbb35dbd45689e00790c81f04c4b.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
  68 + } as ContentDTO,
  69 + {
  70 + title: 'title5',
  71 + description: "description5",
  72 + coverUrl: "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231218/image/display/f79bbaa5a33b4bd88176071c4f797ff6.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
  73 + } as ContentDTO,
  74 + {
  75 + title: 'title6',
  76 + description: "description6",
  77 + coverUrl: "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231218/image/display/2c1d917009584ce2bb4a35cbb3a860a0.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
  78 + } as ContentDTO,
  79 + {
  80 + title: 'title7',
  81 + description: "description7",
  82 + coverUrl: "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231222/image/display/117dc516ca5c42d5843c0d32050c9fc6.jpeg?x-oss-process=image/resize,w_240/quality,q_90/format,jpg",
  83 + } as ContentDTO,
  84 + {
  85 + title: 'title8',
  86 + description: "description8",
  87 + coverUrl: "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231228/image/display/90a2db4077d44a1f887f068fc659d977.jpeg?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
  88 + } as ContentDTO
  89 + ]
  90 + } as CompDTO
27 compIndex: number = 0; 91 compIndex: number = 0;
28 92
29 build() { 93 build() {
1 -import { CompDTO } from 'wdBean' 1 +import { Action, CompDTO, Params } from 'wdBean';
2 import { DateTimeUtils, Logger } from 'wdKit'; 2 import { DateTimeUtils, Logger } from 'wdKit';
  3 +import { WDRouterRule } from 'wdRouter';
3 4
4 const TAG = 'AlbumCardComponent'; 5 const TAG = 'AlbumCardComponent';
5 6
@@ -97,6 +98,15 @@ export struct AlbumCardComponent { @@ -97,6 +98,15 @@ export struct AlbumCardComponent {
97 } 98 }
98 .width(343) 99 .width(343)
99 .height(154) 100 .height(154)
  101 + .onClick((event: ClickEvent) => {
  102 + let taskAction: Action = {
  103 + type: 'JUMP_DETAIL_PAGE',
  104 + params: {
  105 + detailPageType: 9
  106 + } as Params,
  107 + };
  108 + WDRouterRule.jumpWithAction(taskAction)
  109 + })
100 110
101 Row() { 111 Row() {
102 if (this.compDTO.operDataList[0].source) { 112 if (this.compDTO.operDataList[0].source) {
  1 +@Entry
  2 +@Component
  3 +struct MultiPictureDetailPage {
  4 + @State message: string = 'Hello World';
  5 +
  6 + build() {
  7 + Row() {
  8 + Column() {
  9 + Text(this.message)
  10 + .fontSize(50)
  11 + .fontWeight(FontWeight.Bold)
  12 + }
  13 + .width('100%')
  14 + }
  15 + .height('100%')
  16 + }
  17 +}
@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
4 "pages/web/DefaultWebPage", 4 "pages/web/DefaultWebPage",
5 "pages/ENewspaper", 5 "pages/ENewspaper",
6 "pages/ImageAndTextDetailPage", 6 "pages/ImageAndTextDetailPage",
7 - "pages/MorningEveningPaperPage" 7 + "pages/MorningEveningPaperPage",
  8 + "pages/detail/MultiPictureDetailPage"
8 ] 9 ]
9 } 10 }