guochunsong

头图卡代码合入

@@ -8,34 +8,39 @@ export struct HeadPictureCardComponent { @@ -8,34 +8,39 @@ export struct HeadPictureCardComponent {
8 8
9 build() { 9 build() {
10 Stack() { 10 Stack() {
11 - Image(this.compDTO.backgroundImgUrl) 11 + Image(this.compDTO.operDataList[0].coverUrl)
12 .width(CommonConstants.FULL_WIDTH) 12 .width(CommonConstants.FULL_WIDTH)
13 .height(CommonConstants.FULL_HEIGHT) 13 .height(CommonConstants.FULL_HEIGHT)
14 -  
15 - if (this.compDTO.extraData) { 14 + .autoResize(true)
  15 + if (this.compDTO.operDataList[0].newsTitle) {
16 Row() 16 Row()
17 .width(CommonConstants.FULL_WIDTH) 17 .width(CommonConstants.FULL_WIDTH)
18 .height(59) 18 .height(59)
  19 + .backgroundColor(Color.Red)
19 .linearGradient({ 20 .linearGradient({
20 colors: [ 21 colors: [
21 ['rgba(0, 0, 0, 0.0)', 0.0], ['rgba(0, 0, 0, 0.3)', 1.0] 22 ['rgba(0, 0, 0, 0.0)', 0.0], ['rgba(0, 0, 0, 0.3)', 1.0]
22 ] 23 ]
23 }) 24 })
24 Row() { 25 Row() {
25 - Text(CompUtils.getLabelTitle(this.compDTO.extraData)) 26 + Text(this.compDTO.operDataList[0].newsTitle)
26 .width(CommonConstants.FULL_WIDTH) 27 .width(CommonConstants.FULL_WIDTH)
27 .height(CommonConstants.FULL_HEIGHT) 28 .height(CommonConstants.FULL_HEIGHT)
28 .fontColor(Color.White) 29 .fontColor(Color.White)
29 .fontSize($r('app.float.normal_text_size')) 30 .fontSize($r('app.float.normal_text_size'))
30 .fontWeight(FontWeight.Bold) 31 .fontWeight(FontWeight.Bold)
31 .maxLines(2) 32 .maxLines(2)
  33 + .align(Alignment.Bottom)
32 } 34 }
33 - .height(25) 35 + .justifyContent(FlexAlign.Start)
  36 + .height(40)
34 .margin({ left: 12, bottom: 10, right: 12 }) 37 .margin({ left: 12, bottom: 10, right: 12 })
35 } 38 }
36 } 39 }
37 .alignContent(Alignment.Bottom) 40 .alignContent(Alignment.Bottom)
38 .width(CommonConstants.FULL_WIDTH) 41 .width(CommonConstants.FULL_WIDTH)
39 .height(200) 42 .height(200)
  43 + .padding(
  44 + { top: 16, bottom: 16, left: 14, right: 14 })
40 } 45 }
41 } 46 }