陈剑华

开篇12 14 16联调

@@ -16,7 +16,7 @@ export const enum CompStyle { @@ -16,7 +16,7 @@ export const enum CompStyle {
16 Single_Column_05 = 'Single_Column-05', // 海报图卡:/ 16 Single_Column_05 = 'Single_Column-05', // 海报图卡:/
17 Single_Column_06 = 'Single_Column-06', // 留言板卡:/ 17 Single_Column_06 = 'Single_Column-06', // 留言板卡:/
18 Grid_Layout_01 = 'Grid_Layout-01', // 横屏宫格卡:视频、直播 18 Grid_Layout_01 = 'Grid_Layout-01', // 横屏宫格卡:视频、直播
19 - Grid_Layout_02 = 'Grid_Layout-02', // 竖屏宫格卡:视频、直播、榜单 19 + Grid_Layout_02 = 'Grid_Layout-02', // 竖屏宫格卡 :视频、直播、榜单
20 Masonry_Layout_01 = 'Masonry_Layout-01', // 双列瀑布流/瀑布流卡:视频、直播、专题、活动 20 Masonry_Layout_01 = 'Masonry_Layout-01', // 双列瀑布流/瀑布流卡:视频、直播、专题、活动
21 21
22 22
@@ -8,8 +8,11 @@ import { Card6Component } from './cardview/Card6Component'; @@ -8,8 +8,11 @@ import { Card6Component } from './cardview/Card6Component';
8 import { Card9Component } from './cardview/Card9Component'; 8 import { Card9Component } from './cardview/Card9Component';
9 import { Card10Component } from './cardview/Card10Component'; 9 import { Card10Component } from './cardview/Card10Component';
10 import { Card11Component } from './cardview/Card11Component'; 10 import { Card11Component } from './cardview/Card11Component';
11 -import { Card17Component } from './cardview/Card17Component'; 11 +import { Card12Component } from './cardview/Card12Component';
  12 +import { Card14Component } from './cardview/Card14Component';
12 import { Card15Component } from './cardview/Card15Component'; 13 import { Card15Component } from './cardview/Card15Component';
  14 +import { Card16Component } from './cardview/Card16Component';
  15 +import { Card17Component } from './cardview/Card17Component';
13 import { Card19Component } from './cardview/Card19Component'; 16 import { Card19Component } from './cardview/Card19Component';
14 import { Card20Component } from './cardview/Card20Component'; 17 import { Card20Component } from './cardview/Card20Component';
15 import { Card21Component } from './cardview/Card21Component'; 18 import { Card21Component } from './cardview/Card21Component';
@@ -45,8 +48,14 @@ export struct CardParser { @@ -45,8 +48,14 @@ export struct CardParser {
45 Card10Component({ contentDTO }) 48 Card10Component({ contentDTO })
46 } else if (contentDTO.appStyle === CompStyle.Card_11) { 49 } else if (contentDTO.appStyle === CompStyle.Card_11) {
47 Card11Component({ contentDTO }) 50 Card11Component({ contentDTO })
  51 + } else if (contentDTO.appStyle === CompStyle.Card_12) {
  52 + Card12Component({ contentDTO })
  53 + } else if (contentDTO.appStyle === CompStyle.Card_14) {
  54 + Card14Component({ contentDTO })
48 } else if (contentDTO.appStyle === CompStyle.Card_15) { 55 } else if (contentDTO.appStyle === CompStyle.Card_15) {
49 Card15Component({ contentDTO }) 56 Card15Component({ contentDTO })
  57 + } else if (contentDTO.appStyle === CompStyle.Card_16) {
  58 + Card16Component({ contentDTO })
50 } else if (contentDTO.appStyle === CompStyle.Card_17) { 59 } else if (contentDTO.appStyle === CompStyle.Card_17) {
51 Card17Component({ contentDTO }) 60 Card17Component({ contentDTO })
52 } else if (contentDTO.appStyle === CompStyle.Card_19) { 61 } else if (contentDTO.appStyle === CompStyle.Card_19) {
@@ -9,6 +9,7 @@ import { @@ -9,6 +9,7 @@ import {
9 import { 9 import {
10 HorizontalStrokeCardThreeTwoRadioForOneComponent 10 HorizontalStrokeCardThreeTwoRadioForOneComponent
11 } from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent'; 11 } from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent';
  12 +import { ZhSingleRow02 } from './compview/ZhSingleRow02';
12 import { ZhSingleRow04 } from './compview/ZhSingleRow04'; 13 import { ZhSingleRow04 } from './compview/ZhSingleRow04';
13 import { ZhSingleColumn04 } from './compview/ZhSingleColumn04'; 14 import { ZhSingleColumn04 } from './compview/ZhSingleColumn04';
14 import { ZhSingleColumn05 } from './compview/ZhSingleColumn05'; 15 import { ZhSingleColumn05 } from './compview/ZhSingleColumn05';
@@ -46,6 +47,8 @@ export struct CompParser { @@ -46,6 +47,8 @@ export struct CompParser {
46 } else { 47 } else {
47 HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: compDTO }) 48 HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: compDTO })
48 } 49 }
  50 + } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_02) {
  51 + ZhSingleRow02({ compDTO })
49 } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_03) { 52 } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_03) {
50 LiveHorizontalReservationComponent({ compDTO: compDTO }) 53 LiveHorizontalReservationComponent({ compDTO: compDTO })
51 } else if (compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) { 54 } else if (compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) {
@@ -2,6 +2,7 @@ import { ContentDTO } from 'wdBean'; @@ -2,6 +2,7 @@ import { ContentDTO } from 'wdBean';
2 import { RmhTitle } from '../cardCommon/RmhTitle' 2 import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
  5 +import { ProcessUtils } from '../../utils/ProcessUtils';
5 6
6 const TAG = 'Card12Component'; 7 const TAG = 'Card12Component';
7 8
@@ -10,39 +11,7 @@ const TAG = 'Card12Component'; @@ -10,39 +11,7 @@ const TAG = 'Card12Component';
10 */ 11 */
11 @Component 12 @Component
12 export struct Card12Component { 13 export struct Card12Component {
13 - @State contentDTO: ContentDTO = {  
14 - appStyle: '20',  
15 - coverType: 1,  
16 - coverUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',  
17 - fullColumnImgUrls: [  
18 - {  
19 - landscape: 1,  
20 - size: 1,  
21 - url: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',  
22 - weight: 1600  
23 - }  
24 - ],  
25 - newsTitle: '好玩!》10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人',  
26 - rmhInfo: {  
27 - authIcon:  
28 - 'https://cdnjdphoto.aikan.pdnews.cn/creator-category/icon/auth/yellow.png',  
29 - authTitle: '10后音乐人王烁然个人人民号',  
30 - authTitle2: '10后音乐人王烁然个人人民号',  
31 - banControl: 0,  
32 - cnIsAttention: 1,  
33 - rmhDesc: '10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人',  
34 - rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn/image/creator/rmh/20221031/3d3419e86a.jpeg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg',  
35 - rmhName: '王烁然',  
36 - userId: '522435359667845',  
37 - userType: '2'  
38 - },  
39 - objectType: '1',  
40 - videoInfo: {  
41 - firstFrameImageUri: '',  
42 - videoDuration: 37,  
43 - videoUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/mp4/202105/rmrb_GSNARt6P1622451310.mp4'  
44 - }  
45 - } as ContentDTO; 14 + @State contentDTO: ContentDTO = {} as ContentDTO;
46 15
47 aboutToAppear(): void { 16 aboutToAppear(): void {
48 } 17 }
@@ -50,7 +19,9 @@ export struct Card12Component { @@ -50,7 +19,9 @@ export struct Card12Component {
50 build() { 19 build() {
51 Column() { 20 Column() {
52 // rmh信息 21 // rmh信息
53 - RmhTitle({ rmhInfo: this.contentDTO.rmhInfo }) 22 + if (this.contentDTO.rmhInfo) {
  23 + RmhTitle({ rmhInfo: this.contentDTO.rmhInfo })
  24 + }
54 // 标题 25 // 标题
55 if (this.contentDTO.newsTitle) { 26 if (this.contentDTO.newsTitle) {
56 Text(this.contentDTO.newsTitle) 27 Text(this.contentDTO.newsTitle)
@@ -64,9 +35,6 @@ export struct Card12Component { @@ -64,9 +35,6 @@ export struct Card12Component {
64 .fontFamily('PingFang SC-Regular') 35 .fontFamily('PingFang SC-Regular')
65 } 36 }
66 37
67 - // if (this.contentDTO.fullColumnImgUrls?.[0]) {  
68 - // createImg({ contentDTO: this.contentDTO })  
69 - // }  
70 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 38 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
71 } 39 }
72 .padding({ 40 .padding({
@@ -75,6 +43,9 @@ export struct Card12Component { @@ -75,6 +43,9 @@ export struct Card12Component {
75 top: $r('app.float.card_comp_pagePadding_tb'), 43 top: $r('app.float.card_comp_pagePadding_tb'),
76 bottom: $r('app.float.card_comp_pagePadding_tb') 44 bottom: $r('app.float.card_comp_pagePadding_tb')
77 }) 45 })
  46 + .onClick((event: ClickEvent) => {
  47 + ProcessUtils.processPage(this.contentDTO)
  48 + })
78 } 49 }
79 } 50 }
80 51
@@ -85,45 +56,6 @@ interface radiusType { @@ -85,45 +56,6 @@ interface radiusType {
85 bottomRight: number | Resource; 56 bottomRight: number | Resource;
86 } 57 }
87 58
88 -@Component  
89 -struct createImg {  
90 - @Prop contentDTO: ContentDTO  
91 -  
92 - build() {  
93 - GridRow() {  
94 - if (this.contentDTO.fullColumnImgUrls[0].landscape === 1) {  
95 - // 横屏  
96 - GridCol({  
97 - span: { xs: 12 }  
98 - }) {  
99 - Stack() {  
100 - Image(this.contentDTO.coverUrl)  
101 - .width(CommonConstants.FULL_WIDTH)  
102 - .aspectRatio(16 / 9)  
103 - .borderRadius($r('app.float.image_border_radius'))  
104 - CardMediaInfo({ contentDTO: this.contentDTO })  
105 - }  
106 - .align(Alignment.BottomEnd)  
107 - }  
108 - } else {  
109 - // 竖图显示,宽度占50%,高度自适应  
110 - GridCol({  
111 - span: { xs: 6 }  
112 - }) {  
113 - Stack() {  
114 - Image(this.contentDTO.coverUrl)  
115 - .width(CommonConstants.FULL_WIDTH)  
116 - .borderRadius($r('app.float.image_border_radius'))  
117 - CardMediaInfo({ contentDTO: this.contentDTO })  
118 - }  
119 - .align(Alignment.BottomEnd)  
120 - }  
121 - }  
122 - }  
123 - }  
124 -}  
125 -  
126 -  
127 @Extend(Text) 59 @Extend(Text)
128 function textOverflowStyle(maxLine: number) { 60 function textOverflowStyle(maxLine: number) {
129 .maxLines(maxLine) 61 .maxLines(maxLine)
@@ -2,6 +2,7 @@ import { ContentDTO } from 'wdBean'; @@ -2,6 +2,7 @@ import { ContentDTO } from 'wdBean';
2 import { RmhTitle } from '../cardCommon/RmhTitle' 2 import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
  5 +import { ProcessUtils } from '../../utils/ProcessUtils';
5 6
6 const TAG = 'Card14Component'; 7 const TAG = 'Card14Component';
7 8
@@ -11,37 +12,37 @@ const TAG = 'Card14Component'; @@ -11,37 +12,37 @@ const TAG = 'Card14Component';
11 @Component 12 @Component
12 export struct Card14Component { 13 export struct Card14Component {
13 @State contentDTO: ContentDTO = { 14 @State contentDTO: ContentDTO = {
14 - // appStyle: '20',  
15 - // coverType: 1,  
16 - // coverUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',  
17 - // fullColumnImgUrls: [  
18 - // {  
19 - // landscape: 1,  
20 - // size: 1,  
21 - // url: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',  
22 - // weight: 1600  
23 - // }  
24 - // ],  
25 - // newsTitle: '好玩!》10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人',  
26 - // rmhInfo: {  
27 - // authIcon:  
28 - // 'https://cdnjdphoto.aikan.pdnews.cn/creator-category/icon/auth/yellow.png',  
29 - // authTitle: '10后音乐人王烁然个人人民号',  
30 - // authTitle2: '10后音乐人王烁然个人人民号',  
31 - // banControl: 0,  
32 - // cnIsAttention: 1,  
33 - // rmhDesc: '10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人',  
34 - // rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn/image/creator/rmh/20221031/3d3419e86a.jpeg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg',  
35 - // rmhName: '王烁然',  
36 - // userId: '522435359667845',  
37 - // userType: '2'  
38 - // },  
39 - // objectType: '1',  
40 - // videoInfo: {  
41 - // firstFrameImageUri: '',  
42 - // videoDuration: 37,  
43 - // videoUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/mp4/202105/rmrb_GSNARt6P1622451310.mp4'  
44 - // } 15 + appStyle: '20',
  16 + coverType: 1,
  17 + coverUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',
  18 + fullColumnImgUrls: [
  19 + {
  20 + landscape: 1,
  21 + size: 1,
  22 + url: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',
  23 + weight: 1600
  24 + }
  25 + ],
  26 + newsTitle: '好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》好玩!》',
  27 + rmhInfo: {
  28 + authIcon:
  29 + 'https://cdnjdphoto.aikan.pdnews.cn/creator-category/icon/auth/yellow.png',
  30 + authTitle: '10后音乐人王烁然个人人民号',
  31 + authTitle2: '10后音乐人王烁然个人人民号',
  32 + banControl: 0,
  33 + cnIsAttention: 1,
  34 + rmhDesc: '10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人',
  35 + rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn/image/creator/rmh/20221031/3d3419e86a.jpeg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg',
  36 + rmhName: '王烁然',
  37 + userId: '522435359667845',
  38 + userType: '2'
  39 + },
  40 + objectType: '1',
  41 + videoInfo: {
  42 + firstFrameImageUri: '',
  43 + videoDuration: 37,
  44 + videoUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/mp4/202105/rmrb_GSNARt6P1622451310.mp4'
  45 + }
45 } as ContentDTO; 46 } as ContentDTO;
46 47
47 aboutToAppear(): void { 48 aboutToAppear(): void {
@@ -50,9 +51,11 @@ export struct Card14Component { @@ -50,9 +51,11 @@ export struct Card14Component {
50 build() { 51 build() {
51 Column() { 52 Column() {
52 // rmh信息 53 // rmh信息
53 - RmhTitle({ rmhInfo: this.contentDTO.rmhInfo }) 54 + if (this.contentDTO.rmhInfo) {
  55 + RmhTitle({ rmhInfo: this.contentDTO.rmhInfo })
  56 + }
54 // 左标题,右图 57 // 左标题,右图
55 - Flex({ direction: FlexDirection.Row }) { 58 + Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.SpaceBetween }) {
56 59
57 Text(this.contentDTO.newsTitle) 60 Text(this.contentDTO.newsTitle)
58 .fontSize($r('app.float.font_size_17')) 61 .fontSize($r('app.float.font_size_17'))
@@ -61,12 +64,13 @@ export struct Card14Component { @@ -61,12 +64,13 @@ export struct Card14Component {
61 .lineHeight(25) 64 .lineHeight(25)
62 .fontFamily('PingFang SC-Regular') 65 .fontFamily('PingFang SC-Regular')
63 .textAlign(TextAlign.Start) 66 .textAlign(TextAlign.Start)
64 - .flexBasis('auto') 67 + // .flexBasis('auto')
65 .margin({right: 12}) 68 .margin({right: 12})
  69 + .flexBasis(214)
66 70
67 Image(this.contentDTO.coverUrl) 71 Image(this.contentDTO.coverUrl)
68 - .flexBasis(174)  
69 - .height(75) 72 + .flexBasis(117)
  73 + .height(78)
70 .borderRadius($r('app.float.image_border_radius')) 74 .borderRadius($r('app.float.image_border_radius'))
71 // .flexBasis(160) 75 // .flexBasis(160)
72 .backgroundImageSize(ImageSize.Auto) 76 .backgroundImageSize(ImageSize.Auto)
@@ -85,6 +89,9 @@ export struct Card14Component { @@ -85,6 +89,9 @@ export struct Card14Component {
85 top: $r('app.float.card_comp_pagePadding_tb'), 89 top: $r('app.float.card_comp_pagePadding_tb'),
86 bottom: $r('app.float.card_comp_pagePadding_tb') 90 bottom: $r('app.float.card_comp_pagePadding_tb')
87 }) 91 })
  92 + .onClick((event: ClickEvent) => {
  93 + ProcessUtils.processPage(this.contentDTO)
  94 + })
88 } 95 }
89 } 96 }
90 97
@@ -2,47 +2,21 @@ import { ContentDTO } from 'wdBean'; @@ -2,47 +2,21 @@ import { ContentDTO } from 'wdBean';
2 import { RmhTitle } from '../cardCommon/RmhTitle' 2 import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
  5 +import { ProcessUtils } from '../../utils/ProcessUtils';
5 6
6 const TAG = 'Card16Component'; 7 const TAG = 'Card16Component';
7 8
  9 +interface fullColumnImgUrlItem {
  10 + url: string
  11 +}
  12 +
  13 +
8 /** 14 /**
9 * 人民号-动态---16:人民号三图卡; 15 * 人民号-动态---16:人民号三图卡;
10 */ 16 */
11 @Component 17 @Component
12 export struct Card16Component { 18 export struct Card16Component {
13 - @State contentDTO: ContentDTO = {  
14 - appStyle: '20',  
15 - coverType: 1,  
16 - coverUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90;https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90;https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',  
17 - fullColumnImgUrls: [  
18 - {  
19 - landscape: 1,  
20 - size: 1,  
21 - url: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',  
22 - weight: 1600  
23 - }  
24 - ],  
25 - newsTitle: '好玩!》10后音乐人王烁然个人人民号10后音乐人王烁然个人人民号10后音乐人王烁然个人人民号10后音乐人王烁然个人人民号10后音乐人王烁然个人人民号10后音乐人王烁然个人人民号',  
26 - rmhInfo: {  
27 - authIcon:  
28 - 'https://cdnjdphoto.aikan.pdnews.cn/creator-category/icon/auth/yellow.png',  
29 - authTitle: '10后音乐人王烁然个人人民号',  
30 - authTitle2: '10后音乐人王烁然个人人民号',  
31 - banControl: 0,  
32 - cnIsAttention: 1,  
33 - rmhDesc: '10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人',  
34 - rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn/image/creator/rmh/20221031/3d3419e86a.jpeg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg',  
35 - rmhName: '王烁然',  
36 - userId: '522435359667845',  
37 - userType: '2'  
38 - },  
39 - objectType: '1',  
40 - videoInfo: {  
41 - firstFrameImageUri: '',  
42 - videoDuration: 37,  
43 - videoUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/mp4/202105/rmrb_GSNARt6P1622451310.mp4'  
44 - }  
45 - } as ContentDTO; 19 + @State contentDTO: ContentDTO = {} as ContentDTO;
46 20
47 aboutToAppear(): void { 21 aboutToAppear(): void {
48 } 22 }
@@ -50,7 +24,9 @@ export struct Card16Component { @@ -50,7 +24,9 @@ export struct Card16Component {
50 build() { 24 build() {
51 Column() { 25 Column() {
52 // rmh信息 26 // rmh信息
53 - RmhTitle({ rmhInfo: this.contentDTO.rmhInfo }) 27 + if (this.contentDTO.rmhInfo) {
  28 + RmhTitle({ rmhInfo: this.contentDTO.rmhInfo })
  29 + }
54 // 标题 30 // 标题
55 if (this.contentDTO.newsTitle) { 31 if (this.contentDTO.newsTitle) {
56 Text(this.contentDTO.newsTitle) 32 Text(this.contentDTO.newsTitle)
@@ -61,10 +37,10 @@ export struct Card16Component { @@ -61,10 +37,10 @@ export struct Card16Component {
61 .margin({ bottom: 8 }) 37 .margin({ bottom: 8 })
62 .lineHeight(25) 38 .lineHeight(25)
63 } 39 }
64 - if (this.contentDTO.coverUrl) { 40 + if (this.contentDTO.fullColumnImgUrls?.length > 0) {
65 Flex() { 41 Flex() {
66 - ForEach(this.contentDTO.coverUrl?.split(';'), (item: string) => {  
67 - Image(item).flexBasis(113).height(75).margin({right: 2}) 42 + ForEach(this.contentDTO.fullColumnImgUrls.slice(0, 3), (item: fullColumnImgUrlItem, index: number) => {
  43 + Image(item.url).flexBasis(113).height(75).margin({ right: index > 1 ? 0 : 2 })
68 }) 44 })
69 } 45 }
70 } 46 }
@@ -76,6 +52,9 @@ export struct Card16Component { @@ -76,6 +52,9 @@ export struct Card16Component {
76 top: $r('app.float.card_comp_pagePadding_tb'), 52 top: $r('app.float.card_comp_pagePadding_tb'),
77 bottom: $r('app.float.card_comp_pagePadding_tb') 53 bottom: $r('app.float.card_comp_pagePadding_tb')
78 }) 54 })
  55 + .onClick((event: ClickEvent) => {
  56 + ProcessUtils.processPage(this.contentDTO)
  57 + })
79 } 58 }
80 } 59 }
81 60