陈剑华

fix: 17931 UI还原问题-【uat】地区精选卡,上下两条线比android细,看图

@@ -38,6 +38,7 @@ export struct CompParser { @@ -38,6 +38,7 @@ export struct CompParser {
38 @State pageId: string = ''; 38 @State pageId: string = '';
39 @State pageName: string = ''; 39 @State pageName: string = '';
40 @ObjectLink compDTO: CompDTO 40 @ObjectLink compDTO: CompDTO
  41 + @State nextCompDTO: CompDTO = new CompDTO
41 @State compIndex: number = 0; 42 @State compIndex: number = 0;
42 @State private pageModel: PageModel = new PageModel(); 43 @State private pageModel: PageModel = new PageModel();
43 @State audioItems: ContentDTO[] = []; 44 @State audioItems: ContentDTO[] = [];
@@ -83,17 +84,14 @@ export struct CompParser { @@ -83,17 +84,14 @@ export struct CompParser {
83 this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口 84 this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口
84 if (this.compDTO.compStyle === CompStyle.Label_03) { 85 if (this.compDTO.compStyle === CompStyle.Label_03) {
85 LabelComponent({ compDTO: this.compDTO }) 86 LabelComponent({ compDTO: this.compDTO })
86 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
87 } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { 87 } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
88 if (this.compDTO.operDataList.length > this.audioItems.length) { 88 if (this.compDTO.operDataList.length > this.audioItems.length) {
89 ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 89 ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
90 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
91 } 90 }
92 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && 91 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 &&
93 this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡" 92 this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡"
94 93
95 LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 94 LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
96 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
97 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) { 95 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) {
98 if (this.compDTO.operDataList.length > 1) { 96 if (this.compDTO.operDataList.length > 1) {
99 HorizontalStrokeCardThreeTwoRadioForMoreComponent({ 97 HorizontalStrokeCardThreeTwoRadioForMoreComponent({
@@ -108,17 +106,13 @@ export struct CompParser { @@ -108,17 +106,13 @@ export struct CompParser {
108 pageName: this.pageName 106 pageName: this.pageName
109 }) 107 })
110 } 108 }
111 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
112 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) { 109 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) {
113 ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 110 ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
114 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
115 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) { 111 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) {
116 ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 112 ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
117 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
118 } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 ->标题 113 } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 ->标题
119 //ZhGridLayout02({ compDTO: this.compDTO }) 114 //ZhGridLayout02({ compDTO: this.compDTO })
120 CompNormalTitle({ compDTO: this.compDTO }) 115 CompNormalTitle({ compDTO: this.compDTO })
121 - // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })  
122 } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 116 } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Zh_Grid_Layout_02) { //双列流小视频,一行两图卡
123 117
124 ZhGridLayout02NewsContent({ 118 ZhGridLayout02NewsContent({
@@ -130,16 +124,12 @@ export struct CompParser { @@ -130,16 +124,12 @@ export struct CompParser {
130 124
131 } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { 125 } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
132 ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 126 ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
133 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
134 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) { 127 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) {
135 ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 128 ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
136 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
137 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) { 129 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) {
138 // ZhSingleRow05({ compDTO }) 130 // ZhSingleRow05({ compDTO })
139 - // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })  
140 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) { 131 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) {
141 ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 132 ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
142 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
143 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) { 133 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
144 //头图卡 和comStyle 2相同, 134 //头图卡 和comStyle 2相同,
145 Card5Component({ 135 Card5Component({
@@ -149,7 +139,6 @@ export struct CompParser { @@ -149,7 +139,6 @@ export struct CompParser {
149 pageId: this.pageId, 139 pageId: this.pageId,
150 pageName: this.pageName 140 pageName: this.pageName
151 }) 141 })
152 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
153 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) { 142 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
154 // 大图卡 143 // 大图卡
155 Card2Component({ 144 Card2Component({
@@ -158,7 +147,6 @@ export struct CompParser { @@ -158,7 +147,6 @@ export struct CompParser {
158 pageId: this.pageId, 147 pageId: this.pageId,
159 pageName: this.pageName 148 pageName: this.pageName
160 }) 149 })
161 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
162 } else if (this.compDTO.compStyle === CompStyle.Card_09) { 150 } else if (this.compDTO.compStyle === CompStyle.Card_09) {
163 //时间链卡 151 //时间链卡
164 Card9Component({ 152 Card9Component({
@@ -167,7 +155,6 @@ export struct CompParser { @@ -167,7 +155,6 @@ export struct CompParser {
167 pageId: this.pageId, 155 pageId: this.pageId,
168 pageName: this.pageName 156 pageName: this.pageName
169 }) 157 })
170 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
171 } else if (this.compDTO.compStyle === CompStyle.Card_13) { 158 } else if (this.compDTO.compStyle === CompStyle.Card_13) {
172 Card6Component({ 159 Card6Component({
173 compDTO: this.compDTO, 160 compDTO: this.compDTO,
@@ -175,7 +162,6 @@ export struct CompParser { @@ -175,7 +162,6 @@ export struct CompParser {
175 pageId: this.pageId, 162 pageId: this.pageId,
176 pageName: this.pageName 163 pageName: this.pageName
177 }) 164 })
178 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
179 } else if (this.compDTO.compStyle === CompStyle.Card_03) { 165 } else if (this.compDTO.compStyle === CompStyle.Card_03) {
180 Card3Component({ 166 Card3Component({
181 compDTO: this.compDTO, 167 compDTO: this.compDTO,
@@ -183,20 +169,15 @@ export struct CompParser { @@ -183,20 +169,15 @@ export struct CompParser {
183 pageId: this.pageId, 169 pageId: this.pageId,
184 pageName: this.pageName 170 pageName: this.pageName
185 }) 171 })
186 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
187 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) { 172 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
188 ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 173 ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
189 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
190 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { 174 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
191 // ZhSingleColumn05({ compDTO: compDTO }) 175 // ZhSingleColumn05({ compDTO: compDTO })
192 - // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })  
193 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) { 176 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) {
194 ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 177 ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
195 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
196 } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 178 } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告
197 AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO }) 179 AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO })
198 //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 }) 180 //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 })
199 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
200 } else if (!Number.isNaN(Number(this.compDTO.compStyle)) || this.compDTO.compType === 'appStyle') { 181 } else if (!Number.isNaN(Number(this.compDTO.compStyle)) || this.compDTO.compType === 'appStyle') {
201 CardParser({ 182 CardParser({
202 contentDTO: this.compDTO.operDataList[0], 183 contentDTO: this.compDTO.operDataList[0],
@@ -205,7 +186,6 @@ export struct CompParser { @@ -205,7 +186,6 @@ export struct CompParser {
205 pageName: this.pageName, 186 pageName: this.pageName,
206 compIndex: this.compIndex 187 compIndex: this.compIndex
207 }); 188 });
208 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
209 } else { 189 } else {
210 // Text(this.compDTO.compStyle) 190 // Text(this.compDTO.compStyle)
211 // .width(CommonConstants.FULL_PARENT) 191 // .width(CommonConstants.FULL_PARENT)
@@ -215,9 +195,43 @@ export struct CompParser { @@ -215,9 +195,43 @@ export struct CompParser {
215 // WDRouterRule.jumpWithPage(WDRouterPage.QualityCommentsPage) 195 // WDRouterRule.jumpWithPage(WDRouterPage.QualityCommentsPage)
216 // } 196 // }
217 // }) 197 // })
218 - // Divider().strokeWidth(8).color('#f5f5f5').padding({ left: 0, right: 0 }) 198 + }
  199 +
  200 + if (
  201 + this.compDTO.compStyle === CompStyle.Card_09 ||
  202 + this.compDTO.compStyle === CompStyle.Zh_Single_Column_09 ||
  203 + this.compDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
  204 + this.compDTO.compStyle === CompStyle.Zh_Single_Row_06
  205 + ) {
  206 + if (this.compDTO.compStyle === this.nextCompDTO.compStyle) {
  207 + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
  208 + } else {
  209 + Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 16, right: 16 })
  210 + }
  211 + } else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
  212 + // 大专题
  213 + if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
  214 + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
  215 + } else {
  216 + Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 16, right: 16 })
  217 + }
  218 + } else if (this.compDTO.compType === 'appStyle') {
  219 + if (
  220 + this.nextCompDTO.compStyle === CompStyle.Card_09 ||
  221 + this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10 ||
  222 + this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_09 ||
  223 + this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
  224 + this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_06
  225 + ) {
  226 + Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 16, right: 16 })
  227 + } else {
  228 + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
  229 + }
  230 + } else {
  231 + // Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
219 } 232 }
220 } 233 }
221 234
  235 +
222 } 236 }
223 } 237 }
@@ -95,7 +95,15 @@ export struct PageComponent { @@ -95,7 +95,15 @@ export struct PageComponent {
95 LazyForEach(this.pageModel.compList, (compDTO: CompDTO, compIndex: number) => { 95 LazyForEach(this.pageModel.compList, (compDTO: CompDTO, compIndex: number) => {
96 ListItem() { 96 ListItem() {
97 Column() { 97 Column() {
98 - CompParser({ pageModel: this.pageModel, compDTO: compDTO, compIndex: compIndex, pageId: this.pageId }); 98 + CompParser(
  99 + {
  100 + pageModel: this.pageModel,
  101 + nextCompDTO: compIndex === this.pageModel.compList.getDataArray().length - 1 ? new CompDTO() : this.pageModel.compList.get(compIndex + 1) as CompDTO,
  102 + compDTO: compDTO,
  103 + compIndex: compIndex,
  104 + pageId: this.pageId
  105 + }
  106 + );
99 } 107 }
100 } 108 }
101 }, 109 },
@@ -123,6 +123,7 @@ export default struct TemplatePageComponent { @@ -123,6 +123,7 @@ export default struct TemplatePageComponent {
123 123
124 CompParser({ 124 CompParser({
125 compDTO: compDTO, 125 compDTO: compDTO,
  126 + nextCompDTO: index === this.templatePage.compList.getDataArray().length - 1 ? new CompDTO() : this.templatePage.compList.get(index + 1) as CompDTO,
126 compIndex: index, 127 compIndex: index,
127 pageId: this.pageId, 128 pageId: this.pageId,
128 pageName: this.pageName 129 pageName: this.pageName