wangliang_wd

feat:优化主页动态

... ... @@ -61,9 +61,10 @@ export struct CarderInteraction {
}
if(this.contentDetailData?.openComment == 1 || router.getState().name === 'PeopleShipHomePage'){
this.commentLayout()
if (this.buildDisplayComment()) this.commentLayout()
}
this.builderLike()
if(this.buildDisplayLike()) this.builderLike()
}
.width('100%')
.margin({ top: 11 })
... ... @@ -121,5 +122,36 @@ export struct CarderInteraction {
console.log('请求失败', JSON.stringify(exception))
}
}
///是否展示评论
buildDisplayComment(): boolean {
let isDisplay = false
if (this.contentDTO.rmhInfo) {
if (this.contentDTO.rmhInfo.cnIsComment === 1 && this.contentDTO.openComment === 1) {
isDisplay = true
}
}else {
if (this.contentDTO.openComment === 1) {
isDisplay = true
}
}
return isDisplay
}
///是否展示点赞
buildDisplayLike(): boolean {
let isDisplay = false
if (this.contentDTO.rmhInfo) {
if (this.contentDTO.rmhInfo.cnIsLike === 1 && this.contentDTO.openLikes === 1) {
isDisplay = true
}
}else {
if (this.contentDTO.openLikes === 1) {
isDisplay = true
}
}
return isDisplay
}
}
... ...
... ... @@ -46,7 +46,7 @@ export struct MultiPictureDetailPageComponent {
private swiperController: SwiperController = new SwiperController()
private swiperControllerItem: SwiperController = new SwiperController()
@State swiperIndex: number = 0;
@Provide followStatus: string | undefined = undefined // 关注状态
@Provide followStatus: string | undefined = '0' // 关注状态
@Provide showCommentList: boolean = false
private scroller: Scroller = new Scroller()
private listScroller: ListScroller = new ListScroller()
... ...