Showing
1 changed file
with
8 additions
and
4 deletions
| @@ -37,10 +37,14 @@ export struct PlayerRightView { | @@ -37,10 +37,14 @@ export struct PlayerRightView { | ||
| 37 | @Consume showCommentList: boolean | 37 | @Consume showCommentList: boolean |
| 38 | @Consume displayDirection: DisplayDirection | 38 | @Consume displayDirection: DisplayDirection |
| 39 | @Consume publishCommentModel: publishCommentModel | 39 | @Consume publishCommentModel: publishCommentModel |
| 40 | - @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | ||
| 41 | - | 40 | + @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 |
| 41 | + @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 | ||
| 42 | aboutToAppear() { | 42 | aboutToAppear() { |
| 43 | - | 43 | + // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 |
| 44 | + this.likesStyle = this.contentDetailData.likesStyle | ||
| 45 | + this.openLikes = this.contentDetailData.openLikes == 1 ? true : false | ||
| 46 | + // console.log(TAG, 'this.likesStyle', this.likesStyle) | ||
| 47 | + // console.log(TAG, 'this.openLikes', this.openLikes) | ||
| 44 | } | 48 | } |
| 45 | 49 | ||
| 46 | /** | 50 | /** |
| @@ -299,7 +303,7 @@ export struct PlayerRightView { | @@ -299,7 +303,7 @@ export struct PlayerRightView { | ||
| 299 | .margin({ top: 2 }) | 303 | .margin({ top: 2 }) |
| 300 | } | 304 | } |
| 301 | .margin({ bottom: 20 }) | 305 | .margin({ bottom: 20 }) |
| 302 | - .visibility(this.likesStyle !== 4 ? Visibility.Visible : Visibility.None) | 306 | + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible) |
| 303 | .onClick(() => { | 307 | .onClick(() => { |
| 304 | // TODO:点赞动画 | 308 | // TODO:点赞动画 |
| 305 | this.toggleLikeStatus() | 309 | this.toggleLikeStatus() |
-
Please register or login to post a comment