王士厅

配置多图详情页

... ... @@ -54,6 +54,8 @@ export function registerRouter() {
// }
if (action.params?.detailPageType == 7 || action.params?.detailPageType == 8) {
return WDRouterPage.detailPlayShortVideoPage
} else if (action.params?.detailPageType == 9 ) {
return WDRouterPage.multiPictureDetailPage
}
return WDRouterPage.detailPlayVodPage
})
... ...
... ... @@ -32,6 +32,8 @@ export class WDRouterPage {
static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage");
// 直播详情页
static detailPlayLivePage = new WDRouterPage("wdDetailPlayLive", "ets/pages/DetailPlayLivePage");
// 多图(图集)详情页
static multiPictureDetailPage = new WDRouterPage("phone", "ets/pages/detail/MultiPictureDetailPage");
static loginPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginPage");
... ...
... ... @@ -16,5 +16,6 @@ export interface Params {
// 6.挂件详情页
// 7.沉浸式竖屏详情页
// 8.专辑竖屏详情页
// 9.多图(图集)详情页
detailPageType?:number; // 详情页类型
}
... ...
import { CompDTO } from 'wdBean';
import { CompDTO, ContentDTO } from 'wdBean';
import { CommonConstants, CompStyle } from 'wdConstant';
import { BannerComponent } from './view/BannerComponent';
import { LabelComponent } from './view/LabelComponent';
... ... @@ -16,14 +16,78 @@ import {
import {
HorizontalStrokeCardThreeTwoRadioForOneComponent
} from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent';
import {
HorizontalStrokeCardThreeTwoRadioForTwoComponent
} from './view/HorizontalStrokeCardThreeTwoRadioForTwoComponent';
import { AlbumCardComponent } from './view/AlbumCardComponent';
/**
* comp适配器.
*/
@Preview
@Component
export struct CompParser {
compDTO: CompDTO = {} as CompDTO;
@State compDTO: CompDTO = {
compStyle: '17',
imageScale: 3,
operDataList: [
{
title: 'title0',
description: "description0",
coverUrl: 'https://uatjdcdnphoto.aikan.pdnews' +
'.cn/sjbj-20231208/image/display/d4496925a1264a749975ae9b01a4ef46.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
fullColumnImgUrls: [{
url: "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20240104/image/display/c4a9b526e0994d1bbd3ac8450f5cfc6c.jpg?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
},{
url:'https://uatjdcdnphoto.aikan.pdnews' +
'.cn/sjbj-20231208/image/display/d4496925a1264a749975ae9b01a4ef46.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
},{
url: 'https://uatjdcdnphoto.aikan.pdnews' +
'.cn/sjbj-20231208/image/display/d4496925a1264a749975ae9b01a4ef46.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
}]
} as ContentDTO,
{
title: 'title1 title1 title1 title1 title1 title1 title1 title1 title1',
description: "description1",
coverUrl: "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20240104/image/display/c4a9b526e0994d1bbd3ac8450f5cfc6c.jpg?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
} as ContentDTO,
{
title: 'title2',
description: "description2",
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",
} as ContentDTO,
{
title: 'title3',
description: "description3",
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'
} as ContentDTO,
{
title: 'title4',
description: "description4",
coverUrl: "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231218/image/display/62bdbbb35dbd45689e00790c81f04c4b.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
} as ContentDTO,
{
title: 'title5',
description: "description5",
coverUrl: "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231218/image/display/f79bbaa5a33b4bd88176071c4f797ff6.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
} as ContentDTO,
{
title: 'title6',
description: "description6",
coverUrl: "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231218/image/display/2c1d917009584ce2bb4a35cbb3a860a0.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
} as ContentDTO,
{
title: 'title7',
description: "description7",
coverUrl: "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231222/image/display/117dc516ca5c42d5843c0d32050c9fc6.jpeg?x-oss-process=image/resize,w_240/quality,q_90/format,jpg",
} as ContentDTO,
{
title: 'title8',
description: "description8",
coverUrl: "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231228/image/display/90a2db4077d44a1f887f068fc659d977.jpeg?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
} as ContentDTO
]
} as CompDTO
compIndex: number = 0;
build() {
... ...
import { CompDTO } from 'wdBean'
import { Action, CompDTO, Params } from 'wdBean';
import { DateTimeUtils, Logger } from 'wdKit';
import { WDRouterRule } from 'wdRouter';
const TAG = 'AlbumCardComponent';
... ... @@ -97,6 +98,15 @@ export struct AlbumCardComponent {
}
.width(343)
.height(154)
.onClick((event: ClickEvent) => {
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType: 9
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
})
Row() {
if (this.compDTO.operDataList[0].source) {
... ...
@Entry
@Component
struct MultiPictureDetailPage {
@State message: string = 'Hello World';
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
}
.width('100%')
}
.height('100%')
}
}
\ No newline at end of file
... ...
... ... @@ -4,6 +4,7 @@
"pages/web/DefaultWebPage",
"pages/ENewspaper",
"pages/ImageAndTextDetailPage",
"pages/MorningEveningPaperPage"
"pages/MorningEveningPaperPage",
"pages/detail/MultiPictureDetailPage"
]
}
\ No newline at end of file
... ...