王士厅

fix: 【UI走查-卡片】折叠屏展开-图集卡

  1 +{
  2 + "ruleSet": [
  3 + "plugin:@performance/all"
  4 + ]
  5 +}
@@ -211,16 +211,16 @@ export struct CompParser { @@ -211,16 +211,16 @@ export struct CompParser {
211 this.compDTO.compStyle === CompStyle.Zh_Single_Row_06 211 this.compDTO.compStyle === CompStyle.Zh_Single_Row_06
212 ) { 212 ) {
213 if (this.compDTO.compStyle === this.nextCompDTO.compStyle) { 213 if (this.compDTO.compStyle === this.nextCompDTO.compStyle) {
214 - Divider().strokeWidth(1).color('#f5f5f5').width('103%').padding({ left: 16, right: 16 }).margin({left: -6}) 214 + Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
215 } else { 215 } else {
216 Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6}) 216 Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
217 } 217 }
218 } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { 218 } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
219 - Divider().strokeWidth(1).color('#f5f5f5').width('103%').padding({ left: 16, right: 16 }).margin({left: -6}) 219 + Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
220 } else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) { 220 } else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
221 // 大专题 221 // 大专题
222 if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) { 222 if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
223 - Divider().strokeWidth(1).color('#f5f5f5').width('103%').padding({ left: 16, right: 16 }).margin({left: -6}) 223 + Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
224 } else { 224 } else {
225 Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6}) 225 Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
226 } 226 }
@@ -234,7 +234,7 @@ export struct CompParser { @@ -234,7 +234,7 @@ export struct CompParser {
234 ) { 234 ) {
235 Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6}) 235 Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
236 } else { 236 } else {
237 - Divider().strokeWidth(1).color('#f5f5f5').width('103%').padding({ left: 16, right: 16 }).margin({left: -6,top:8}) 237 + Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }).margin({top:8})
238 } 238 }
239 } else { 239 } else {
240 // Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 240 // Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
@@ -9,6 +9,7 @@ import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; @@ -9,6 +9,7 @@ import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
9 import { InfomationCardClick } from '../../utils/infomationCardClick' 9 import { InfomationCardClick } from '../../utils/infomationCardClick'
10 import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed'; 10 import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed';
11 import router from '@ohos.router' 11 import router from '@ohos.router'
  12 +import { CompUtils } from '../../utils/CompUtils';
12 13
13 const TAG = 'Card17Component'; 14 const TAG = 'Card17Component';
14 15
@@ -57,7 +58,7 @@ export struct Card17Component { @@ -57,7 +58,7 @@ export struct Card17Component {
57 } 58 }
58 } 59 }
59 .textOverflow({ overflow: TextOverflow.Ellipsis }) 60 .textOverflow({ overflow: TextOverflow.Ellipsis })
60 - .fontSize($r('app.float.font_size_17')) 61 + .fontSize(18)
61 .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222')) 62 .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
62 .lineHeight(25) 63 .lineHeight(25)
63 .maxLines(3) 64 .maxLines(3)
@@ -71,7 +72,7 @@ export struct Card17Component { @@ -71,7 +72,7 @@ export struct Card17Component {
71 this.contentDTO.fullColumnImgUrls.length > 0 ? this.contentDTO.fullColumnImgUrls[0].url || this.contentDTO.fullColumnImgUrls[0].fullUrl : '' : '') 72 this.contentDTO.fullColumnImgUrls.length > 0 ? this.contentDTO.fullColumnImgUrls[0].url || this.contentDTO.fullColumnImgUrls[0].fullUrl : '' : '')
72 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5) 73 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
73 .width(CommonConstants.FULL_WIDTH) 74 .width(CommonConstants.FULL_WIDTH)
74 - .height(160)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9) 75 + .aspectRatio(CompUtils.ASPECT_RATIO_3_2)
75 .borderRadius({ 76 .borderRadius({
76 topLeft: $r('app.float.image_border_radius'), 77 topLeft: $r('app.float.image_border_radius'),
77 bottomLeft: $r('app.float.image_border_radius'), 78 bottomLeft: $r('app.float.image_border_radius'),
@@ -83,7 +84,7 @@ export struct Card17Component { @@ -83,7 +84,7 @@ export struct Card17Component {
83 this.contentDTO.fullColumnImgUrls.length > 1 ? this.contentDTO.fullColumnImgUrls[1].url || this.contentDTO.fullColumnImgUrls[1].fullUrl : '' : '') 84 this.contentDTO.fullColumnImgUrls.length > 1 ? this.contentDTO.fullColumnImgUrls[1].url || this.contentDTO.fullColumnImgUrls[1].fullUrl : '' : '')
84 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5) 85 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
85 .width(CommonConstants.FULL_WIDTH) 86 .width(CommonConstants.FULL_WIDTH)
86 - .height(79)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9) 87 + .aspectRatio(CompUtils.ASPECT_RATIO_3_2)
87 .margin({ bottom: 1 }) 88 .margin({ bottom: 1 })
88 .borderRadius({ 89 .borderRadius({
89 topRight: $r('app.float.image_border_radius'), 90 topRight: $r('app.float.image_border_radius'),
@@ -100,7 +101,7 @@ export struct Card17Component { @@ -100,7 +101,7 @@ export struct Card17Component {
100 this.contentDTO.fullColumnImgUrls.length > 2 ? this.contentDTO.fullColumnImgUrls[2].url || this.contentDTO.fullColumnImgUrls[2].fullUrl : '' : '') 101 this.contentDTO.fullColumnImgUrls.length > 2 ? this.contentDTO.fullColumnImgUrls[2].url || this.contentDTO.fullColumnImgUrls[2].fullUrl : '' : '')
101 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5) 102 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
102 .width(CommonConstants.FULL_WIDTH) 103 .width(CommonConstants.FULL_WIDTH)
103 - .height(79)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9) 104 + .aspectRatio(CompUtils.ASPECT_RATIO_3_2)
104 .margin({ top: 1 }) 105 .margin({ top: 1 })
105 .borderRadius({ 106 .borderRadius({
106 bottomRight: $r('app.float.image_border_radius'), 107 bottomRight: $r('app.float.image_border_radius'),
@@ -132,13 +133,13 @@ export struct Card17Component { @@ -132,13 +133,13 @@ export struct Card17Component {
132 }) 133 })
133 134
134 // 评论等信息 135 // 评论等信息
135 - CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO }) 136 + CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO, viewShowData: false })
136 } 137 }
137 .padding({ 138 .padding({
138 left: 10, 139 left: 10,
139 right: 10, 140 right: 10,
140 - top: $r('app.float.card_comp_pagePadding_tb'),  
141 - bottom: $r('app.float.card_comp_pagePadding_tb') 141 + top: 14,
  142 + bottom: 14
142 }) 143 })
143 .backgroundColor(0xffffff) 144 .backgroundColor(0xffffff)
144 .width(CommonConstants.FULL_WIDTH) 145 .width(CommonConstants.FULL_WIDTH)
@@ -11,6 +11,7 @@ export class CompUtils { @@ -11,6 +11,7 @@ export class CompUtils {
11 public static readonly ASPECT_RATIO_1_1: number = 1; 11 public static readonly ASPECT_RATIO_1_1: number = 1;
12 public static readonly ASPECT_RATIO_2_1: number = 2; 12 public static readonly ASPECT_RATIO_2_1: number = 2;
13 public static readonly ASPECT_RATIO_3_4: number = 3 / 4; 13 public static readonly ASPECT_RATIO_3_4: number = 3 / 4;
  14 + public static readonly ASPECT_RATIO_3_2: number = 3 / 2;
14 public static readonly ASPECT_RATIO_16_9: number = 16 / 9; 15 public static readonly ASPECT_RATIO_16_9: number = 16 / 9;
15 public static readonly ASPECT_RATIO_75_45: number = 75 / 45; // 角标宽高比 16 public static readonly ASPECT_RATIO_75_45: number = 75 / 45; // 角标宽高比
16 /** 17 /**