|
@@ -26,6 +26,32 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
|
|
|
if !(self.videoItemMdl?.video == nil || self.videoItemMdl?.video == "") {
|
|
|
videoPlayView.assetURLString = self.videoItemMdl?.video
|
|
|
}
|
|
|
+
|
|
|
+ personIconBtn.kf.setImage(with: kURLImage(name: self.videoItemMdl?.avatar ?? ""), for: .normal, placeholder: kImage(name: "default_avatar"))
|
|
|
+ personLabel.text = self.videoItemMdl?.username
|
|
|
+
|
|
|
+ commentBtn.titleLabel?.text = "\(self.videoItemMdl?.commentCount ?? 0)"
|
|
|
+ collectBtn.titleLabel?.text = "\(self.videoItemMdl?.collectCount ?? 0)"
|
|
|
+ likeBtn.titleLabel?.text = "\(self.videoItemMdl?.praiseCount ?? 0)"
|
|
|
+
|
|
|
+ collectBtn.isSelected = self.videoItemMdl?.isCollect == 0 ? false : true
|
|
|
+ likeBtn.isSelected = self.videoItemMdl?.isLike == 0 ? false : true
|
|
|
+
|
|
|
+ if self.videoItemMdl?.isFollow == 0 {
|
|
|
+ // 未关注
|
|
|
+ followButton.setTitle("+关注", for: UIControl.State.normal)
|
|
|
+ followButton.backgroundColor = k62CC74Color
|
|
|
+ } else {
|
|
|
+ // 已关注
|
|
|
+ followButton.setTitle("已关注", for: UIControl.State.normal)
|
|
|
+ followButton.backgroundColor = .clear
|
|
|
+ followButton.layer.borderWidth = 1
|
|
|
+ followButton.layer.borderColor = kffffffColor.cgColor
|
|
|
+ }
|
|
|
+
|
|
|
+// title string 标题
|
|
|
+// content string 内容
|
|
|
+// topic array 话题数组,id=>name
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -309,7 +335,7 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
|
|
|
|
|
|
private lazy var commentBtn: UIButton = {
|
|
|
let commentBtn = UIButton(type: UIButton.ButtonType.custom)
|
|
|
- commentBtn.setTitle("5178", for: UIControl.State.normal)
|
|
|
+ commentBtn.setTitle("0", for: UIControl.State.normal)
|
|
|
commentBtn.setTitleColor(kffffffColor, for: UIControl.State.normal)
|
|
|
commentBtn.setImage(kImage(name: "video_btn_note_white"), for: UIControl.State.normal)
|
|
|
commentBtn.titleLabel?.font = kRegularFont14
|
|
@@ -323,7 +349,7 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
|
|
|
|
|
|
private lazy var collectBtn: UIButton = {
|
|
|
let collectBtn = UIButton(type: UIButton.ButtonType.custom)
|
|
|
- collectBtn.setTitle("6124", for: UIControl.State.normal)
|
|
|
+ collectBtn.setTitle("0", for: UIControl.State.normal)
|
|
|
collectBtn.setTitleColor(kffffffColor, for: UIControl.State.normal)
|
|
|
collectBtn.setImage(kImage(name: "video_btn_collect_white"), for: UIControl.State.normal)
|
|
|
collectBtn.setImage(kImage(name: "btn_collect_pre"), for: UIControl.State.selected)
|
|
@@ -339,7 +365,7 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
|
|
|
|
|
|
private lazy var likeBtn: UIButton = {
|
|
|
let likeBtn = UIButton(type: UIButton.ButtonType.custom)
|
|
|
- likeBtn.setTitle("8844", for: UIControl.State.normal)
|
|
|
+ likeBtn.setTitle("0", for: UIControl.State.normal)
|
|
|
likeBtn.setTitleColor(kffffffColor, for: UIControl.State.normal)
|
|
|
likeBtn.setImage(kImage(name: "video_btn_praise_white"), for: UIControl.State.normal)
|
|
|
likeBtn.setImage(kImage(name: "btn_praise_pre_36px"), for: UIControl.State.selected)
|
|
@@ -405,7 +431,6 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
|
|
|
|
|
|
private lazy var personLabel: UILabel = {
|
|
|
let personLabel = UILabel()
|
|
|
- personLabel.text = "林萌萌的萌萌哒"
|
|
|
personLabel.textColor = kffffffColor
|
|
|
personLabel.font = kRegularFont15
|
|
|
return personLabel
|
|
@@ -416,7 +441,7 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
|
|
|
followButton.titleLabel?.font = kMediumFont13
|
|
|
followButton.layer.cornerRadius = 13
|
|
|
followButton.layer.masksToBounds = true
|
|
|
- followButton.layer.borderWidth = 1
|
|
|
+ followButton.setTitleColor(kffffffColor, for: .normal)
|
|
|
followButton.rx.tap.subscribe(onNext: {[weak self] (data) in
|
|
|
if let buttonClickClosure = self?.buttonClickClosure {
|
|
|
buttonClickClosure(videoBtnClickType.typeFollow)
|