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
46 - Divider()  
47 - .width('100%' )  
48 - .color($r('app.color.color_F5F5F5'))  
49 - .strokeWidth(5) 48 + if(!this.nextIsAggregateData){
  49 + Divider()
  50 + .width('100%' )
  51 + .color($r('app.color.color_F5F5F5'))
  52 + .strokeWidth(5)
  53 + }
50 } 54 }
51 55
52 } else { 56 } else {
53 Column(){ 57 Column(){
  58 +
54 Column() { 59 Column() {
55 60
56 Row() { 61 Row() {
@@ -72,11 +77,12 @@ export struct MoreComponent { @@ -72,11 +77,12 @@ export struct MoreComponent {
72 } 77 }
73 .padding({left: 10 + 6 , right: 10 + 6}) 78 .padding({left: 10 + 6 , right: 10 + 6})
74 } 79 }
75 -  
76 - Divider()  
77 - .width('100%' )  
78 - .color($r('app.color.color_F5F5F5'))  
79 - .strokeWidth(5) 80 + if(!this.nextIsAggregateData){
  81 + Divider()
  82 + .width('100%' )
  83 + .color($r('app.color.color_F5F5F5'))
  84 + .strokeWidth(5)
  85 + }
80 } 86 }
81 87
82 88
@@ -317,21 +317,40 @@ export struct SearchResultContentComponent { @@ -317,21 +317,40 @@ 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") {
322 - Column() {  
323 - Card9Component({  
324 - compDTO: new CompDTO,  
325 - contentDTO: item,  
326 - pageId: "",  
327 - pageName: ""  
328 - })  
329 - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 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 +
  331 + Column() {
  332 + Card9Component({
  333 + compDTO: new CompDTO,
  334 + contentDTO: item,
  335 + pageId: "",
  336 + pageName: ""
  337 + })
  338 + Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
  339 + }
  340 + .padding({left: 6, right: 6})
330 } 341 }
331 - .padding({left: 6, right: 6})  
332 } else { 342 } else {
333 - CardParser({ compDTO: new CompDTO, contentDTO: item })  
334 - .padding({left: 6, right: 6}) 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})
  351 + .padding({left: 6, right: 6})
  352 + }
  353 +
335 } 354 }
336 } 355 }
337 } 356 }
@@ -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