Showing
5 changed files
with
16 additions
and
9 deletions
| @@ -22,7 +22,7 @@ export { BannerComponent } from "./components/view/BannerComponent" | @@ -22,7 +22,7 @@ export { BannerComponent } from "./components/view/BannerComponent" | ||
| 22 | 22 | ||
| 23 | export { ColumnPageComponent } from "./components/page/ColumnPageComponent" | 23 | export { ColumnPageComponent } from "./components/page/ColumnPageComponent" |
| 24 | 24 | ||
| 25 | -export { TriPicCardComponent } from "./components/TriPicCardComponent" | 25 | +export { TriPicCardComponent } from "./components/view/TriPicCardComponent" |
| 26 | 26 | ||
| 27 | -export { BigPicCardComponent } from "./components/BigPicCardComponent" | 27 | +export { BigPicCardComponent } from "./components/view/BigPicCardComponent" |
| 28 | 28 |
| @@ -7,6 +7,8 @@ import { TitleAllComponent } from './view/TitleAllComponent'; | @@ -7,6 +7,8 @@ import { TitleAllComponent } from './view/TitleAllComponent'; | ||
| 7 | import { HorizontalStrokeCardThreeTwoRadioForOneComponent } from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent'; | 7 | import { HorizontalStrokeCardThreeTwoRadioForOneComponent } from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent'; |
| 8 | import { HorizontalStrokeCardThreeTwoRadioForTwoComponent } from './view/HorizontalStrokeCardThreeTwoRadioForTwoComponent'; | 8 | import { HorizontalStrokeCardThreeTwoRadioForTwoComponent } from './view/HorizontalStrokeCardThreeTwoRadioForTwoComponent'; |
| 9 | import { HorizontalStrokeCardThreeTwoRadioForMoreComponent } from './view/HorizontalStrokeCardThreeTwoRadioForMoreComponent'; | 9 | import { HorizontalStrokeCardThreeTwoRadioForMoreComponent } from './view/HorizontalStrokeCardThreeTwoRadioForMoreComponent'; |
| 10 | +import { BigPicCardComponent } from './view/BigPicCardComponent'; | ||
| 11 | +import { TriPicCardComponent } from './view/TriPicCardComponent'; | ||
| 10 | 12 | ||
| 11 | /** | 13 | /** |
| 12 | * comp适配器. | 14 | * comp适配器. |
| @@ -30,6 +32,10 @@ export struct CompParser { | @@ -30,6 +32,10 @@ export struct CompParser { | ||
| 30 | TitleAllComponent({ compDTO: compDTO }) | 32 | TitleAllComponent({ compDTO: compDTO }) |
| 31 | } else if (compDTO.compStyle === CompStyle.Carousel_Layout_01) { | 33 | } else if (compDTO.compStyle === CompStyle.Carousel_Layout_01) { |
| 32 | BannerComponent({ compDTO: compDTO }) | 34 | BannerComponent({ compDTO: compDTO }) |
| 35 | + } else if (compDTO.compStyle === "2") { | ||
| 36 | + BigPicCardComponent({ compDTO: compDTO }) | ||
| 37 | + } else if (compDTO.compStyle === "4") { | ||
| 38 | + TriPicCardComponent({ compDTO: compDTO }) | ||
| 33 | } else { | 39 | } else { |
| 34 | // todo:组件未实现 / Component Not Implemented | 40 | // todo:组件未实现 / Component Not Implemented |
| 35 | Text(compDTO.compStyle) | 41 | Text(compDTO.compStyle) |
| 1 | //全标题 "compStyle":"2", | 1 | //全标题 "compStyle":"2", |
| 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 | const TAG: string = 'BigPicCardComponent'; | 4 | const TAG: string = 'BigPicCardComponent'; |
| 5 | 5 | ||
| 6 | /** | 6 | /** |
| 1 | //全标题 "compStyle":"4", | 1 | //全标题 "compStyle":"4", |
| 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 | const TAG: string = 'TriPicCardComponent'; | 4 | const TAG: string = 'TriPicCardComponent'; |
| 5 | 5 | ||
| 6 | /** | 6 | /** |
| @@ -29,17 +29,17 @@ export struct TriPicCardComponent { | @@ -29,17 +29,17 @@ export struct TriPicCardComponent { | ||
| 29 | .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 | 29 | .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 |
| 30 | //三图 | 30 | //三图 |
| 31 | Row() { | 31 | Row() { |
| 32 | - Image(this.compDTO.operDataList[0].fullColumnImgUrls[0].url) | 32 | + Image(this.compDTO.operDataList[0].fullColumnImgUrls[0]?.url) |
| 33 | .width('32%') | 33 | .width('32%') |
| 34 | 34 | ||
| 35 | .height(75) | 35 | .height(75) |
| 36 | .borderRadius({ topLeft:4,bottomLeft:4 }) | 36 | .borderRadius({ topLeft:4,bottomLeft:4 }) |
| 37 | 37 | ||
| 38 | - Image(this.compDTO.operDataList[0].fullColumnImgUrls[1].url) | 38 | + Image(this.compDTO.operDataList[0].fullColumnImgUrls[1]?.url) |
| 39 | .width('32%') | 39 | .width('32%') |
| 40 | .height(75) | 40 | .height(75) |
| 41 | 41 | ||
| 42 | - Image(this.compDTO.operDataList[0].fullColumnImgUrls[2].url) | 42 | + Image(this.compDTO.operDataList[0].fullColumnImgUrls[2]?.url) |
| 43 | .width('32%') | 43 | .width('32%') |
| 44 | .height(75) | 44 | .height(75) |
| 45 | .borderRadius({ topRight:4,bottomRight:4 }) | 45 | .borderRadius({ topRight:4,bottomRight:4 }) |
| @@ -67,11 +67,11 @@ export struct TriPicCardComponent { | @@ -67,11 +67,11 @@ export struct TriPicCardComponent { | ||
| 67 | .width(12) | 67 | .width(12) |
| 68 | .height(12) | 68 | .height(12) |
| 69 | 69 | ||
| 70 | - Text(this.compDTO.operDataList[0].publishTime+"分钟前") | 70 | + Text(this.compDTO.operDataList[0].publishTime) |
| 71 | .bottomTextStyle() | 71 | .bottomTextStyle() |
| 72 | Text(' ') | 72 | Text(' ') |
| 73 | 73 | ||
| 74 | - Text(this.compDTO.operDataList[0].openLikes.toString()+"条评论") | 74 | + Text('518条评论') |
| 75 | .bottomTextStyle() | 75 | .bottomTextStyle() |
| 76 | 76 | ||
| 77 | } | 77 | } |
-
Please register or login to post a comment