王士厅
1 /** 1 /**
2 * More_Comp 2 * More_Comp
3 */ 3 */
4 -import { ContentDTO , contentListParams, FullColumnImgUrlDTO, 4 +import { ContentDTO , contentListParams, FullColumnImgUrlDTO, CompDTO
5 } from 'wdBean/Index'; 5 } from 'wdBean/Index';
6 import MinePageDatasModel from '../../model/MinePageDatasModel'; 6 import MinePageDatasModel from '../../model/MinePageDatasModel';
7 import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'; 7 import SearcherAboutDataModel from '../../model/SearcherAboutDataModel';
8 import { SearchDescription } from '../../viewmodel/SearchResultContentItem'; 8 import { SearchDescription } from '../../viewmodel/SearchResultContentItem';
  9 +import { CardParser } from '../CardParser'
9 10
10 const TAG: string = 'More_Comp'; 11 const TAG: string = 'More_Comp';
11 12
@@ -13,12 +14,26 @@ const TAG: string = 'More_Comp'; @@ -13,12 +14,26 @@ const TAG: string = 'More_Comp';
13 @Component 14 @Component
14 export struct MoreComponent { 15 export struct MoreComponent {
15 @State contentDTO: ContentDTO = new ContentDTO(); 16 @State contentDTO: ContentDTO = new ContentDTO();
  17 + @State showDetail: boolean = false;
16 18
17 aboutToAppear(): void { 19 aboutToAppear(): void {
18 this.dealSearchSameList() 20 this.dealSearchSameList()
19 } 21 }
20 22
21 build() { 23 build() {
  24 + if (this.showDetail) {
  25 + ForEach(this.contentDTO.sameContentList, (item: ContentDTO, index: number) => {
  26 + CardParser({compDTO:new CompDTO, contentDTO: item })
  27 + })
  28 + } else {
  29 + Column() {
  30 +
  31 + Divider()
  32 + .width('100%')
  33 + .height(10)
  34 + .color($r('app.color.color_F5F5F5'))
  35 + .strokeWidth('1lpx')
  36 +
22 Row() { 37 Row() {
23 Text('点击展开更多相似') 38 Text('点击展开更多相似')
24 .fontSize(16) 39 .fontSize(16)
@@ -27,12 +42,26 @@ export struct MoreComponent { @@ -27,12 +42,26 @@ export struct MoreComponent {
27 Image($r('app.media.comment_unfold')) 42 Image($r('app.media.comment_unfold'))
28 .width(16) 43 .width(16)
29 .height(16) 44 .height(16)
30 -  
31 } 45 }
32 .justifyContent(FlexAlign.Center) 46 .justifyContent(FlexAlign.Center)
33 .width('100%') 47 .width('100%')
34 .height(48) 48 .height(48)
35 .backgroundColor(0xffffff) 49 .backgroundColor(0xffffff)
  50 + .onClick(() => {
  51 + this.showDetail = true;
  52 + })
  53 +
  54 + Divider()
  55 + .width('100%')
  56 + .height(10)
  57 + .color($r('app.color.color_F5F5F5'))
  58 + .strokeWidth('1lpx')
  59 +
  60 + }
  61 + }
  62 +
  63 +
  64 +
36 } 65 }
37 66
38 dealSearchSameList() { 67 dealSearchSameList() {
@@ -88,6 +117,8 @@ export struct MoreComponent { @@ -88,6 +117,8 @@ export struct MoreComponent {
88 console.log("ycg","123") 117 console.log("ycg","123")
89 } 118 }
90 }) 119 })
  120 +
  121 + console.log("MoreComponent", JSON.stringify(this.contentDTO.sameContentList))
91 }).catch((err: Error) => { 122 }).catch((err: Error) => {
92 console.log(TAG, JSON.stringify(err)) 123 console.log(TAG, JSON.stringify(err))
93 }) 124 })
@@ -176,6 +176,7 @@ export struct QualityCommentsComponent { @@ -176,6 +176,7 @@ export struct QualityCommentsComponent {
176 .fontWeight(400) 176 .fontWeight(400)
177 .fontColor($r('app.color.color_222222')) 177 .fontColor($r('app.color.color_222222'))
178 .lineHeight('42lpx') 178 .lineHeight('42lpx')
  179 + .visibility(this.tileOpacity < 0.8 ? 1 : 0)
179 } 180 }
180 .height(44) 181 .height(44)
181 .width('100%') 182 .width('100%')