wangyong_wd

样式卡优化

Showing 22 changed files with 292 additions and 255 deletions
@@ -20,47 +20,47 @@ export const enum CompStyle { @@ -20,47 +20,47 @@ export const enum CompStyle {
20 Masonry_Layout_01 = 'Masonry_Layout-01', // 双列瀑布流/瀑布流卡:视频、直播、专题、活动 20 Masonry_Layout_01 = 'Masonry_Layout-01', // 双列瀑布流/瀑布流卡:视频、直播、专题、活动
21 21
22 22
23 - Zh_Carousel_Layout_01 = 'Zh_Carousel_Layout-01', //1 轮播图卡---1  
24 - Zh_Single_Row_01 = 'Zh_Single_Row-01', //2 横划卡 imageScale-封面图比例 1-4:3, 2-16:9, 3-3:2---1  
25 - Zh_Single_Row_02 = 'Zh_Single_Row-02', //3 小视频横划卡---1 23 + Zh_Carousel_Layout_01 = 'Zh_Carousel_Layout-01', //1 轮播图卡
  24 + Zh_Single_Row_01 = 'Zh_Single_Row-01', //2 横划卡 imageScale-封面图比例 1-4:3, 2-16:9, 3-3:2
  25 + Zh_Single_Row_02 = 'Zh_Single_Row-02', //3 小视频横划卡
26 Zh_Single_Row_03 = 'Zh_Single_Row-03', //6 直播预约卡 26 Zh_Single_Row_03 = 'Zh_Single_Row-03', //6 直播预约卡
27 - Zh_Single_Row_04 = 'Zh_Single_Row-04', // 地方精选卡---2  
28 - Zh_Single_Row_05 = 'Zh_Single_Row-05', //15 人民号横划卡---1  
29 - Zh_Single_Row_06 = 'Zh_Single_Row-06', //20 热门评论卡--精选评论卡-1 27 + Zh_Single_Row_04 = 'Zh_Single_Row-04', // 地方精选卡
  28 + Zh_Single_Row_05 = 'Zh_Single_Row-05', //15 人民号横划卡
  29 + Zh_Single_Row_06 = 'Zh_Single_Row-06', //20 热门评论卡--精选评论卡
30 Zh_Single_Column_01 = 'Zh_Single_Column-01', //5 专题时间链卡 30 Zh_Single_Column_01 = 'Zh_Single_Column-01', //5 专题时间链卡
31 - Zh_Single_Column_02 = 'Zh_Single_Column-02', //10 头图卡---2 31 + Zh_Single_Column_02 = 'Zh_Single_Column-02', //10 头图卡
32 Zh_Single_Column_03 = 'Zh_Single_Column-03', //9 直播大图卡 32 Zh_Single_Column_03 = 'Zh_Single_Column-03', //9 直播大图卡
33 - Zh_Single_Column_04 = 'Zh_Single_Column-04', //17 人民号主题卡---1  
34 - Zh_Single_Column_05 = 'Zh_Single_Column-05', //16 人民号入驻卡---1 33 + Zh_Single_Column_04 = 'Zh_Single_Column-04', //17 人民号主题卡
  34 + Zh_Single_Column_05 = 'Zh_Single_Column-05', //16 人民号入驻卡
35 Zh_Single_Column_06 = 'Zh_Single_Column-06', //12 本地问政卡 35 Zh_Single_Column_06 = 'Zh_Single_Column-06', //12 本地问政卡
36 Zh_Single_Column_07 = 'Zh_Single_Column-07', //14 热门留言卡 36 Zh_Single_Column_07 = 'Zh_Single_Column-07', //14 热门留言卡
37 Zh_Single_Column_08 = 'Zh_Single_Column-08', //12 问政提问卡 37 Zh_Single_Column_08 = 'Zh_Single_Column-08', //12 问政提问卡
38 Zh_Single_Column_10 = 'Zh_Single_Column-10', //18 服务组合卡 38 Zh_Single_Column_10 = 'Zh_Single_Column-10', //18 服务组合卡
39 Zh_Single_Column_11 = 'Zh_Single_Column-11', //19 问政组合卡 39 Zh_Single_Column_11 = 'Zh_Single_Column-11', //19 问政组合卡
40 Zh_Grid_Layout_01 = 'Zh_Grid_Layout-01', //4 信息流组合卡 40 Zh_Grid_Layout_01 = 'Zh_Grid_Layout-01', //4 信息流组合卡
41 - Zh_Grid_Layout_02 = 'Zh_Grid_Layout-02', //7 双列流小视频,一行两图卡---1  
42 - Zh_Grid_Layout_03 = 'Zh_Grid_Layout-03', //11 金刚位卡---2 41 + Zh_Grid_Layout_02 = 'Zh_Grid_Layout-02', //7 双列流小视频,一行两图卡
  42 + Zh_Grid_Layout_03 = 'Zh_Grid_Layout-03', //11 金刚位卡
43 Card_01 = '1', // 小图卡 43 Card_01 = '1', // 小图卡
44 - Card_02 = '2', // 大图卡---2  
45 - Card_03 = '3', // 无图卡(全标题)---2  
46 - Card_04 = '4', // 三图卡---2  
47 - Card_05 = '5', // 头图卡---2  
48 - Card_06 = '6', // 小视频卡---2 44 + Card_02 = '2', // 大图卡
  45 + Card_03 = '3', // 无图卡(全标题)
  46 + Card_04 = '4', // 三图卡
  47 + Card_05 = '5', // 头图卡
  48 + Card_06 = '6', // 小视频卡
49 Card_07 = '7', // 作者卡 49 Card_07 = '7', // 作者卡
50 Card_08 = '8', // 财经快讯卡 50 Card_08 = '8', // 财经快讯卡
51 - Card_09 = '9', // 时间轴卡---2  
52 - Card_10 = '10', // 大专题卡---2  
53 - Card_11 = '11', // 无图卡(标题省略)---2  
54 - Card_12 = '12', // 无图卡人民号---1  
55 - Card_13 = '13', // 单图卡---2--同6  
56 - Card_14 = '14', // 单图卡人民号---1  
57 - Card_15 = '15', // 大图卡人民号---1  
58 - Card_16 = '16', // 三图卡人民号---1  
59 - Card_17 = '17', // 图卡集---2 51 + Card_09 = '9', // 时间轴卡
  52 + Card_10 = '10', // 大专题卡
  53 + Card_11 = '11', // 无图卡(标题省略)
  54 + Card_12 = '12', // 无图卡人民号
  55 + Card_13 = '13', // 单图卡--同6
  56 + Card_14 = '14', // 单图卡人民号
  57 + Card_15 = '15', // 大图卡人民号
  58 + Card_16 = '16', // 三图卡人民号
  59 + Card_17 = '17', // 图卡集
60 Card_18 = '18', // 图卡集人民号 60 Card_18 = '18', // 图卡集人民号
61 - Card_19 = '19', // 动态图文卡人民号---1  
62 - Card_20 = '20', // 动态视频卡人民号---1  
63 - Card_21 = '21', // 小视频卡人民号---1 61 + Card_19 = '19', // 动态图文卡人民号
  62 + Card_20 = '20', // 动态视频卡人民号
  63 + Card_21 = '21', // 小视频卡人民号
64 Card_22 = '22', // 时间链 64 Card_22 = '22', // 时间链
65 Card_23 = '23', // 问政卡 65 Card_23 = '23', // 问政卡
66 } 66 }
@@ -4,6 +4,7 @@ export interface VideoInfoDTO { @@ -4,6 +4,7 @@ export interface VideoInfoDTO {
4 resolutionWidth: number; 4 resolutionWidth: number;
5 videoDuration: number; // 视频时长 5 videoDuration: number; // 视频时长
6 videoLandScape: number; // 1横屏 2竖屏 6 videoLandScape: number; // 1横屏 2竖屏
  7 + videoLandscape: number; // 1横屏 2竖屏
7 videoType: number; 8 videoType: number;
8 videoUrl: string; //视频播放地址 9 videoUrl: string; //视频播放地址
9 firstFrameImageUri: string; // 首帧图;【视频内容,contentPictures中】 10 firstFrameImageUri: string; // 首帧图;【视频内容,contentPictures中】
@@ -16,6 +16,7 @@ import { ZhGridLayout03 } from './compview/ZhGridLayout03'; @@ -16,6 +16,7 @@ import { ZhGridLayout03 } from './compview/ZhGridLayout03';
16 import { CardParser } from './CardParser'; 16 import { CardParser } from './CardParser';
17 import { LiveHorizontalReservationComponent } from './view/LiveHorizontalReservationComponent'; 17 import { LiveHorizontalReservationComponent } from './view/LiveHorizontalReservationComponent';
18 import { ZhGridLayout02 } from './compview/ZhGridLayout02'; 18 import { ZhGridLayout02 } from './compview/ZhGridLayout02';
  19 +import { Card5Component } from './cardview/Card5Component'
19 20
20 /** 21 /**
21 * comp适配器. 22 * comp适配器.
@@ -53,6 +54,9 @@ export struct CompParser { @@ -53,6 +54,9 @@ export struct CompParser {
53 ZhGridLayout03({ compDTO: compDTO }) 54 ZhGridLayout03({ compDTO: compDTO })
54 } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_04) { 55 } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_04) {
55 ZhSingleRow04({ compDTO: compDTO }) 56 ZhSingleRow04({ compDTO: compDTO })
  57 + } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
  58 + //头图卡 和comStyle 2相同,
  59 + Card5Component({ contentDTO: compDTO.operDataList[0] })
56 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_04) { 60 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
57 ZhSingleColumn04({ compDTO: compDTO }) 61 ZhSingleColumn04({ compDTO: compDTO })
58 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_05) { 62 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
@@ -14,7 +14,6 @@ import { CommonConstants } from 'wdConstant/Index'; @@ -14,7 +14,6 @@ import { CommonConstants } from 'wdConstant/Index';
14 14
15 const TAG = 'BroadcastPageComponent'; 15 const TAG = 'BroadcastPageComponent';
16 16
17 -@Entry  
18 @Component 17 @Component
19 export struct BroadcastPageComponent { 18 export struct BroadcastPageComponent {
20 @State params:Params = router.getParams() as Params; 19 @State params:Params = router.getParams() as Params;
@@ -4,7 +4,6 @@ import { CommonConstants } from 'wdConstant/Index'; @@ -4,7 +4,6 @@ import { CommonConstants } from 'wdConstant/Index';
4 /** 4 /**
5 * 今日推荐顶部标题--fixed标题 5 * 今日推荐顶部标题--fixed标题
6 */ 6 */
7 -@Entry  
8 @Component 7 @Component
9 export struct RecommendHeader { 8 export struct RecommendHeader {
10 build() { 9 build() {
@@ -4,7 +4,6 @@ import { ProcessUtils } from '../../utils/ProcessUtils'; @@ -4,7 +4,6 @@ import { ProcessUtils } from '../../utils/ProcessUtils';
4 /** 4 /**
5 * 播报--今日推荐列表 5 * 播报--今日推荐列表
6 */ 6 */
7 -@Entry  
8 @Component 7 @Component
9 export struct RecommendLists { 8 export struct RecommendLists {
10 @Prop recommendCompInfoBean: CompInfoBean = {} as CompInfoBean // 推荐-组件信息 9 @Prop recommendCompInfoBean: CompInfoBean = {} as CompInfoBean // 推荐-组件信息
@@ -3,7 +3,6 @@ import { DateTimeUtils } from 'wdKit'; @@ -3,7 +3,6 @@ import { DateTimeUtils } from 'wdKit';
3 /** 3 /**
4 * 播报标题描述 4 * 播报标题描述
5 */ 5 */
6 -@Entry  
7 @Component 6 @Component
8 export struct RecommendTitle { 7 export struct RecommendTitle {
9 build() { 8 build() {
@@ -5,7 +5,6 @@ import { ProcessUtils } from '../../utils/ProcessUtils'; @@ -5,7 +5,6 @@ import { ProcessUtils } from '../../utils/ProcessUtils';
5 /** 5 /**
6 * 精选栏目 6 * 精选栏目
7 */ 7 */
8 -@Entry  
9 @Component 8 @Component
10 export struct SelectedColumns { 9 export struct SelectedColumns {
11 @Prop columnsCompInfoBean: CompInfoBean = {} as CompInfoBean // 精选栏目组件信息 10 @Prop columnsCompInfoBean: CompInfoBean = {} as CompInfoBean // 精选栏目组件信息
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 import { RmhInfoDTO } from 'wdBean' 4 import { RmhInfoDTO } from 'wdBean'
5 import { CommonConstants } from 'wdConstant/Index'; 5 import { CommonConstants } from 'wdConstant/Index';
6 6
7 -@Entry  
8 @Component 7 @Component
9 export struct RmhTitle { 8 export struct RmhTitle {
10 @Prop rmhInfo: RmhInfoDTO 9 @Prop rmhInfo: RmhInfoDTO
@@ -2,11 +2,12 @@ @@ -2,11 +2,12 @@
2 import { CommonConstants } from 'wdConstant' 2 import { CommonConstants } from 'wdConstant'
3 import { ContentDTO } from 'wdBean' 3 import { ContentDTO } from 'wdBean'
4 import { DateTimeUtils } from 'wdKit' 4 import { DateTimeUtils } from 'wdKit'
  5 +import { ProcessUtils } from '../../utils/ProcessUtils';
5 6
6 const TAG = 'Card11Component'; 7 const TAG = 'Card11Component';
7 8
8 /** 9 /**
9 - * 无图卡(标题省略) 10 + * 无图卡(标题省略) Card_11 = '11
10 */ 11 */
11 @Component 12 @Component
12 export struct Card11Component { 13 export struct Card11Component {
@@ -21,33 +22,38 @@ export struct Card11Component { @@ -21,33 +22,38 @@ export struct Card11Component {
21 .textOverflow({ overflow: TextOverflow.Ellipsis }) 22 .textOverflow({ overflow: TextOverflow.Ellipsis })
22 .width(CommonConstants.FULL_WIDTH) 23 .width(CommonConstants.FULL_WIDTH)
23 Row() { 24 Row() {
24 - Text("锐评")  
25 - .fontSize($r("app.float.font_size_12"))  
26 - .fontColor($r("app.color.color_ED2800"))  
27 - Text(this.contentDTO.source)  
28 - .fontSize($r("app.float.font_size_12"))  
29 - .fontColor($r("app.color.color_B0B0B0"))  
30 - .margin({ left: 6 })  
31 - Image($r("app.media.point"))  
32 - .width(16)  
33 - .height(16) 25 + if (this.contentDTO.source) {
  26 + Text(this.contentDTO.source)
  27 + .fontSize($r("app.float.font_size_12"))
  28 + .fontColor($r("app.color.color_B0B0B0"))
  29 + .margin({ left: 6 })
  30 + Image($r("app.media.point"))
  31 + .width(16)
  32 + .height(16)
  33 + }
34 34
35 - Text(DateTimeUtils.formatDate(Number.parseFloat(this.contentDTO.publishTime))) 35 + Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)))
36 .fontSize($r("app.float.font_size_12")) 36 .fontSize($r("app.float.font_size_12"))
37 .fontColor($r("app.color.color_B0B0B0")) 37 .fontColor($r("app.color.color_B0B0B0"))
38 - 38 + .margin({ right: 6 })
  39 + // TODO '评论取哪个字段'
  40 + // Text(`1806评`)
  41 + // .fontSize($r("app.float.font_size_12"))
  42 + // .fontColor($r("app.color.color_B0B0B0"))
39 }.width(CommonConstants.FULL_WIDTH) 43 }.width(CommonConstants.FULL_WIDTH)
40 .justifyContent(FlexAlign.Start) 44 .justifyContent(FlexAlign.Start)
41 .margin({ top: 8 }) 45 .margin({ top: 8 })
42 46
43 }.width(CommonConstants.FULL_WIDTH) 47 }.width(CommonConstants.FULL_WIDTH)
44 .padding({ 48 .padding({
45 - top: 14,  
46 - left: 16,  
47 - right: 16,  
48 - bottom: 14 49 + left: $r('app.float.card_comp_pagePadding_lf'),
  50 + right: $r('app.float.card_comp_pagePadding_lf'),
  51 + top: $r('app.float.card_comp_pagePadding_tb'),
  52 + bottom: $r('app.float.card_comp_pagePadding_tb')
49 }) 53 })
50 .backgroundColor($r("app.color.white")) 54 .backgroundColor($r("app.color.white"))
51 - .margin({ bottom: 8 }) 55 + .onClick((event: ClickEvent) => {
  56 + ProcessUtils.processPage(this.contentDTO)
  57 + })
52 } 58 }
53 } 59 }
@@ -3,12 +3,13 @@ import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'; @@ -3,12 +3,13 @@ import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO';
3 import { CommonConstants } from 'wdConstant/Index'; 3 import { CommonConstants } from 'wdConstant/Index';
4 import { DateTimeUtils } from 'wdKit'; 4 import { DateTimeUtils } from 'wdKit';
5 import { WDRouterRule } from 'wdRouter'; 5 import { WDRouterRule } from 'wdRouter';
  6 +import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
6 7
7 const TAG = 'Card17Component'; 8 const TAG = 'Card17Component';
8 -/**  
9 -* 图卡集---2  
10 -*/  
11 9
  10 +/**
  11 + * 图卡集---2
  12 + */
12 @Component 13 @Component
13 export struct Card17Component { 14 export struct Card17Component {
14 @State compDTO: CompDTO = {} as CompDTO 15 @State compDTO: CompDTO = {} as CompDTO
@@ -18,82 +19,54 @@ export struct Card17Component { @@ -18,82 +19,54 @@ export struct Card17Component {
18 Column({ space: 8 }) { 19 Column({ space: 8 }) {
19 Text(this.contentDTO.newsTitle) 20 Text(this.contentDTO.newsTitle)
20 .textOverflow({ overflow: TextOverflow.Ellipsis }) 21 .textOverflow({ overflow: TextOverflow.Ellipsis })
21 - .fontSize(17)  
22 - .fontColor(0x222222) 22 + .fontSize($r('app.float.font_size_17'))
  23 + .fontColor($r('app.color.color_222222'))
23 .lineHeight(25) 24 .lineHeight(25)
24 .maxLines(3) 25 .maxLines(3)
25 .width(CommonConstants.FULL_WIDTH) 26 .width(CommonConstants.FULL_WIDTH)
26 27
27 - RelativeContainer() {  
28 - Image(this.contentDTO.fullColumnImgUrls[0].url)  
29 - .width('66.6%')  
30 - .aspectRatio(16 / 9)  
31 - .alignRules({  
32 - top: { anchor: "__container__", align: VerticalAlign.Top },  
33 - left: { anchor: "__container__", align: HorizontalAlign.Start }  
34 - })  
35 - .id('mainImage')  
36 -  
37 - Image(this.contentDTO.fullColumnImgUrls[1].url)  
38 - .width('33%')  
39 - .aspectRatio(16 / 9)  
40 - .alignRules({  
41 - top: { anchor: "__container__", align: VerticalAlign.Top },  
42 - right: { anchor: "__container__", align: HorizontalAlign.End }  
43 - })  
44 - .id('subTopImage') 28 + Stack({ alignContent: Alignment.BottomEnd }) {
  29 + // 三个图,
  30 + GridRow({ gutter: 2 }) {
  31 + GridCol({ span: { xs: 8 } }) {
  32 + Image(this.contentDTO.fullColumnImgUrls[0].url)
  33 + .width(CommonConstants.FULL_WIDTH)
  34 + .aspectRatio(16 / 9)
  35 + .borderRadius({
  36 + topLeft: $r('app.float.image_border_radius'),
  37 + bottomLeft: $r('app.float.image_border_radius'),
  38 + })
  39 + }
45 40
46 - Image(this.contentDTO.fullColumnImgUrls[2].url)  
47 - .width('33%')  
48 - .aspectRatio(16 / 9)  
49 - .alignRules({  
50 - right: { anchor: "__container__", align: HorizontalAlign.End },  
51 - bottom: { anchor: "__container__", align: VerticalAlign.Bottom }  
52 - })  
53 - .id('subBottomImage')  
54 - // 下面是渲染右下角图标  
55 - Shape() {  
56 - Rect().width(33).height(18) 41 + GridCol({ span: { xs: 4 } }) {
  42 + Image(this.contentDTO.fullColumnImgUrls[1].url)
  43 + .width(CommonConstants.FULL_WIDTH)
  44 + .aspectRatio(16 / 9)
  45 + .margin({ bottom: 1 })
  46 + .borderRadius({
  47 + topRight: $r('app.float.image_border_radius'),
  48 + })
  49 + }
57 } 50 }
58 - .fill(0x000000)  
59 - .fillOpacity(0.3)  
60 - .strokeLineCap(LineCapStyle.Round)  
61 - .strokeLineJoin(LineJoinStyle.Round)  
62 - .antiAlias(true)  
63 - .id('shape')  
64 - .alignRules({  
65 - right: { anchor: "__container__", align: HorizontalAlign.End },  
66 - bottom: { anchor: "__container__", align: VerticalAlign.Bottom }  
67 - })  
68 - .margin({  
69 - right: 4,  
70 - bottom: 4  
71 - })  
72 51
73 - Image($r('app.media.album_card_shape'))  
74 - .width(22)  
75 - .height(18)  
76 - .alignRules({  
77 - left: { anchor: "shape", align: HorizontalAlign.Start },  
78 - top: { anchor: "shape", align: VerticalAlign.Top }  
79 - })  
80 - .id('shapeSubImage') 52 + GridRow({ gutter: 2 }) {
  53 + GridCol({ span: { xs: 8 } }) {
  54 + }
  55 +
  56 + GridCol({ span: { xs: 4 } }) {
  57 + Image(this.contentDTO.fullColumnImgUrls[2].url)
  58 + .width(CommonConstants.FULL_WIDTH)
  59 + .aspectRatio(16 / 9)
  60 + .margin({ top: 1 })
  61 + .borderRadius({
  62 + bottomRight: $r('app.float.image_border_radius'),
  63 + })
  64 + }
  65 + }
81 66
82 - Text(this.contentDTO.fullColumnImgUrls.length + '')  
83 - .fontSize(13)  
84 - .fontColor(0xFFFFFF)  
85 - .id('pageIndex')  
86 - .alignRules({  
87 - right: { anchor: "shape", align: HorizontalAlign.End },  
88 - top: { anchor: "shape", align: VerticalAlign.Top }  
89 - })  
90 - .margin({ right: 2 })  
91 - .textAlign(TextAlign.Center)  
92 - .width(17)  
93 - .height(17) 67 + CardMediaInfo({ contentDTO: this.contentDTO })
94 } 68 }
95 .width(CommonConstants.FULL_WIDTH) 69 .width(CommonConstants.FULL_WIDTH)
96 - .aspectRatio(24 / 9)  
97 .onClick((event: ClickEvent) => { 70 .onClick((event: ClickEvent) => {
98 let taskAction: Action = { 71 let taskAction: Action = {
99 type: 'JUMP_DETAIL_PAGE', 72 type: 'JUMP_DETAIL_PAGE',
@@ -112,23 +85,17 @@ export struct Card17Component { @@ -112,23 +85,17 @@ export struct Card17Component {
112 Row() { 85 Row() {
113 if (this.contentDTO.source) { 86 if (this.contentDTO.source) {
114 Text(this.contentDTO.source) 87 Text(this.contentDTO.source)
115 - .fontSize(13)  
116 - .fontColor(0xB0B0B0) 88 + .fontSize($r('app.float.font_size_13'))
  89 + .fontColor($r('app.color.color_B0B0B0'))
117 Image($r('app.media.point')) 90 Image($r('app.media.point'))
118 .width(16) 91 .width(16)
119 .height(16) 92 .height(16)
120 } 93 }
121 if (this.contentDTO.publishTime && this.contentDTO.publishTime.length === 13) { 94 if (this.contentDTO.publishTime && this.contentDTO.publishTime.length === 13) {
122 Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime))) 95 Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)))
123 - .fontSize(13)  
124 - .fontColor(0xB0B0B0) 96 + .fontSize($r('app.float.font_size_13'))
  97 + .fontColor($r('app.color.color_B0B0B0'))
125 } 98 }
126 - Text('328评')  
127 - .fontSize(13)  
128 - .fontColor(0xB0B0B0)  
129 - .margin({  
130 - left: 6  
131 - })  
132 } 99 }
133 .width(CommonConstants.FULL_WIDTH) 100 .width(CommonConstants.FULL_WIDTH)
134 .height(16) 101 .height(16)
@@ -136,10 +103,10 @@ export struct Card17Component { @@ -136,10 +103,10 @@ export struct Card17Component {
136 } 103 }
137 .width(CommonConstants.FULL_WIDTH) 104 .width(CommonConstants.FULL_WIDTH)
138 .padding({ 105 .padding({
139 - top: 14,  
140 - left: 16,  
141 - right: 16,  
142 - bottom: 14 106 + left: $r('app.float.card_comp_pagePadding_lf'),
  107 + right: $r('app.float.card_comp_pagePadding_lf'),
  108 + top: $r('app.float.card_comp_pagePadding_tb'),
  109 + bottom: $r('app.float.card_comp_pagePadding_tb')
143 }) 110 })
144 } 111 }
145 } 112 }
@@ -6,7 +6,6 @@ const TAG = 'Card19Component'; @@ -6,7 +6,6 @@ const TAG = 'Card19Component';
6 /** 6 /**
7 * 人民号-动态---19:动态图文卡人民号; 从无图--9图 7 * 人民号-动态---19:动态图文卡人民号; 从无图--9图
8 */ 8 */
9 -@Entry  
10 @Component 9 @Component
11 export struct Card19Component { 10 export struct Card19Component {
12 @State contentDTO: ContentDTO = { 11 @State contentDTO: ContentDTO = {
@@ -8,7 +8,6 @@ const TAG = 'Card20Component'; @@ -8,7 +8,6 @@ const TAG = 'Card20Component';
8 /** 8 /**
9 * 人民号-动态---20:动态视频卡人民号 分横屏和竖屏; 9 * 人民号-动态---20:动态视频卡人民号 分横屏和竖屏;
10 */ 10 */
11 -@Entry  
12 @Component 11 @Component
13 export struct Card20Component { 12 export struct Card20Component {
14 @State contentDTO: ContentDTO = { 13 @State contentDTO: ContentDTO = {
1 //全标题 "appStyle":"2", 1 //全标题 "appStyle":"2",
2 import { ContentDTO } from 'wdBean'; 2 import { ContentDTO } from 'wdBean';
  3 +import { CommonConstants } from 'wdConstant/Index';
  4 +import { DateTimeUtils } from 'wdKit/Index';
3 import { ProcessUtils } from '../../utils/ProcessUtils'; 5 import { ProcessUtils } from '../../utils/ProcessUtils';
4 - 6 +import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
5 7
6 const TAG: string = 'Card2Component'; 8 const TAG: string = 'Card2Component';
7 9
@@ -12,55 +14,50 @@ const TAG: string = 'Card2Component'; @@ -12,55 +14,50 @@ const TAG: string = 'Card2Component';
12 * 卡片宽度:充满父窗口 14 * 卡片宽度:充满父窗口
13 * 卡片高度,仅包含横板图片:图片高度由图片的宽度及宽高比决定,图片宽度占父窗口'100%',宽高比为16:9: 15 * 卡片高度,仅包含横板图片:图片高度由图片的宽度及宽高比决定,图片宽度占父窗口'100%',宽高比为16:9:
14 */ 16 */
15 -// @Entry  
16 @Component 17 @Component
17 export struct Card2Component { 18 export struct Card2Component {
18 - @State contentDTO: ContentDTO = {} as ContentDTO; 19 + @State contentDTO: ContentDTO = {
  20 + // appStyle: '2',
  21 + // objectType: '1',
  22 + // coverUrl:
  23 + // 'https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404141115457926.png?x-oss-process=image/resize,m_fill,h_450,w_800/quality,q_90',
  24 + // newsTitle: '又见花开!新疆伊犁花海延绵清新怡人',
  25 + // publishTime: '1713067227000',
  26 + // source: '荔枝新闻',
  27 + // videoInfo: {
  28 + // videoDuration: 25,
  29 + // videoLandscape: 1,
  30 + // videoUrl:
  31 + // 'https://rmrbcmsonline.peopleapp.com/upload/video/mp4/202404/1713064515901314d148763996.mp4'
  32 + // }
  33 + } as ContentDTO;
19 34
20 build() { 35 build() {
21 Column() { 36 Column() {
22 -  
23 Column() { 37 Column() {
24 //新闻标题 38 //新闻标题
25 Text(this.contentDTO.newsTitle) 39 Text(this.contentDTO.newsTitle)
26 - .fontSize(17)  
27 - .fontColor('#222222') 40 + .fontSize($r('app.float.font_size_17'))
  41 + .fontColor($r('app.color.color_222222'))
28 .maxLines(3) 42 .maxLines(3)
29 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 43 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
30 .align(Alignment.Start) 44 .align(Alignment.Start)
31 //大图 45 //大图
32 Stack() { 46 Stack() {
33 Image(this.contentDTO.coverUrl) 47 Image(this.contentDTO.coverUrl)
34 - .borderRadius(4)  
35 -  
36 - 48 + .width(CommonConstants.FULL_WIDTH)
  49 + .aspectRatio(16 / 9)
  50 + .borderRadius($r('app.float.image_border_radius'))
37 //播放状态+时长 51 //播放状态+时长
38 - Row() {  
39 - Image($r('app.media.icon_live'))  
40 - .width(22)  
41 - .height(18)  
42 -  
43 - Stack() {  
44 - Text('直播中')  
45 - .fontColor('#FFFFFF')  
46 - .fontSize(11)  
47 - }  
48 - .width(44)  
49 - .height(18)  
50 - .backgroundColor('#4d000000')  
51 - }.margin({ right: 8, bottom: 8 })  
52 - 52 + CardMediaInfo({
  53 + contentDTO: this.contentDTO
  54 + })
53 } 55 }
54 - .width('100%')  
55 - .height(192)  
56 .alignContent(Alignment.BottomEnd) 56 .alignContent(Alignment.BottomEnd)
57 .margin({ top: 8 }) 57 .margin({ top: 8 })
58 -  
59 } 58 }
60 - .width('100%')  
61 - .justifyContent(FlexAlign.Start) 59 + .width(CommonConstants.FULL_WIDTH)
62 .alignItems(HorizontalAlign.Start) 60 .alignItems(HorizontalAlign.Start)
63 - .padding({ top: 14 })  
64 61
65 //bottom 62 //bottom
66 Row() { 63 Row() {
@@ -71,22 +68,21 @@ export struct Card2Component { @@ -71,22 +68,21 @@ export struct Card2Component {
71 .width(12) 68 .width(12)
72 .height(12) 69 .height(12)
73 70
74 - Text(this.contentDTO.source)  
75 - .bottomTextStyle()  
76 - Text(' ')  
77 -  
78 - Text(this.contentDTO.subtitle) 71 + Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)))
79 .bottomTextStyle() 72 .bottomTextStyle()
80 -  
81 } 73 }
82 - .width('100%') 74 + .width(CommonConstants.FULL_WIDTH)
83 .height(18) 75 .height(18)
84 .justifyContent(FlexAlign.Start) 76 .justifyContent(FlexAlign.Start)
85 - // .padding({bottom:14})  
86 .margin({ top: 8 }) 77 .margin({ top: 8 })
87 } 78 }
88 - .width('100%')  
89 - .padding({ left: 16, right: 16 }) 79 + .width(CommonConstants.FULL_WIDTH)
  80 + .padding({
  81 + left: $r('app.float.card_comp_pagePadding_lf'),
  82 + right: $r('app.float.card_comp_pagePadding_lf'),
  83 + top: $r('app.float.card_comp_pagePadding_tb'),
  84 + bottom: $r('app.float.card_comp_pagePadding_tb')
  85 + })
90 .onClick((event: ClickEvent) => { 86 .onClick((event: ClickEvent) => {
91 ProcessUtils.processPage(this.contentDTO) 87 ProcessUtils.processPage(this.contentDTO)
92 }) 88 })
@@ -5,10 +5,21 @@ import { ProcessUtils } from '../../utils/ProcessUtils'; @@ -5,10 +5,21 @@ import { ProcessUtils } from '../../utils/ProcessUtils';
5 5
6 /** 6 /**
7 * 卡片样式:"appStyle":"3" 7 * 卡片样式:"appStyle":"3"
  8 + * Card_03 = '3', // 无图卡(全标题)
8 */ 9 */
9 @Component 10 @Component
10 export struct Card3Component { 11 export struct Card3Component {
11 - @State contentDTO: ContentDTO = {} as ContentDTO; 12 + @State contentDTO: ContentDTO = {
  13 + // appStyle: '3',
  14 + // channelId: '2002',
  15 + // newsTitle: '习近平向斯洛伐克当选总统佩',
  16 + // objectId: '30044351686',
  17 + // objectType: '8',
  18 + // publishTime: '1712967589000',
  19 + // relId: '500005307414',
  20 + // relType: '1',
  21 + // source: '新华社',
  22 + } as ContentDTO;
12 23
13 build() { 24 build() {
14 Column() { 25 Column() {
@@ -17,35 +28,37 @@ export struct Card3Component { @@ -17,35 +28,37 @@ export struct Card3Component {
17 .fontColor($r("app.color.color_222222")) 28 .fontColor($r("app.color.color_222222"))
18 .width(CommonConstants.FULL_WIDTH) 29 .width(CommonConstants.FULL_WIDTH)
19 Row() { 30 Row() {
20 - Text("锐评")  
21 - .fontSize($r("app.float.font_size_12"))  
22 - .fontColor($r("app.color.color_ED2800"))  
23 - Text(this.contentDTO.source)  
24 - .fontSize($r("app.float.font_size_12"))  
25 - .fontColor($r("app.color.color_B0B0B0"))  
26 - .margin({ left: 6 })  
27 - Image($r("app.media.point"))  
28 - .width(16)  
29 - .height(16)  
30 -  
31 - Text(DateTimeUtils.formatDate(Number.parseFloat(this.contentDTO.publishTime))) 31 + // TODO "锐评"取得哪个字段,什么时候显示。
  32 + // Text("锐评")
  33 + // .fontSize($r("app.float.font_size_12"))
  34 + // .fontColor($r("app.color.color_ED2800"))
  35 + if(this.contentDTO.source) {
  36 + Text(this.contentDTO.source)
  37 + .fontSize($r("app.float.font_size_12"))
  38 + .fontColor($r("app.color.color_B0B0B0"))
  39 + Image($r("app.media.point"))
  40 + .width(16)
  41 + .height(16)
  42 + }
  43 + Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)))
32 .fontSize($r("app.float.font_size_12")) 44 .fontSize($r("app.float.font_size_12"))
33 .fontColor($r("app.color.color_B0B0B0")) 45 .fontColor($r("app.color.color_B0B0B0"))
34 - 46 + .margin({ right: 6 })
  47 + // TODO '评论取哪个字段'
  48 + // Text(`1806评`)
  49 + // .fontSize($r("app.float.font_size_12"))
  50 + // .fontColor($r("app.color.color_B0B0B0"))
35 }.width(CommonConstants.FULL_WIDTH) 51 }.width(CommonConstants.FULL_WIDTH)
36 .justifyContent(FlexAlign.Start) 52 .justifyContent(FlexAlign.Start)
37 .margin({ top: 8 }) 53 .margin({ top: 8 })
38 -  
39 } 54 }
40 - .width("100%") 55 + .width(CommonConstants.FULL_WIDTH)
41 .padding({ 56 .padding({
42 - top: 14,  
43 - left: 16,  
44 - right: 16,  
45 - bottom: 14 57 + left: $r('app.float.card_comp_pagePadding_lf'),
  58 + right: $r('app.float.card_comp_pagePadding_lf'),
  59 + top: $r('app.float.card_comp_pagePadding_tb'),
  60 + bottom: $r('app.float.card_comp_pagePadding_tb')
46 }) 61 })
47 - .backgroundColor($r("app.color.white"))  
48 - .margin({ bottom: 8 })  
49 .onClick((event: ClickEvent) => { 62 .onClick((event: ClickEvent) => {
50 ProcessUtils.processPage(this.contentDTO) 63 ProcessUtils.processPage(this.contentDTO)
51 }) 64 })
1 -//全标题 "appStyle":"4",  
2 -import { ContentDTO } from 'wdBean'; 1 +import { ContentDTO, FullColumnImgUrlDTO } from 'wdBean';
  2 +import { CommonConstants } from 'wdConstant/Index';
3 import { ProcessUtils } from '../../utils/ProcessUtils'; 3 import { ProcessUtils } from '../../utils/ProcessUtils';
  4 +import { DateTimeUtils } from 'wdKit/Index';
4 5
5 const TAG: string = 'Card4Component'; 6 const TAG: string = 'Card4Component';
6 7
@@ -13,50 +14,100 @@ const TAG: string = 'Card4Component'; @@ -13,50 +14,100 @@ const TAG: string = 'Card4Component';
13 */ 14 */
14 @Component 15 @Component
15 export struct Card4Component { 16 export struct Card4Component {
16 - @State contentDTO: ContentDTO = {} as ContentDTO; 17 + @State contentDTO: ContentDTO = {
  18 + // appStyle: '4',
  19 + // fullColumnImgUrls: [
  20 + // {
  21 + // format: null,
  22 + // fullUrl: '',
  23 + // height: 187,
  24 + // landscape: 1,
  25 + // size: 1,
  26 + // url: 'https://rmrbcmsonline.peopleapp.com/upload/article_resource/image/1648118198_0c20f7c31c7b4eca6b0d0871e7771c62.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90',
  27 + // weight: 248
  28 + // },
  29 + // {
  30 + // format: null,
  31 + // fullUrl: '',
  32 + // height: 187,
  33 + // landscape: 1,
  34 + // size: 1,
  35 + // url: 'https://rmrbcmsonline.peopleapp.com/upload/article_resource/image/1648118198_0c20f7c31c7b4eca6b0d0871e7771c62.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90',
  36 + // weight: 248
  37 + // },
  38 + // {
  39 + // format: null,
  40 + // fullUrl: '',
  41 + // height: 187,
  42 + // landscape: 1,
  43 + // size: 1,
  44 + // url: 'https://rmrbcmsonline.peopleapp.com/upload/article_resource/image/1648118200_d10309bee894a67311e6c8f77df676d4.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90',
  45 + // weight: 248
  46 + // },
  47 + // {
  48 + // format: null,
  49 + // fullUrl: '',
  50 + // height: 187,
  51 + // landscape: 1,
  52 + // size: 1,
  53 + // url: 'https://rmrbcmsonline.peopleapp.com/upload/article_resource/image/1648118202_f33743e452fb69ee2c45c18a56eccdf6.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90',
  54 + // weight: 248
  55 + // }
  56 + // ],
  57 + // newsTitle: '科普:如何发现家中是否有白蚁危害?丨又到白蚁分飞季②',
  58 + // rmhInfo: {
  59 + // authIcon:
  60 + // 'https://cdnjdphoto.aikan.pdnews.cn/creator-category/icon/auth/blue.png',
  61 + // authTitle: '封面新闻',
  62 + // rmhDesc: '封面新闻,亿万年轻人的生活方式。',
  63 + // rmhHeadUrl:
  64 + // 'https://cdnjdphoto.aikan.pdnews.cn/image/creator/rmh/20221212/122faff796.jpeg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg',
  65 + // rmhId: '2016608',
  66 + // rmhName: '封面新闻',
  67 + // userId: '522390888224390',
  68 + // userType: '2'
  69 + // },
  70 + // source: '头条号',
  71 + // publishTime: '1651204607000',
  72 + } as ContentDTO;
17 73
18 build() { 74 build() {
19 Column() { 75 Column() {
20 -  
21 -  
22 //body 76 //body
23 Column() { 77 Column() {
24 //新闻标题 78 //新闻标题
25 Text(this.contentDTO.newsTitle) 79 Text(this.contentDTO.newsTitle)
26 - .fontSize(17)  
27 - .fontColor('#222222') 80 + .fontSize($r('app.float.font_size_17'))
  81 + .fontColor($r('app.color.color_222222'))
28 .maxLines(3) 82 .maxLines(3)
29 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 83 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
30 //三图 84 //三图
31 Row() { 85 Row() {
32 - Image(this.contentDTO.fullColumnImgUrls[0]?.url)  
33 - .width('32%')  
34 -  
35 - .height(75)  
36 - .borderRadius({ topLeft:4,bottomLeft:4 })  
37 -  
38 - Image(this.contentDTO.fullColumnImgUrls[1]?.url)  
39 - .width('32%')  
40 - .height(75)  
41 -  
42 - Image(this.contentDTO.fullColumnImgUrls[2]?.url)  
43 - .width('32%')  
44 - .height(75)  
45 - .borderRadius({ topRight:4,bottomRight:4 })  
46 - 86 + GridRow({ gutter: 2 }) {
  87 + ForEach(this.contentDTO.fullColumnImgUrls, (item: FullColumnImgUrlDTO, index: number) => {
  88 + if (index < 3) {
  89 + GridCol({ span: { xs: 4 } }) {
  90 + Image(item.url)
  91 + .width('100%')
  92 + .aspectRatio(113 / 75)
  93 + .borderRadius({
  94 + topLeft: index === 0 ? $r('app.float.image_border_radius') : 0,
  95 + topRight: index === 2 ? $r('app.float.image_border_radius') : 0,
  96 + bottomLeft: index === 0 ? $r('app.float.image_border_radius') : 0,
  97 + bottomRight: index === 2 ? $r('app.float.image_border_radius') : 0,
  98 + })
  99 + }
  100 + }
  101 + })
  102 + }
47 } 103 }
48 - .justifyContent(FlexAlign.SpaceBetween)  
49 .width('100%') 104 .width('100%')
50 - .height(75)  
51 - .margin({top:8})  
52 - .borderRadius(8)  
53 - 105 + .margin({ top: 8 })
54 } 106 }
55 .width('100%') 107 .width('100%')
56 .justifyContent(FlexAlign.Start) 108 .justifyContent(FlexAlign.Start)
57 .alignItems(HorizontalAlign.Start) 109 .alignItems(HorizontalAlign.Start)
58 - .padding({top:14})  
59 - .onClick((event: ClickEvent)=>{ 110 + .onClick((event: ClickEvent) => {
60 ProcessUtils.processPage(this.contentDTO) 111 ProcessUtils.processPage(this.contentDTO)
61 }) 112 })
62 113
@@ -69,31 +120,29 @@ export struct Card4Component { @@ -69,31 +120,29 @@ export struct Card4Component {
69 Image($r('app.media.point')) 120 Image($r('app.media.point'))
70 .width(12) 121 .width(12)
71 .height(12) 122 .height(12)
72 -  
73 - Text(this.contentDTO.publishTime)  
74 - .bottomTextStyle()  
75 - Text(' ')  
76 -  
77 - Text('518条评论') 123 + Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)))
78 .bottomTextStyle() 124 .bottomTextStyle()
79 - 125 + // TODO 评论字段取值
  126 + // Text('518条评论')
  127 + // .bottomTextStyle()
80 } 128 }
81 .width('100%') 129 .width('100%')
82 -  
83 .justifyContent(FlexAlign.Start) 130 .justifyContent(FlexAlign.Start)
84 - // .padding({bottom:14})  
85 - .margin({top:8})  
86 - .padding({bottom:14})  
87 - 131 + .margin({ top: 8 })
88 } 132 }
89 - .width('100%')  
90 - .padding({top:8,left:16,right:16})  
91 - 133 + .width(CommonConstants.FULL_WIDTH)
  134 + .padding({
  135 + left: $r('app.float.card_comp_pagePadding_lf'),
  136 + right: $r('app.float.card_comp_pagePadding_lf'),
  137 + top: $r('app.float.card_comp_pagePadding_tb'),
  138 + bottom: $r('app.float.card_comp_pagePadding_tb')
  139 + })
92 } 140 }
93 } 141 }
94 142
95 143
96 -@Extend(Text) function bottomTextStyle() { 144 +@Extend(Text)
  145 +function bottomTextStyle() {
97 .fontSize(12) 146 .fontSize(12)
98 .fontColor('#B0B0B0') 147 .fontColor('#B0B0B0')
99 } 148 }
@@ -5,11 +5,21 @@ import { ProcessUtils } from '../../utils/ProcessUtils'; @@ -5,11 +5,21 @@ import { ProcessUtils } from '../../utils/ProcessUtils';
5 const TAG: string = 'Card5Component'; 5 const TAG: string = 'Card5Component';
6 6
7 /** 7 /**
8 - * 卡片样式:"appStyle":"5" 8 + * 卡片样式:"appStyle":"5" 头图卡
9 */ 9 */
  10 +// @Entry
10 @Component 11 @Component
11 export struct Card5Component { 12 export struct Card5Component {
12 - @State contentDTO: ContentDTO = {} as ContentDTO; 13 + @State contentDTO: ContentDTO = {
  14 + // coverSize: '850*478',
  15 + // coverType: 1,
  16 + // coverUrl:
  17 + // 'https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20240323/image/display/54ce2de0d20842839e96a644c78361b7.jpg?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
  18 + // linkUrl:
  19 + // 'https://pd-people-uat.pdnews.cn/h/atv/collect/1000000472?hiddenNavigator=1',
  20 + // newsTitle: '今天是周日,天气阴天,明天是周一。',
  21 + // objectType: '6'
  22 + } as ContentDTO;
13 23
14 build() { 24 build() {
15 Stack() { 25 Stack() {
@@ -43,8 +53,12 @@ export struct Card5Component { @@ -43,8 +53,12 @@ export struct Card5Component {
43 } 53 }
44 .alignContent(Alignment.Bottom) 54 .alignContent(Alignment.Bottom)
45 .width(CommonConstants.FULL_WIDTH) 55 .width(CommonConstants.FULL_WIDTH)
46 - .padding(  
47 - { top: 16, bottom: 16, left: 14, right: 14 }) 56 + .padding({
  57 + left: $r('app.float.card_comp_pagePadding_lf'),
  58 + right: $r('app.float.card_comp_pagePadding_lf'),
  59 + top: $r('app.float.card_comp_pagePadding_tb'),
  60 + bottom: $r('app.float.card_comp_pagePadding_tb')
  61 + })
48 .onClick((event: ClickEvent) => { 62 .onClick((event: ClickEvent) => {
49 ProcessUtils.processPage(this.contentDTO) 63 ProcessUtils.processPage(this.contentDTO)
50 }) 64 })
@@ -3,11 +3,11 @@ import { CommonConstants, CompStyle } from 'wdConstant'; @@ -3,11 +3,11 @@ import { CommonConstants, CompStyle } from 'wdConstant';
3 import { DateTimeUtils } from 'wdKit'; 3 import { DateTimeUtils } from 'wdKit';
4 import { ProcessUtils } from '../../utils/ProcessUtils'; 4 import { ProcessUtils } from '../../utils/ProcessUtils';
5 5
6 -const TAG: string = 'Card6Component'; 6 +const TAG: string = 'Card6Component-Card13Component';
7 const FULL_PARENT: string = '100%'; 7 const FULL_PARENT: string = '100%';
8 8
9 /** 9 /**
10 - * 卡片样式:"appStyle":"6" 10 + * 卡片样式:"appStyle":"6"以及13
11 */ 11 */
12 @Component 12 @Component
13 export struct Card6Component { 13 export struct Card6Component {
@@ -8,7 +8,6 @@ const TAG = 'Zh_Single_Column-04'; @@ -8,7 +8,6 @@ const TAG = 'Zh_Single_Column-04';
8 * 人民号主题卡 8 * 人民号主题卡
9 * 枚举值 Zh_Single_Column-04 9 * 枚举值 Zh_Single_Column-04
10 */ 10 */
11 -@Entry  
12 @Component 11 @Component
13 export struct ZhSingleColumn04 { 12 export struct ZhSingleColumn04 {
14 @State compDTO: CompDTO = {} as CompDTO 13 @State compDTO: CompDTO = {} as CompDTO
@@ -8,7 +8,6 @@ const TAG = 'Zh_Single_Column-05'; @@ -8,7 +8,6 @@ const TAG = 'Zh_Single_Column-05';
8 * 人民号入住卡 8 * 人民号入住卡
9 * 枚举值 Zh_Single_Column-05 9 * 枚举值 Zh_Single_Column-05
10 */ 10 */
11 -@Entry  
12 @Component 11 @Component
13 export struct ZhSingleColumn05 { 12 export struct ZhSingleColumn05 {
14 @State compDTO: CompDTO = {} as CompDTO 13 @State compDTO: CompDTO = {} as CompDTO
@@ -54,7 +54,6 @@ export struct BannerComponent { @@ -54,7 +54,6 @@ export struct BannerComponent {
54 .cachedCount(2) 54 .cachedCount(2)
55 .index(1) // The default index of Swiper. 55 .index(1) // The default index of Swiper.
56 .autoPlay(true) 56 .autoPlay(true)
57 - .interval(DurationEnum.DURATION_4)  
58 .indicator(Indicator.dot() 57 .indicator(Indicator.dot()
59 .right(5) 58 .right(5)
60 .itemWidth(4) 59 .itemWidth(4)
@@ -62,7 +61,6 @@ export struct BannerComponent { @@ -62,7 +61,6 @@ export struct BannerComponent {
62 .selectedItemWidth(10) 61 .selectedItemWidth(10)
63 .selectedItemHeight(6)) 62 .selectedItemHeight(6))
64 .loop(true) 63 .loop(true)
65 - .duration(DurationEnum.DURATION_4)  
66 .vertical(false) 64 .vertical(false)
67 .curve(Curve.Linear) 65 .curve(Curve.Linear)
68 .onChange((index: number) => { 66 .onChange((index: number) => {
@@ -9,7 +9,6 @@ const TAG = 'LabelComponent'; @@ -9,7 +9,6 @@ const TAG = 'LabelComponent';
9 * Label-03 9 * Label-03
10 * 重磅推荐/精选/电视剧/电影/综艺/短剧/更多>/ 10 * 重磅推荐/精选/电视剧/电影/综艺/短剧/更多>/
11 */ 11 */
12 -@Entry  
13 @Component 12 @Component
14 export struct LabelComponent { 13 export struct LabelComponent {
15 @State compDTO: CompDTO = {} as CompDTO 14 @State compDTO: CompDTO = {} as CompDTO