王士厅
/**
* More_Comp
*/
import { ContentDTO , contentListParams, FullColumnImgUrlDTO,
import { ContentDTO , contentListParams, FullColumnImgUrlDTO, CompDTO
} from 'wdBean/Index';
import MinePageDatasModel from '../../model/MinePageDatasModel';
import SearcherAboutDataModel from '../../model/SearcherAboutDataModel';
import { SearchDescription } from '../../viewmodel/SearchResultContentItem';
import { CardParser } from '../CardParser'
const TAG: string = 'More_Comp';
... ... @@ -13,12 +14,26 @@ const TAG: string = 'More_Comp';
@Component
export struct MoreComponent {
@State contentDTO: ContentDTO = new ContentDTO();
@State showDetail: boolean = false;
aboutToAppear(): void {
this.dealSearchSameList()
}
build() {
if (this.showDetail) {
ForEach(this.contentDTO.sameContentList, (item: ContentDTO, index: number) => {
CardParser({compDTO:new CompDTO, contentDTO: item })
})
} else {
Column() {
Divider()
.width('100%')
.height(10)
.color($r('app.color.color_F5F5F5'))
.strokeWidth('1lpx')
Row() {
Text('点击展开更多相似')
.fontSize(16)
... ... @@ -27,12 +42,26 @@ export struct MoreComponent {
Image($r('app.media.comment_unfold'))
.width(16)
.height(16)
}
.justifyContent(FlexAlign.Center)
.width('100%')
.height(48)
.backgroundColor(0xffffff)
.onClick(() => {
this.showDetail = true;
})
Divider()
.width('100%')
.height(10)
.color($r('app.color.color_F5F5F5'))
.strokeWidth('1lpx')
}
}
}
dealSearchSameList() {
... ... @@ -88,6 +117,8 @@ export struct MoreComponent {
console.log("ycg","123")
}
})
console.log("MoreComponent", JSON.stringify(this.contentDTO.sameContentList))
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
})
... ...
... ... @@ -176,6 +176,7 @@ export struct QualityCommentsComponent {
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight('42lpx')
.visibility(this.tileOpacity < 0.8 ? 1 : 0)
}
.height(44)
.width('100%')
... ...