Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main
Showing
3 changed files
with
12 additions
and
6 deletions
| @@ -29,9 +29,9 @@ export struct CompParser { | @@ -29,9 +29,9 @@ export struct CompParser { | ||
| 29 | componentBuilder(compDTO: CompDTO, compIndex: number) { | 29 | componentBuilder(compDTO: CompDTO, compIndex: number) { |
| 30 | if (compDTO.compStyle === CompStyle.Label_03) { | 30 | if (compDTO.compStyle === CompStyle.Label_03) { |
| 31 | LabelComponent({ compDTO: compDTO }) | 31 | LabelComponent({ compDTO: compDTO }) |
| 32 | - } else if (compDTO.compStyle === CompStyle.Title_Abbr_01) { | 32 | + } else if (compDTO.compStyle === '11') { |
| 33 | TitleAbbrComponent({ compDTO: compDTO }) | 33 | TitleAbbrComponent({ compDTO: compDTO }) |
| 34 | - } else if (compDTO.compStyle === CompStyle.Title_All_01) { | 34 | + } else if (compDTO.compStyle === '3') { |
| 35 | TitleAllComponent({ compDTO: compDTO }) | 35 | TitleAllComponent({ compDTO: compDTO }) |
| 36 | } else if (compDTO.compStyle === CompStyle.Carousel_Layout_01) { | 36 | } else if (compDTO.compStyle === CompStyle.Carousel_Layout_01) { |
| 37 | BannerComponent({ compDTO: compDTO }) | 37 | BannerComponent({ compDTO: compDTO }) |
| 1 | //缩略标题 | 1 | //缩略标题 |
| 2 | import { CommonConstants } from 'wdConstant' | 2 | import { CommonConstants } from 'wdConstant' |
| 3 | import { CompDTO } from '../../repository/bean/CompDTO' | 3 | import { CompDTO } from '../../repository/bean/CompDTO' |
| 4 | +import { DateTimeUtils } from 'wdKit' | ||
| 4 | 5 | ||
| 5 | @Component | 6 | @Component |
| 6 | export struct TitleAbbrComponent { | 7 | export struct TitleAbbrComponent { |
| @@ -8,7 +9,7 @@ export struct TitleAbbrComponent { | @@ -8,7 +9,7 @@ export struct TitleAbbrComponent { | ||
| 8 | 9 | ||
| 9 | build() { | 10 | build() { |
| 10 | Column() { | 11 | Column() { |
| 11 | - Text(this.compDTO.operDataList[0].title) | 12 | + Text(this.compDTO.operDataList[0].newsTitle) |
| 12 | .fontSize($r("app.float.font_size_16")) | 13 | .fontSize($r("app.float.font_size_16")) |
| 13 | .fontColor($r("app.color.color_222222")) | 14 | .fontColor($r("app.color.color_222222")) |
| 14 | .maxLines(3) | 15 | .maxLines(3) |
| @@ -26,7 +27,7 @@ export struct TitleAbbrComponent { | @@ -26,7 +27,7 @@ export struct TitleAbbrComponent { | ||
| 26 | .width(16) | 27 | .width(16) |
| 27 | .height(16) | 28 | .height(16) |
| 28 | 29 | ||
| 29 | - Text("46分钟前") | 30 | + Text(DateTimeUtils.formatDate(Number.parseFloat(this.compDTO.operDataList[0].publishTime))) |
| 30 | .fontSize($r("app.float.font_size_12")) | 31 | .fontSize($r("app.float.font_size_12")) |
| 31 | .fontColor($r("app.color.color_B0B0B0")) | 32 | .fontColor($r("app.color.color_B0B0B0")) |
| 32 | 33 |
| 1 | //全标题 "compStyle":"3", | 1 | //全标题 "compStyle":"3", |
| 2 | import { CommonConstants } from 'wdConstant' | 2 | import { CommonConstants } from 'wdConstant' |
| 3 | import { CompDTO } from '../../repository/bean/CompDTO' | 3 | import { CompDTO } from '../../repository/bean/CompDTO' |
| 4 | +import { DateTimeUtils } from 'wdKit/src/main/ets/utils/DateTimeUtils' | ||
| 5 | +import { Logger } from 'wdKit/src/main/ets/utils/Logger' | ||
| 4 | 6 | ||
| 5 | @Component | 7 | @Component |
| 6 | export struct TitleAllComponent { | 8 | export struct TitleAllComponent { |
| @@ -8,7 +10,7 @@ export struct TitleAllComponent { | @@ -8,7 +10,7 @@ export struct TitleAllComponent { | ||
| 8 | 10 | ||
| 9 | build() { | 11 | build() { |
| 10 | Column() { | 12 | Column() { |
| 11 | - Text(this.compDTO.operDataList[0].title) | 13 | + Text(this.compDTO.operDataList[0].newsTitle) |
| 12 | .fontSize($r("app.float.font_size_16")) | 14 | .fontSize($r("app.float.font_size_16")) |
| 13 | .fontColor($r("app.color.color_222222")) | 15 | .fontColor($r("app.color.color_222222")) |
| 14 | .width(CommonConstants.FULL_WIDTH) | 16 | .width(CommonConstants.FULL_WIDTH) |
| @@ -24,7 +26,7 @@ export struct TitleAllComponent { | @@ -24,7 +26,7 @@ export struct TitleAllComponent { | ||
| 24 | .width(16) | 26 | .width(16) |
| 25 | .height(16) | 27 | .height(16) |
| 26 | 28 | ||
| 27 | - Text("46分钟前") | 29 | + Text(DateTimeUtils.formatDate(Number.parseFloat(this.compDTO.operDataList[0].publishTime))) |
| 28 | .fontSize($r("app.float.font_size_12")) | 30 | .fontSize($r("app.float.font_size_12")) |
| 29 | .fontColor($r("app.color.color_B0B0B0")) | 31 | .fontColor($r("app.color.color_B0B0B0")) |
| 30 | 32 | ||
| @@ -42,4 +44,7 @@ export struct TitleAllComponent { | @@ -42,4 +44,7 @@ export struct TitleAllComponent { | ||
| 42 | .backgroundColor($r("app.color.white")) | 44 | .backgroundColor($r("app.color.white")) |
| 43 | .margin({ bottom: 8 }) | 45 | .margin({ bottom: 8 }) |
| 44 | } | 46 | } |
| 47 | + aboutToAppear(){ | ||
| 48 | + // Logger.info("ssx",JSON.stringify(this.compDTO.operDataList[0])) | ||
| 49 | + } | ||
| 45 | } | 50 | } |
-
Please register or login to post a comment