chenjun3_wd

直播回看 直播预约样式

import { CompDTO} from 'wdBean';
import { CompDTO } from 'wdBean';
import { CommonConstants, CompStyle } from 'wdConstant';
import { BannerComponent } from './view/BannerComponent';
import { LabelComponent } from './view/LabelComponent';
... ... @@ -9,11 +9,14 @@ import {
import {
HorizontalStrokeCardThreeTwoRadioForOneComponent
} from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent';
import { ZhSingleRow04 } from './compview/ZhSingleRow04'
import { ZhSingleColumn04 } from './compview/ZhSingleColumn04'
import { ZhSingleColumn05 } from './compview/ZhSingleColumn05'
import { ZhGridLayout03 } from './compview/ZhGridLayout03'
import { ZhSingleRow04 } from './compview/ZhSingleRow04';
import { ZhSingleColumn04 } from './compview/ZhSingleColumn04';
import { ZhSingleColumn05 } from './compview/ZhSingleColumn05';
import { ZhGridLayout03 } from './compview/ZhGridLayout03';
import { CardParser } from './CardParser';
import { LiveHorizontalReservationComponent } from './view/LiveHorizontalReservationComponent';
import { ZhGridLayout02 } from './compview/ZhGridLayout02';
/**
* comp适配器.
* 首页楼层comp解析器.
... ... @@ -42,16 +45,20 @@ export struct CompParser {
} else {
HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: compDTO })
}
} else if (compDTO.compStyle === CompStyle.Zh_Single_Row_03) {
LiveHorizontalReservationComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) {
ZhGridLayout02({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
ZhGridLayout03({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Row_04) {
ZhSingleRow04({ compDTO: compDTO})
ZhSingleRow04({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
ZhSingleColumn04({ compDTO: compDTO})
ZhSingleColumn04({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
ZhSingleColumn05({ compDTO: compDTO})
ZhSingleColumn05({ compDTO: compDTO })
} else if (!Number.isNaN(Number(compDTO.compStyle))) {
CardParser({ contentDTO: compDTO.operDataList[0]});
CardParser({ contentDTO: compDTO.operDataList[0] });
}
else {
// todo:组件未实现 / Component Not Implemented
... ...
... ... @@ -100,7 +100,7 @@ export struct MorningEveningPaperComponent {
Logger.info(TAG, `currentTime = ${currentTime}`)
try {
// let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId)
let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + dailyPaperTopicPageId)
let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + dailyPaperTopicPageId) //"25091"
this.pageInfoBean = pageInfoBean;
this.title = this.pageInfoBean?.topicInfo?.title
let dateTime = DateTimeUtils.parseDate(this.pageInfoBean?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN);
... ...
// 视频直播横划卡16:9
import { LiveVideoTypeComponent } from './LiveVideoTypeComponent'
import { LiveHorizontalCardForOneComponent } from './LiveHorizontalCardForOneComponent'
import { CompDTO } from 'wdBean'
import { CompDTO, ContentDTO } from 'wdBean'
import { CommonConstants } from 'wdConstant'
import { ContentDTO } from 'wdBean'
@Component
export struct LiveHorizontalCardComponent {
@State compDTO: CompDTO = {} as CompDTO
build() {
Column() {
Row() {
... ... @@ -37,6 +37,7 @@ export struct LiveHorizontalCardComponent {
.padding({ left: 16, right: 16 })
.margin({ top: 8, bottom: 8 })
.width(CommonConstants.FULL_WIDTH)
// 多个
if (this.compDTO.operDataList.length >= 2) {
List({ space: 12 }) {
... ... @@ -69,7 +70,7 @@ export struct LiveHorizontalCardComponent {
.fontColor($r("app.color.color_212228"))
.fontWeight(400)
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
.textAlign(TextAlign.Start)
.margin({ top: 8 })
.width(this.compDTO.operDataList.length == 2 ? 210 : 150)
... ... @@ -97,4 +98,3 @@ export struct LiveHorizontalCardComponent {
.backgroundColor($r("app.color.white"))
}
}
\ No newline at end of file
... ...