陈剑华

fix: 19529 【UI走查-卡片】折叠屏展开-小视频卡

@@ -20,6 +20,7 @@ import { DateTimeUtils } from 'wdKit/Index'; @@ -20,6 +20,7 @@ import { DateTimeUtils } from 'wdKit/Index';
20 import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index'; 20 import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index';
21 import { LiveBigImage02Component } from './cardview/LiveBigImage02Component'; 21 import { LiveBigImage02Component } from './cardview/LiveBigImage02Component';
22 import { LiveBigImage01Component } from './cardview/LiveBigImage01Component'; 22 import { LiveBigImage01Component } from './cardview/LiveBigImage01Component';
  23 +import { behindDivider } from './cardCommon/behindDivider'
23 24
24 /** 25 /**
25 * card适配器,卡片样式汇总,依据ContentDTO#appStyle 26 * card适配器,卡片样式汇总,依据ContentDTO#appStyle
@@ -31,6 +32,7 @@ export struct CardParser { @@ -31,6 +32,7 @@ export struct CardParser {
31 @State pageName: string = ''; 32 @State pageName: string = '';
32 @State contentDTO: ContentDTO = new ContentDTO(); 33 @State contentDTO: ContentDTO = new ContentDTO();
33 @State compIndex: number = 0; 34 @State compIndex: number = 0;
  35 + @State nextCompDTO: CompDTO = new CompDTO
34 @ObjectLink compDTO: CompDTO 36 @ObjectLink compDTO: CompDTO
35 pageShowTime: number = 0; 37 pageShowTime: number = 0;
36 pageHideTime: number = 0; 38 pageHideTime: number = 0;
@@ -62,6 +64,15 @@ export struct CardParser { @@ -62,6 +64,15 @@ export struct CardParser {
62 } 64 }
63 65
64 @Builder 66 @Builder
  67 + getBehindDivider() {
  68 + behindDivider({
  69 + compDTO: this.compDTO,
  70 + nextCompDTO: this.nextCompDTO,
  71 + compIndex: this.compIndex
  72 + })
  73 + }
  74 +
  75 + @Builder
65 contentBuilder(contentDTO: ContentDTO) { 76 contentBuilder(contentDTO: ContentDTO) {
66 // Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO }) 77 // Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO })
67 if (!!contentDTO.contentText) { 78 if (!!contentDTO.contentText) {
@@ -79,6 +90,7 @@ export struct CardParser { @@ -79,6 +90,7 @@ export struct CardParser {
79 pageId: this.pageId, 90 pageId: this.pageId,
80 pageName: this.pageName 91 pageName: this.pageName
81 }) 92 })
  93 + this.getBehindDivider()
82 } else if (contentDTO.appStyle === CompStyle.Card_03) { 94 } else if (contentDTO.appStyle === CompStyle.Card_03) {
83 Card3Component({ 95 Card3Component({
84 compDTO: this.compDTO, 96 compDTO: this.compDTO,
@@ -86,6 +98,7 @@ export struct CardParser { @@ -86,6 +98,7 @@ export struct CardParser {
86 pageId: this.pageId, 98 pageId: this.pageId,
87 pageName: this.pageName 99 pageName: this.pageName
88 }) 100 })
  101 + this.getBehindDivider()
89 } else if (contentDTO.appStyle === CompStyle.Card_04) { 102 } else if (contentDTO.appStyle === CompStyle.Card_04) {
90 Card4Component({ 103 Card4Component({
91 compDTO: this.compDTO, 104 compDTO: this.compDTO,
@@ -93,6 +106,7 @@ export struct CardParser { @@ -93,6 +106,7 @@ export struct CardParser {
93 pageId: this.pageId, 106 pageId: this.pageId,
94 pageName: this.pageName 107 pageName: this.pageName
95 }) 108 })
  109 + this.getBehindDivider()
96 } else if (contentDTO.appStyle === CompStyle.Card_05) { 110 } else if (contentDTO.appStyle === CompStyle.Card_05) {
97 Card5Component({ 111 Card5Component({
98 compDTO: this.compDTO, 112 compDTO: this.compDTO,
@@ -101,6 +115,7 @@ export struct CardParser { @@ -101,6 +115,7 @@ export struct CardParser {
101 pageId: this.pageId, 115 pageId: this.pageId,
102 pageName: this.pageName 116 pageName: this.pageName
103 }) 117 })
  118 + this.getBehindDivider()
104 } else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle.Card_13) { 119 } else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle.Card_13) {
105 Card6Component({ 120 Card6Component({
106 compDTO: this.compDTO, 121 compDTO: this.compDTO,
@@ -108,6 +123,7 @@ export struct CardParser { @@ -108,6 +123,7 @@ export struct CardParser {
108 pageId: this.pageId, 123 pageId: this.pageId,
109 pageName: this.pageName 124 pageName: this.pageName
110 }) 125 })
  126 + this.getBehindDivider()
111 } else if (contentDTO.appStyle === CompStyle.Card_10 || contentDTO.appStyle === CompStyle.Card_09) { 127 } else if (contentDTO.appStyle === CompStyle.Card_10 || contentDTO.appStyle === CompStyle.Card_09) {
112 Card10Component({ 128 Card10Component({
113 compDTO: this.compDTO, 129 compDTO: this.compDTO,
@@ -115,6 +131,7 @@ export struct CardParser { @@ -115,6 +131,7 @@ export struct CardParser {
115 pageId: this.pageId, 131 pageId: this.pageId,
116 pageName: this.pageName 132 pageName: this.pageName
117 }) 133 })
  134 + this.getBehindDivider()
118 } else if (contentDTO.appStyle === CompStyle.Card_11) { 135 } else if (contentDTO.appStyle === CompStyle.Card_11) {
119 Card11Component({ 136 Card11Component({
120 compDTO: this.compDTO, 137 compDTO: this.compDTO,
@@ -122,6 +139,7 @@ export struct CardParser { @@ -122,6 +139,7 @@ export struct CardParser {
122 pageId: this.pageId, 139 pageId: this.pageId,
123 pageName: this.pageName 140 pageName: this.pageName
124 }) 141 })
  142 + this.getBehindDivider()
125 } else if (contentDTO.appStyle === CompStyle.Card_12) { 143 } else if (contentDTO.appStyle === CompStyle.Card_12) {
126 Card12Component({ 144 Card12Component({
127 compDTO: this.compDTO, 145 compDTO: this.compDTO,
@@ -129,6 +147,7 @@ export struct CardParser { @@ -129,6 +147,7 @@ export struct CardParser {
129 pageId: this.pageId, 147 pageId: this.pageId,
130 pageName: this.pageName 148 pageName: this.pageName
131 }) 149 })
  150 + this.getBehindDivider()
132 } else if (contentDTO.appStyle === CompStyle.Card_14) { 151 } else if (contentDTO.appStyle === CompStyle.Card_14) {
133 Card14Component({ 152 Card14Component({
134 contentDTO, 153 contentDTO,
@@ -136,6 +155,7 @@ export struct CardParser { @@ -136,6 +155,7 @@ export struct CardParser {
136 pageId: this.pageId, 155 pageId: this.pageId,
137 pageName: this.pageName 156 pageName: this.pageName
138 }) 157 })
  158 + this.getBehindDivider()
139 } else if (contentDTO.appStyle === CompStyle.Card_15) { 159 } else if (contentDTO.appStyle === CompStyle.Card_15) {
140 Card15Component({ 160 Card15Component({
141 contentDTO, 161 contentDTO,
@@ -143,6 +163,7 @@ export struct CardParser { @@ -143,6 +163,7 @@ export struct CardParser {
143 pageId: this.pageId, 163 pageId: this.pageId,
144 pageName: this.pageName 164 pageName: this.pageName
145 }) 165 })
  166 + this.getBehindDivider()
146 } else if (contentDTO.appStyle === CompStyle.Card_16) { 167 } else if (contentDTO.appStyle === CompStyle.Card_16) {
147 Card16Component({ 168 Card16Component({
148 contentDTO, 169 contentDTO,
@@ -150,6 +171,7 @@ export struct CardParser { @@ -150,6 +171,7 @@ export struct CardParser {
150 pageId: this.pageId, 171 pageId: this.pageId,
151 pageName: this.pageName 172 pageName: this.pageName
152 }) 173 })
  174 + this.getBehindDivider()
153 } else if (contentDTO.appStyle === CompStyle.Card_17) { 175 } else if (contentDTO.appStyle === CompStyle.Card_17) {
154 Card17Component({ 176 Card17Component({
155 compDTO: this.compDTO, 177 compDTO: this.compDTO,
@@ -157,6 +179,7 @@ export struct CardParser { @@ -157,6 +179,7 @@ export struct CardParser {
157 pageId: this.pageId, 179 pageId: this.pageId,
158 pageName: this.pageName 180 pageName: this.pageName
159 }) 181 })
  182 + this.getBehindDivider()
160 } else if (contentDTO.appStyle === CompStyle.Card_19) { 183 } else if (contentDTO.appStyle === CompStyle.Card_19) {
161 Card19Component({ 184 Card19Component({
162 contentDTO, 185 contentDTO,
@@ -164,6 +187,7 @@ export struct CardParser { @@ -164,6 +187,7 @@ export struct CardParser {
164 pageId: this.pageId, 187 pageId: this.pageId,
165 pageName: this.pageName 188 pageName: this.pageName
166 }) 189 })
  190 + this.getBehindDivider()
167 } else if (contentDTO.appStyle === CompStyle.Card_20) { 191 } else if (contentDTO.appStyle === CompStyle.Card_20) {
168 Card20Component({ 192 Card20Component({
169 contentDTO, 193 contentDTO,
@@ -172,6 +196,7 @@ export struct CardParser { @@ -172,6 +196,7 @@ export struct CardParser {
172 pageName: this.pageName, 196 pageName: this.pageName,
173 isPeopleShipHome:this.isPeopleShipHome 197 isPeopleShipHome:this.isPeopleShipHome
174 }) 198 })
  199 + this.getBehindDivider()
175 } else if (contentDTO.appStyle === CompStyle.Card_21) { 200 } else if (contentDTO.appStyle === CompStyle.Card_21) {
176 Card21Component({ 201 Card21Component({
177 contentDTO, 202 contentDTO,
@@ -179,6 +204,7 @@ export struct CardParser { @@ -179,6 +204,7 @@ export struct CardParser {
179 pageId: this.pageId, 204 pageId: this.pageId,
180 pageName: this.pageName 205 pageName: this.pageName
181 }) 206 })
  207 + this.getBehindDivider()
182 } else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_01) { 208 } else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_01) {
183 LiveBigImage01Component({ 209 LiveBigImage01Component({
184 contentDTO: contentDTO, 210 contentDTO: contentDTO,
@@ -187,6 +213,7 @@ export struct CardParser { @@ -187,6 +213,7 @@ export struct CardParser {
187 pageName: this.pageName, 213 pageName: this.pageName,
188 index: this.compIndex 214 index: this.compIndex
189 }) 215 })
  216 + this.getBehindDivider()
190 } else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_02) { 217 } else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_02) {
191 LiveBigImage02Component({ 218 LiveBigImage02Component({
192 contentDTO: contentDTO, 219 contentDTO: contentDTO,
@@ -195,6 +222,7 @@ export struct CardParser { @@ -195,6 +222,7 @@ export struct CardParser {
195 pageName: this.pageName, 222 pageName: this.pageName,
196 index:this.compIndex 223 index:this.compIndex
197 }) 224 })
  225 + this.getBehindDivider()
198 } else { 226 } else {
199 // todo:组件未实现 / Component Not Implemented 227 // todo:组件未实现 / Component Not Implemented
200 // Text(contentDTO.appStyle) 228 // Text(contentDTO.appStyle)
1 import { CompDTO, ContentDTO } from 'wdBean'; 1 import { CompDTO, ContentDTO } from 'wdBean';
2 import { CommonConstants, CompStyle } from 'wdConstant/Index'; 2 import { CommonConstants, CompStyle } from 'wdConstant/Index';
3 -import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';  
4 import PageModel from '../viewmodel/PageModel'; 3 import PageModel from '../viewmodel/PageModel';
5 import { CardParser } from './CardParser'; 4 import { CardParser } from './CardParser';
6 import { Card2Component } from './cardview/Card2Component'; 5 import { Card2Component } from './cardview/Card2Component';
@@ -14,7 +13,6 @@ import { CompNormalTitle } from './compview/CompNormalTitle'; @@ -14,7 +13,6 @@ import { CompNormalTitle } from './compview/CompNormalTitle';
14 import { ZhGridLayout02NewsContent } from './compview/ZhGridLayout02NewsContent'; 13 import { ZhGridLayout02NewsContent } from './compview/ZhGridLayout02NewsContent';
15 import { ZhGridLayout03 } from './compview/ZhGridLayout03'; 14 import { ZhGridLayout03 } from './compview/ZhGridLayout03';
16 import { ZhSingleColumn04 } from './compview/ZhSingleColumn04'; 15 import { ZhSingleColumn04 } from './compview/ZhSingleColumn04';
17 -import { ZhSingleColumn05 } from './compview/ZhSingleColumn05';  
18 import { ZhSingleColumn09 } from './compview/ZhSingleColumn09'; 16 import { ZhSingleColumn09 } from './compview/ZhSingleColumn09';
19 import { ZhSingleRow02 } from './compview/ZhSingleRow02'; 17 import { ZhSingleRow02 } from './compview/ZhSingleRow02';
20 import { ZhSingleRow03 } from './compview/ZhSingleRow03'; 18 import { ZhSingleRow03 } from './compview/ZhSingleRow03';
@@ -28,6 +26,7 @@ import { @@ -28,6 +26,7 @@ import {
28 } from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent'; 26 } from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent';
29 import { LabelComponent } from './view/LabelComponent'; 27 import { LabelComponent } from './view/LabelComponent';
30 import { LiveHorizontalCardComponent } from './view/LiveHorizontalCardComponent'; 28 import { LiveHorizontalCardComponent } from './view/LiveHorizontalCardComponent';
  29 +import { behindDivider } from './cardCommon/behindDivider'
31 30
32 /** 31 /**
33 * comp适配器. 32 * comp适配器.
@@ -100,47 +99,12 @@ export struct CompParser { @@ -100,47 +99,12 @@ export struct CompParser {
100 // } 99 // }
101 100
102 @Builder 101 @Builder
103 - behindDevider() {  
104 - if (  
105 - this.compDTO.compStyle === CompStyle.Card_09 ||  
106 - this.compDTO.compStyle === CompStyle.Zh_Single_Column_09 ||  
107 - this.compDTO.compStyle === CompStyle.Zh_Single_Row_04 ||  
108 - this.compDTO.compStyle === CompStyle.Zh_Single_Row_06  
109 - ) {  
110 - if (this.compDTO.compStyle === this.nextCompDTO.compStyle) {  
111 - Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })  
112 - } else {  
113 - Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})  
114 - }  
115 - } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {  
116 - if (this.compIndex === 0) {  
117 - Divider().strokeWidth(1).color('#f5f5f5').width('120%').margin({left: -6})  
118 - } else {  
119 - Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})  
120 - }  
121 - } else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {  
122 - // 大专题  
123 - if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {  
124 - Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })  
125 - } else {  
126 - Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})  
127 - }  
128 - } else if (this.compDTO.compType === 'appStyle' || this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 || this.compDTO.compStyle === CompStyle.Zh_Single_Row_03 || this.compDTO.compStyle === CompStyle.Card_Comp_Adv || this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) {  
129 - if (  
130 - this.nextCompDTO.compStyle === CompStyle.Card_09 ||  
131 - this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10 ||  
132 - this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_09 ||  
133 - this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_04 ||  
134 - this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_06 ||  
135 - this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_12  
136 - ) {  
137 - Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})  
138 - } else {  
139 - Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })  
140 - }  
141 - } else {  
142 - // Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })  
143 - } 102 + getBehindDivider() {
  103 + behindDivider({
  104 + compDTO: this.compDTO,
  105 + nextCompDTO: this.nextCompDTO,
  106 + compIndex: this.compIndex
  107 + })
144 } 108 }
145 109
146 @Builder 110 @Builder
@@ -151,14 +115,17 @@ export struct CompParser { @@ -151,14 +115,17 @@ export struct CompParser {
151 this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口 115 this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口
152 if (this.compDTO.compStyle === CompStyle.Label_03) { 116 if (this.compDTO.compStyle === CompStyle.Label_03) {
153 LabelComponent({ compDTO: this.compDTO }) 117 LabelComponent({ compDTO: this.compDTO })
  118 + this.getBehindDivider()
154 } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { 119 } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
155 if (this.compDTO.operDataList.length > this.audioItems.length) { 120 if (this.compDTO.operDataList.length > this.audioItems.length) {
156 ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 121 ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
157 } 122 }
  123 + this.getBehindDivider()
158 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && 124 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 &&
159 this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡" 125 this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡"
160 // Text('LiveHorizontalCardComponent') 126 // Text('LiveHorizontalCardComponent')
161 LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 127 LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
  128 + this.getBehindDivider()
162 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) { 129 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) {
163 if (this.compDTO.operDataList.length > 1) { 130 if (this.compDTO.operDataList.length > 1) {
164 // Text('HorizontalStrokeCardThreeTwoRadioForMoreComponent') 131 // Text('HorizontalStrokeCardThreeTwoRadioForMoreComponent')
@@ -175,14 +142,17 @@ export struct CompParser { @@ -175,14 +142,17 @@ export struct CompParser {
175 pageName: this.pageName 142 pageName: this.pageName
176 }) 143 })
177 } 144 }
  145 + this.getBehindDivider()
178 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) { 146 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) {
179 ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 147 ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
180 - Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }) 148 + this.getBehindDivider()
181 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) { 149 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) {
182 ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 150 ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
  151 + this.getBehindDivider()
183 } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 ->标题 152 } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 ->标题
184 //ZhGridLayout02({ compDTO: this.compDTO }) 153 //ZhGridLayout02({ compDTO: this.compDTO })
185 CompNormalTitle({ compDTO: this.compDTO }) 154 CompNormalTitle({ compDTO: this.compDTO })
  155 + this.getBehindDivider()
186 } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 156 } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Zh_Grid_Layout_02) { //双列流小视频,一行两图卡
187 157
188 ZhGridLayout02NewsContent({ 158 ZhGridLayout02NewsContent({
@@ -191,16 +161,19 @@ export struct CompParser { @@ -191,16 +161,19 @@ export struct CompParser {
191 pageId: this.pageId, 161 pageId: this.pageId,
192 pageName: this.pageName 162 pageName: this.pageName
193 }) 163 })
  164 + this.getBehindDivider()
194 165
195 } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { 166 } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
196 ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 167 ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
197 - Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }) 168 + this.getBehindDivider()
198 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) { 169 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) {
199 ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 170 ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
  171 + this.getBehindDivider()
200 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) { 172 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) {
201 // ZhSingleRow05({ compDTO }) 173 // ZhSingleRow05({ compDTO })
202 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) { 174 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) {
203 ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 175 ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
  176 + this.getBehindDivider()
204 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) { 177 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
205 //头图卡 和comStyle 2相同, 178 //头图卡 和comStyle 2相同,
206 Card5Component({ 179 Card5Component({
@@ -210,6 +183,7 @@ export struct CompParser { @@ -210,6 +183,7 @@ export struct CompParser {
210 pageId: this.pageId, 183 pageId: this.pageId,
211 pageName: this.pageName 184 pageName: this.pageName
212 }) 185 })
  186 + this.getBehindDivider()
213 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) { 187 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
214 // 大图卡 188 // 大图卡
215 Card2Component({ 189 Card2Component({
@@ -218,6 +192,7 @@ export struct CompParser { @@ -218,6 +192,7 @@ export struct CompParser {
218 pageId: this.pageId, 192 pageId: this.pageId,
219 pageName: this.pageName 193 pageName: this.pageName
220 }) 194 })
  195 + this.getBehindDivider()
221 } else if (this.compDTO.compStyle === CompStyle.Card_09) { 196 } else if (this.compDTO.compStyle === CompStyle.Card_09) {
222 //时间链卡 197 //时间链卡
223 Card9Component({ 198 Card9Component({
@@ -226,6 +201,7 @@ export struct CompParser { @@ -226,6 +201,7 @@ export struct CompParser {
226 pageId: this.pageId, 201 pageId: this.pageId,
227 pageName: this.pageName 202 pageName: this.pageName
228 }) 203 })
  204 + this.getBehindDivider()
229 } else if (this.compDTO.compStyle === CompStyle.Card_13) { 205 } else if (this.compDTO.compStyle === CompStyle.Card_13) {
230 Card6Component({ 206 Card6Component({
231 compDTO: this.compDTO, 207 compDTO: this.compDTO,
@@ -233,6 +209,7 @@ export struct CompParser { @@ -233,6 +209,7 @@ export struct CompParser {
233 pageId: this.pageId, 209 pageId: this.pageId,
234 pageName: this.pageName 210 pageName: this.pageName
235 }) 211 })
  212 + this.getBehindDivider()
236 } else if (this.compDTO.compStyle === CompStyle.Card_03) { 213 } else if (this.compDTO.compStyle === CompStyle.Card_03) {
237 Card3Component({ 214 Card3Component({
238 compDTO: this.compDTO, 215 compDTO: this.compDTO,
@@ -240,15 +217,18 @@ export struct CompParser { @@ -240,15 +217,18 @@ export struct CompParser {
240 pageId: this.pageId, 217 pageId: this.pageId,
241 pageName: this.pageName 218 pageName: this.pageName
242 }) 219 })
  220 + this.getBehindDivider()
243 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) { 221 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
244 ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 222 ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
245 - Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }) 223 + this.getBehindDivider()
246 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { 224 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
247 // ZhSingleColumn05({ compDTO: compDTO }) 225 // ZhSingleColumn05({ compDTO: compDTO })
248 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) { 226 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) {
249 ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, pageModel: this.pageModel, compIndex: this.compIndex }) 227 ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, pageModel: this.pageModel, compIndex: this.compIndex })
  228 + this.getBehindDivider()
250 } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 229 } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告
251 AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO }) 230 AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO })
  231 + this.getBehindDivider()
252 //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 }) 232 //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 })
253 } else if (!Number.isNaN(Number(this.compDTO.compStyle)) || this.compDTO.compType === 'appStyle') { 233 } else if (!Number.isNaN(Number(this.compDTO.compStyle)) || this.compDTO.compType === 'appStyle') {
254 CardParser({ 234 CardParser({
@@ -256,7 +236,8 @@ export struct CompParser { @@ -256,7 +236,8 @@ export struct CompParser {
256 compDTO: this.compDTO, 236 compDTO: this.compDTO,
257 pageId: this.pageId, 237 pageId: this.pageId,
258 pageName: this.pageName, 238 pageName: this.pageName,
259 - compIndex: this.compIndex 239 + compIndex: this.compIndex,
  240 + nextCompDTO: this.nextCompDTO
260 }); 241 });
261 } else { 242 } else {
262 // Text(this.compDTO.compStyle) 243 // Text(this.compDTO.compStyle)
@@ -269,7 +250,6 @@ export struct CompParser { @@ -269,7 +250,6 @@ export struct CompParser {
269 // }) 250 // })
270 } 251 }
271 252
272 - this.behindDevider()  
273 } 253 }
274 254
275 255
  1 +import { CompDTO, ContentDTO } from 'wdBean';
  2 +import { CommonConstants, CompStyle } from 'wdConstant/Index';
  3 +
  4 +@Component
  5 +export struct behindDivider {
  6 + @ObjectLink compDTO: CompDTO
  7 + @State nextCompDTO: CompDTO = new CompDTO
  8 + @State compIndex: number = 0;
  9 +
  10 + build() {
  11 + if (
  12 + this.compDTO.compStyle === CompStyle.Card_09 ||
  13 + this.compDTO.compStyle === CompStyle.Zh_Single_Column_09 ||
  14 + this.compDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
  15 + this.compDTO.compStyle === CompStyle.Zh_Single_Row_06
  16 + ) {
  17 + if (this.compDTO.compStyle === this.nextCompDTO.compStyle) {
  18 + Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
  19 + } else {
  20 + Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
  21 + }
  22 + } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
  23 + if (this.compIndex === 0) {
  24 + Divider().strokeWidth(1).color('#f5f5f5').width('120%').margin({left: -6})
  25 + } else {
  26 + Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
  27 + }
  28 + } else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
  29 + // 大专题
  30 + if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
  31 + Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
  32 + } else {
  33 + Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
  34 + }
  35 + } else if (this.compDTO.compType === 'appStyle' || this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 || this.compDTO.compStyle === CompStyle.Zh_Single_Row_03 || this.compDTO.compStyle === CompStyle.Card_Comp_Adv || this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
  36 + if (
  37 + this.nextCompDTO.compStyle === CompStyle.Card_09 ||
  38 + this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10 ||
  39 + this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_09 ||
  40 + this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
  41 + this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_06 ||
  42 + this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_12
  43 + ) {
  44 + Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
  45 + } else {
  46 + Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
  47 + }
  48 + } else {
  49 + // Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
  50 + }
  51 + }
  52 +}