Showing
2 changed files
with
35 additions
and
3 deletions
| @@ -61,9 +61,10 @@ export struct CarderInteraction { | @@ -61,9 +61,10 @@ export struct CarderInteraction { | ||
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | if(this.contentDetailData?.openComment == 1 || router.getState().name === 'PeopleShipHomePage'){ | 63 | if(this.contentDetailData?.openComment == 1 || router.getState().name === 'PeopleShipHomePage'){ |
| 64 | - this.commentLayout() | 64 | + if (this.buildDisplayComment()) this.commentLayout() |
| 65 | } | 65 | } |
| 66 | - this.builderLike() | 66 | + |
| 67 | + if(this.buildDisplayLike()) this.builderLike() | ||
| 67 | } | 68 | } |
| 68 | .width('100%') | 69 | .width('100%') |
| 69 | .margin({ top: 11 }) | 70 | .margin({ top: 11 }) |
| @@ -121,5 +122,36 @@ export struct CarderInteraction { | @@ -121,5 +122,36 @@ export struct CarderInteraction { | ||
| 121 | console.log('请求失败', JSON.stringify(exception)) | 122 | console.log('请求失败', JSON.stringify(exception)) |
| 122 | } | 123 | } |
| 123 | } | 124 | } |
| 125 | + | ||
| 126 | + ///是否展示评论 | ||
| 127 | + buildDisplayComment(): boolean { | ||
| 128 | + let isDisplay = false | ||
| 129 | + if (this.contentDTO.rmhInfo) { | ||
| 130 | + if (this.contentDTO.rmhInfo.cnIsComment === 1 && this.contentDTO.openComment === 1) { | ||
| 131 | + isDisplay = true | ||
| 132 | + } | ||
| 133 | + }else { | ||
| 134 | + if (this.contentDTO.openComment === 1) { | ||
| 135 | + isDisplay = true | ||
| 136 | + } | ||
| 137 | + } | ||
| 138 | + return isDisplay | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + ///是否展示点赞 | ||
| 142 | + buildDisplayLike(): boolean { | ||
| 143 | + let isDisplay = false | ||
| 144 | + if (this.contentDTO.rmhInfo) { | ||
| 145 | + if (this.contentDTO.rmhInfo.cnIsLike === 1 && this.contentDTO.openLikes === 1) { | ||
| 146 | + isDisplay = true | ||
| 147 | + } | ||
| 148 | + }else { | ||
| 149 | + if (this.contentDTO.openLikes === 1) { | ||
| 150 | + isDisplay = true | ||
| 151 | + } | ||
| 152 | + } | ||
| 153 | + return isDisplay | ||
| 154 | + } | ||
| 155 | + | ||
| 124 | } | 156 | } |
| 125 | 157 |
| @@ -46,7 +46,7 @@ export struct MultiPictureDetailPageComponent { | @@ -46,7 +46,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 46 | private swiperController: SwiperController = new SwiperController() | 46 | private swiperController: SwiperController = new SwiperController() |
| 47 | private swiperControllerItem: SwiperController = new SwiperController() | 47 | private swiperControllerItem: SwiperController = new SwiperController() |
| 48 | @State swiperIndex: number = 0; | 48 | @State swiperIndex: number = 0; |
| 49 | - @Provide followStatus: string | undefined = undefined // 关注状态 | 49 | + @Provide followStatus: string | undefined = '0' // 关注状态 |
| 50 | @Provide showCommentList: boolean = false | 50 | @Provide showCommentList: boolean = false |
| 51 | private scroller: Scroller = new Scroller() | 51 | private scroller: Scroller = new Scroller() |
| 52 | private listScroller: ListScroller = new ListScroller() | 52 | private listScroller: ListScroller = new ListScroller() |
-
Please register or login to post a comment