wanglei

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

... ... @@ -29,9 +29,9 @@ export struct CompParser {
componentBuilder(compDTO: CompDTO, compIndex: number) {
if (compDTO.compStyle === CompStyle.Label_03) {
LabelComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Title_Abbr_01) {
} else if (compDTO.compStyle === '11') {
TitleAbbrComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Title_All_01) {
} else if (compDTO.compStyle === '3') {
TitleAllComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Carousel_Layout_01) {
BannerComponent({ compDTO: compDTO })
... ...
//缩略标题
import { CommonConstants } from 'wdConstant'
import { CompDTO } from '../../repository/bean/CompDTO'
import { DateTimeUtils } from 'wdKit'
@Component
export struct TitleAbbrComponent {
... ... @@ -8,7 +9,7 @@ export struct TitleAbbrComponent {
build() {
Column() {
Text(this.compDTO.operDataList[0].title)
Text(this.compDTO.operDataList[0].newsTitle)
.fontSize($r("app.float.font_size_16"))
.fontColor($r("app.color.color_222222"))
.maxLines(3)
... ... @@ -26,7 +27,7 @@ export struct TitleAbbrComponent {
.width(16)
.height(16)
Text("46分钟前")
Text(DateTimeUtils.formatDate(Number.parseFloat(this.compDTO.operDataList[0].publishTime)))
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
... ...
//全标题 "compStyle":"3",
import { CommonConstants } from 'wdConstant'
import { CompDTO } from '../../repository/bean/CompDTO'
import { DateTimeUtils } from 'wdKit/src/main/ets/utils/DateTimeUtils'
import { Logger } from 'wdKit/src/main/ets/utils/Logger'
@Component
export struct TitleAllComponent {
... ... @@ -8,7 +10,7 @@ export struct TitleAllComponent {
build() {
Column() {
Text(this.compDTO.operDataList[0].title)
Text(this.compDTO.operDataList[0].newsTitle)
.fontSize($r("app.float.font_size_16"))
.fontColor($r("app.color.color_222222"))
.width(CommonConstants.FULL_WIDTH)
... ... @@ -24,7 +26,7 @@ export struct TitleAllComponent {
.width(16)
.height(16)
Text("46分钟前")
Text(DateTimeUtils.formatDate(Number.parseFloat(this.compDTO.operDataList[0].publishTime)))
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
... ... @@ -42,4 +44,7 @@ export struct TitleAllComponent {
.backgroundColor($r("app.color.white"))
.margin({ bottom: 8 })
}
aboutToAppear(){
// Logger.info("ssx",JSON.stringify(this.compDTO.operDataList[0]))
}
}
\ No newline at end of file
... ...