yangchenggong1_wd

fix |> 20793 搜索结果页,聚合的搜索结果,出现在第一条上面不要分割,出现在页面中间上下都要有粗分割线,鸿蒙现状:出现在页面中间,上分割线未加粗

@@ -113,6 +113,8 @@ export class ContentDTO implements BaseDTO { @@ -113,6 +113,8 @@ export class ContentDTO implements BaseDTO {
113 sameContentListJson:string = "" 113 sameContentListJson:string = ""
114 sameContentListSize:number = 0 114 sameContentListSize:number = 0
115 sameContentListId:string = "" 115 sameContentListId:string = ""
  116 + isAggregateData:boolean = false
  117 +
116 /* 118 /*
117 本地辅助字段 119 本地辅助字段
118 */ 120 */
@@ -16,6 +16,7 @@ const TAG: string = 'More_Comp'; @@ -16,6 +16,7 @@ const TAG: string = 'More_Comp';
16 export struct MoreComponent { 16 export struct MoreComponent {
17 @State contentDTO: ContentDTO = new ContentDTO(); 17 @State contentDTO: ContentDTO = new ContentDTO();
18 @State showDetail: boolean = false; 18 @State showDetail: boolean = false;
  19 + @Prop nextIsAggregateData: boolean = false;
19 20
20 aboutToAppear(): void { 21 aboutToAppear(): void {
21 this.dealSearchSameList() 22 this.dealSearchSameList()
@@ -24,6 +25,7 @@ export struct MoreComponent { @@ -24,6 +25,7 @@ export struct MoreComponent {
24 build() { 25 build() {
25 if (this.showDetail) { 26 if (this.showDetail) {
26 Column(){ 27 Column(){
  28 +
27 ForEach(this.contentDTO.sameContentList, (item: ContentDTO, index: number) => { 29 ForEach(this.contentDTO.sameContentList, (item: ContentDTO, index: number) => {
28 if (item.appStyle !== "9") { 30 if (item.appStyle !== "9") {
29 CardParser({compDTO:new CompDTO, contentDTO: item ,isNeedDivider:index === this.contentDTO.sameContentList.length -1 ? false:true}) 31 CardParser({compDTO:new CompDTO, contentDTO: item ,isNeedDivider:index === this.contentDTO.sameContentList.length -1 ? false:true})
@@ -43,14 +45,17 @@ export struct MoreComponent { @@ -43,14 +45,17 @@ export struct MoreComponent {
43 } 45 }
44 }) 46 })
45 47
  48 + if(!this.nextIsAggregateData){
46 Divider() 49 Divider()
47 .width('100%' ) 50 .width('100%' )
48 .color($r('app.color.color_F5F5F5')) 51 .color($r('app.color.color_F5F5F5'))
49 .strokeWidth(5) 52 .strokeWidth(5)
50 } 53 }
  54 + }
51 55
52 } else { 56 } else {
53 Column(){ 57 Column(){
  58 +
54 Column() { 59 Column() {
55 60
56 Row() { 61 Row() {
@@ -72,12 +77,13 @@ export struct MoreComponent { @@ -72,12 +77,13 @@ export struct MoreComponent {
72 } 77 }
73 .padding({left: 10 + 6 , right: 10 + 6}) 78 .padding({left: 10 + 6 , right: 10 + 6})
74 } 79 }
75 - 80 + if(!this.nextIsAggregateData){
76 Divider() 81 Divider()
77 .width('100%' ) 82 .width('100%' )
78 .color($r('app.color.color_F5F5F5')) 83 .color($r('app.color.color_F5F5F5'))
79 .strokeWidth(5) 84 .strokeWidth(5)
80 } 85 }
  86 + }
81 87
82 88
83 89
@@ -317,8 +317,17 @@ export struct SearchResultContentComponent { @@ -317,8 +317,17 @@ export struct SearchResultContentComponent {
317 ActivityItemComponent({ contentDTO: item }) 317 ActivityItemComponent({ contentDTO: item })
318 .padding({left: 6, right: 6}) 318 .padding({left: 6, right: 6})
319 } else if (item.sameContentListSize > 0) { 319 } else if (item.sameContentListSize > 0) {
320 - MoreComponent({ contentDTO: item }) 320 + MoreComponent({ contentDTO: item ,
  321 + nextIsAggregateData:(index+1 < this.data.totalCount() && this.data.get(index+1).isAggregateData)})
321 } else if (item.appStyle == "9") { 322 } else if (item.appStyle == "9") {
  323 + Column(){
  324 + if(item.isAggregateData && index != 0){
  325 + Divider()
  326 + .width('100%' )
  327 + .color($r('app.color.color_F5F5F5'))
  328 + .strokeWidth(5)
  329 + }
  330 +
322 Column() { 331 Column() {
323 Card9Component({ 332 Card9Component({
324 compDTO: new CompDTO, 333 compDTO: new CompDTO,
@@ -329,10 +338,20 @@ export struct SearchResultContentComponent { @@ -329,10 +338,20 @@ export struct SearchResultContentComponent {
329 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 338 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
330 } 339 }
331 .padding({left: 6, right: 6}) 340 .padding({left: 6, right: 6})
  341 + }
332 } else { 342 } else {
333 - CardParser({ compDTO: new CompDTO, contentDTO: item }) 343 + Column(){
  344 + if(item.isAggregateData && index != 0){
  345 + Divider()
  346 + .width('100%' )
  347 + .color($r('app.color.color_F5F5F5'))
  348 + .strokeWidth(5)
  349 + }
  350 + CardParser({ compDTO: new CompDTO, contentDTO: item ,isNeedDivider: (index+1 < this.data.totalCount() && this.data.get(index+1).isAggregateData) ? false : true})
334 .padding({left: 6, right: 6}) 351 .padding({left: 6, right: 6})
335 } 352 }
  353 +
  354 + }
336 } 355 }
337 } 356 }
338 }, (item: ContentDTO, index: number) => index.toString()) 357 }, (item: ContentDTO, index: number) => index.toString())
@@ -564,6 +583,7 @@ export struct SearchResultContentComponent { @@ -564,6 +583,7 @@ export struct SearchResultContentComponent {
564 contentDTO.shareFlag = value.data.shareFlag 583 contentDTO.shareFlag = value.data.shareFlag
565 contentDTO.contentText = value.data.contentText 584 contentDTO.contentText = value.data.contentText
566 contentDTO.author = value.data.author 585 contentDTO.author = value.data.author
  586 + contentDTO.isAggregateData = (value.data.sameContentList != null && value.data.sameContentList.length > 0)
567 return contentDTO; 587 return contentDTO;
568 } 588 }
569 589