chenjun3_wd

直播回看 直播预约样式

1 -import { CompDTO} from 'wdBean'; 1 +import { CompDTO } 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';
@@ -9,11 +9,14 @@ import { @@ -9,11 +9,14 @@ import {
9 import { 9 import {
10 HorizontalStrokeCardThreeTwoRadioForOneComponent 10 HorizontalStrokeCardThreeTwoRadioForOneComponent
11 } from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent'; 11 } from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent';
12 -import { ZhSingleRow04 } from './compview/ZhSingleRow04'  
13 -import { ZhSingleColumn04 } from './compview/ZhSingleColumn04'  
14 -import { ZhSingleColumn05 } from './compview/ZhSingleColumn05'  
15 -import { ZhGridLayout03 } from './compview/ZhGridLayout03' 12 +import { ZhSingleRow04 } from './compview/ZhSingleRow04';
  13 +import { ZhSingleColumn04 } from './compview/ZhSingleColumn04';
  14 +import { ZhSingleColumn05 } from './compview/ZhSingleColumn05';
  15 +import { ZhGridLayout03 } from './compview/ZhGridLayout03';
16 import { CardParser } from './CardParser'; 16 import { CardParser } from './CardParser';
  17 +import { LiveHorizontalReservationComponent } from './view/LiveHorizontalReservationComponent';
  18 +import { ZhGridLayout02 } from './compview/ZhGridLayout02';
  19 +
17 /** 20 /**
18 * comp适配器. 21 * comp适配器.
19 * 首页楼层comp解析器. 22 * 首页楼层comp解析器.
@@ -42,16 +45,20 @@ export struct CompParser { @@ -42,16 +45,20 @@ export struct CompParser {
42 } else { 45 } else {
43 HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: compDTO }) 46 HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: compDTO })
44 } 47 }
  48 + } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_03) {
  49 + LiveHorizontalReservationComponent({ compDTO: compDTO })
  50 + } else if (compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) {
  51 + ZhGridLayout02({ compDTO: compDTO })
45 } else if (compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { 52 } else if (compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
46 ZhGridLayout03({ compDTO: compDTO }) 53 ZhGridLayout03({ compDTO: compDTO })
47 } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_04) { 54 } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_04) {
48 - ZhSingleRow04({ compDTO: compDTO}) 55 + ZhSingleRow04({ compDTO: compDTO })
49 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_04) { 56 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
50 - ZhSingleColumn04({ compDTO: compDTO}) 57 + ZhSingleColumn04({ compDTO: compDTO })
51 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_05) { 58 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
52 - ZhSingleColumn05({ compDTO: compDTO}) 59 + ZhSingleColumn05({ compDTO: compDTO })
53 } else if (!Number.isNaN(Number(compDTO.compStyle))) { 60 } else if (!Number.isNaN(Number(compDTO.compStyle))) {
54 - CardParser({ contentDTO: compDTO.operDataList[0]}); 61 + CardParser({ contentDTO: compDTO.operDataList[0] });
55 } 62 }
56 else { 63 else {
57 // todo:组件未实现 / Component Not Implemented 64 // todo:组件未实现 / Component Not Implemented
@@ -100,7 +100,7 @@ export struct MorningEveningPaperComponent { @@ -100,7 +100,7 @@ export struct MorningEveningPaperComponent {
100 Logger.info(TAG, `currentTime = ${currentTime}`) 100 Logger.info(TAG, `currentTime = ${currentTime}`)
101 try { 101 try {
102 // let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId) 102 // let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId)
103 - let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + dailyPaperTopicPageId) 103 + let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + dailyPaperTopicPageId) //"25091"
104 this.pageInfoBean = pageInfoBean; 104 this.pageInfoBean = pageInfoBean;
105 this.title = this.pageInfoBean?.topicInfo?.title 105 this.title = this.pageInfoBean?.topicInfo?.title
106 let dateTime = DateTimeUtils.parseDate(this.pageInfoBean?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN); 106 let dateTime = DateTimeUtils.parseDate(this.pageInfoBean?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN);
1 // 视频直播横划卡16:9 1 // 视频直播横划卡16:9
2 import { LiveVideoTypeComponent } from './LiveVideoTypeComponent' 2 import { LiveVideoTypeComponent } from './LiveVideoTypeComponent'
3 import { LiveHorizontalCardForOneComponent } from './LiveHorizontalCardForOneComponent' 3 import { LiveHorizontalCardForOneComponent } from './LiveHorizontalCardForOneComponent'
4 -import { CompDTO } from 'wdBean' 4 +import { CompDTO, ContentDTO } from 'wdBean'
5 import { CommonConstants } from 'wdConstant' 5 import { CommonConstants } from 'wdConstant'
6 -import { ContentDTO } from 'wdBean'  
7 6
8 @Component 7 @Component
9 export struct LiveHorizontalCardComponent { 8 export struct LiveHorizontalCardComponent {
10 @State compDTO: CompDTO = {} as CompDTO 9 @State compDTO: CompDTO = {} as CompDTO
  10 +
11 build() { 11 build() {
12 Column() { 12 Column() {
13 Row() { 13 Row() {
@@ -37,6 +37,7 @@ export struct LiveHorizontalCardComponent { @@ -37,6 +37,7 @@ export struct LiveHorizontalCardComponent {
37 .padding({ left: 16, right: 16 }) 37 .padding({ left: 16, right: 16 })
38 .margin({ top: 8, bottom: 8 }) 38 .margin({ top: 8, bottom: 8 })
39 .width(CommonConstants.FULL_WIDTH) 39 .width(CommonConstants.FULL_WIDTH)
  40 +
40 // 多个 41 // 多个
41 if (this.compDTO.operDataList.length >= 2) { 42 if (this.compDTO.operDataList.length >= 2) {
42 List({ space: 12 }) { 43 List({ space: 12 }) {
@@ -69,7 +70,7 @@ export struct LiveHorizontalCardComponent { @@ -69,7 +70,7 @@ export struct LiveHorizontalCardComponent {
69 .fontColor($r("app.color.color_212228")) 70 .fontColor($r("app.color.color_212228"))
70 .fontWeight(400) 71 .fontWeight(400)
71 .maxLines(2) 72 .maxLines(2)
72 - .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 73 + .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
73 .textAlign(TextAlign.Start) 74 .textAlign(TextAlign.Start)
74 .margin({ top: 8 }) 75 .margin({ top: 8 })
75 .width(this.compDTO.operDataList.length == 2 ? 210 : 150) 76 .width(this.compDTO.operDataList.length == 2 ? 210 : 150)
@@ -97,4 +98,3 @@ export struct LiveHorizontalCardComponent { @@ -97,4 +98,3 @@ export struct LiveHorizontalCardComponent {
97 .backgroundColor($r("app.color.white")) 98 .backgroundColor($r("app.color.white"))
98 } 99 }
99 } 100 }
100 -