douaojie

fix: 问题修复

@@ -40,7 +40,7 @@ export struct Card17Component { @@ -40,7 +40,7 @@ export struct Card17Component {
40 this.contentDTO.fullColumnImgUrls.length > 0 ? this.contentDTO.fullColumnImgUrls[0].url : '' : '') 40 this.contentDTO.fullColumnImgUrls.length > 0 ? this.contentDTO.fullColumnImgUrls[0].url : '' : '')
41 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5) 41 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
42 .width(CommonConstants.FULL_WIDTH) 42 .width(CommonConstants.FULL_WIDTH)
43 - .aspectRatio(16 / 9) 43 + .height(160)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9)
44 .borderRadius({ 44 .borderRadius({
45 topLeft: $r('app.float.image_border_radius'), 45 topLeft: $r('app.float.image_border_radius'),
46 bottomLeft: $r('app.float.image_border_radius'), 46 bottomLeft: $r('app.float.image_border_radius'),
@@ -52,7 +52,7 @@ export struct Card17Component { @@ -52,7 +52,7 @@ export struct Card17Component {
52 this.contentDTO.fullColumnImgUrls.length > 1 ? this.contentDTO.fullColumnImgUrls[1].url : '' : '') 52 this.contentDTO.fullColumnImgUrls.length > 1 ? this.contentDTO.fullColumnImgUrls[1].url : '' : '')
53 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5) 53 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
54 .width(CommonConstants.FULL_WIDTH) 54 .width(CommonConstants.FULL_WIDTH)
55 - .aspectRatio(16 / 9) 55 + .height(79)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9)
56 .margin({ bottom: 1 }) 56 .margin({ bottom: 1 })
57 .borderRadius({ 57 .borderRadius({
58 topRight: $r('app.float.image_border_radius'), 58 topRight: $r('app.float.image_border_radius'),
@@ -69,7 +69,7 @@ export struct Card17Component { @@ -69,7 +69,7 @@ export struct Card17Component {
69 this.contentDTO.fullColumnImgUrls.length > 2 ? this.contentDTO.fullColumnImgUrls[2].url : '' : '') 69 this.contentDTO.fullColumnImgUrls.length > 2 ? this.contentDTO.fullColumnImgUrls[2].url : '' : '')
70 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5) 70 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
71 .width(CommonConstants.FULL_WIDTH) 71 .width(CommonConstants.FULL_WIDTH)
72 - .aspectRatio(16 / 9) 72 + .height(79)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9)
73 .margin({ top: 1 }) 73 .margin({ top: 1 })
74 .borderRadius({ 74 .borderRadius({
75 bottomRight: $r('app.float.image_border_radius'), 75 bottomRight: $r('app.float.image_border_radius'),
@@ -108,3 +108,11 @@ export struct Card17Component { @@ -108,3 +108,11 @@ export struct Card17Component {
108 }) 108 })
109 } 109 }
110 } 110 }
  111 +
  112 +// 全局公共样式
  113 +@Styles
  114 +function ImageSize() {
  115 + .padding({ right: 18, left: 18 })
  116 + .width('100%')
  117 + .margin({ top: 10 })
  118 +}
@@ -20,6 +20,8 @@ export struct ZhGridLayout02 { @@ -20,6 +20,8 @@ export struct ZhGridLayout02 {
20 @State compDTO: CompDTO = {} as CompDTO 20 @State compDTO: CompDTO = {} as CompDTO
21 @State operDataList: ContentDTO[] = [] 21 @State operDataList: ContentDTO[] = []
22 @State loadImg: boolean = false; 22 @State loadImg: boolean = false;
  23 + currentPage = 1
  24 + pageSize = 12
23 25
24 async aboutToAppear(): Promise<void> { 26 async aboutToAppear(): Promise<void> {
25 Logger.debug(TAG, 'aboutToAppear ' + this.compDTO.objectTitle) 27 Logger.debug(TAG, 'aboutToAppear ' + this.compDTO.objectTitle)
@@ -32,9 +34,6 @@ export struct ZhGridLayout02 { @@ -32,9 +34,6 @@ export struct ZhGridLayout02 {
32 this.loadImg = await onlyWifiLoadImg(); 34 this.loadImg = await onlyWifiLoadImg();
33 } 35 }
34 36
35 - currentPage = 1  
36 - pageSize = 12  
37 -  
38 build() { 37 build() {
39 Column() { 38 Column() {
40 Scroll() { 39 Scroll() {
@@ -50,7 +49,7 @@ export struct ZhGridLayout02 { @@ -50,7 +49,7 @@ export struct ZhGridLayout02 {
50 .fontWeight(600) 49 .fontWeight(600)
51 } 50 }
52 .justifyContent(FlexAlign.Start) 51 .justifyContent(FlexAlign.Start)
53 - .margin({ top: 8, bottom: 8 }) 52 + .margin({ top: 16, bottom: 8 })
54 .width(CommonConstants.FULL_WIDTH) 53 .width(CommonConstants.FULL_WIDTH)
55 54
56 GridRow({ 55 GridRow({
@@ -106,7 +105,7 @@ export struct ZhGridLayout02 { @@ -106,7 +105,7 @@ export struct ZhGridLayout02 {
106 .height(95) 105 .height(95)
107 .borderRadius(4) 106 .borderRadius(4)
108 Text(item.newsTitle) 107 Text(item.newsTitle)
109 - .margin({top:'5'}) 108 + .margin({ top: '5' })
110 .fontSize(13) 109 .fontSize(13)
111 .maxLines(2) 110 .maxLines(2)
112 .textOverflow({ overflow: TextOverflow.Ellipsis }) 111 .textOverflow({ overflow: TextOverflow.Ellipsis })