Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
王士厅
2024-03-25 17:08:57 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c791a9c82fc6131e5c31a4ee4eacf241ce643e87
c791a9c8
1 parent
38c23792
配置多图详情页
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
101 additions
and
4 deletions
sight_harmony/commons/wdRouter/src/main/ets/router/Action2Page.ets
sight_harmony/commons/wdRouter/src/main/ets/router/WDRouterPage.ets
sight_harmony/features/wdBean/src/main/ets/bean/content/Params.ts
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/AlbumCardComponent.ets
sight_harmony/products/phone/src/main/ets/pages/detail/MultiPictureDetailPage.ets
sight_harmony/products/phone/src/main/resources/base/profile/main_pages.json
sight_harmony/commons/wdRouter/src/main/ets/router/Action2Page.ets
View file @
c791a9c
...
...
@@ -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
})
...
...
sight_harmony/commons/wdRouter/src/main/ets/router/WDRouterPage.ets
View file @
c791a9c
...
...
@@ -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");
...
...
sight_harmony/features/wdBean/src/main/ets/bean/content/Params.ts
View file @
c791a9c
...
...
@@ -16,5 +16,6 @@ export interface Params {
// 6.挂件详情页
// 7.沉浸式竖屏详情页
// 8.专辑竖屏详情页
// 9.多图(图集)详情页
detailPageType
?:
number
;
// 详情页类型
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
c791a9c
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() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/AlbumCardComponent.ets
View file @
c791a9c
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) {
...
...
sight_harmony/products/phone/src/main/ets/pages/detail/MultiPictureDetailPage.ets
0 → 100644
View file @
c791a9c
@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
...
...
sight_harmony/products/phone/src/main/resources/base/profile/main_pages.json
View file @
c791a9c
...
...
@@ -4,6 +4,7 @@
"pages/web/DefaultWebPage"
,
"pages/ENewspaper"
,
"pages/ImageAndTextDetailPage"
,
"pages/MorningEveningPaperPage"
"pages/MorningEveningPaperPage"
,
"pages/detail/MultiPictureDetailPage"
]
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment