|
@@ -151,7 +151,7 @@ class CommunityFollowStatusTableViewCell: UITableViewCell {
|
|
|
avatarButton.cornerRadius = 14
|
|
|
avatarButton.masksToBounds = true
|
|
|
avatarButton.rx.tap.subscribe(onNext: { [weak self] (data) in
|
|
|
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityUser"), object: self?.communityFollowDataModel?.uid)
|
|
|
+ NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityUser"), object: self?.communityFollowDataModel?.followUid)
|
|
|
|
|
|
}).disposed(by: disposeBag)
|
|
|
return avatarButton
|
|
@@ -163,7 +163,7 @@ class CommunityFollowStatusTableViewCell: UITableViewCell {
|
|
|
titleButton.setTitleColor(k333333Color, for: UIControl.State.normal)
|
|
|
titleButton.titleLabel?.font = kMediumFont14
|
|
|
titleButton.rx.tap.subscribe(onNext: { [weak self] (data) in
|
|
|
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityUser"), object: self?.communityFollowDataModel?.uid)
|
|
|
+ NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityUser"), object: self?.communityFollowDataModel?.followUid)
|
|
|
}).disposed(by: disposeBag)
|
|
|
return titleButton
|
|
|
}()
|
|
@@ -192,7 +192,7 @@ class CommunityFollowStatusTableViewCell: UITableViewCell {
|
|
|
avatarOtherButton.masksToBounds = true
|
|
|
avatarOtherButton.rx.tap.subscribe(onNext: {
|
|
|
[weak self] (data) in
|
|
|
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityUser"), object: self?.communityFollowDataModel?.followUid)
|
|
|
+ NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityUser"), object: self?.communityFollowDataModel?.relateData?.uid)
|
|
|
|
|
|
}).disposed(by: disposeBag)
|
|
|
return avatarOtherButton
|
|
@@ -205,7 +205,7 @@ class CommunityFollowStatusTableViewCell: UITableViewCell {
|
|
|
titleOtherButton.titleLabel?.font = kMediumFont15
|
|
|
titleOtherButton.rx.tap.subscribe(onNext: {
|
|
|
[weak self] (data) in
|
|
|
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityUser"), object: self?.communityFollowDataModel?.followUid)
|
|
|
+ NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityUser"), object: self?.communityFollowDataModel?.relateData?.uid)
|
|
|
}).disposed(by: disposeBag)
|
|
|
return titleOtherButton
|
|
|
}()
|
|
@@ -237,7 +237,6 @@ class CommunityFollowStatusTableViewCell: UITableViewCell {
|
|
|
|
|
|
private lazy var twoTitleLabel: UILabel = {
|
|
|
let twoTitleLabel = UILabel()
|
|
|
- twoTitleLabel.text = "迦百农对社会问题进行了哪些探讨啊这迦百农对社会问题进行了哪些探讨啊这"
|
|
|
twoTitleLabel.textColor = k333333Color
|
|
|
twoTitleLabel.font = kMediumFont16
|
|
|
return twoTitleLabel
|
|
@@ -245,7 +244,6 @@ class CommunityFollowStatusTableViewCell: UITableViewCell {
|
|
|
|
|
|
private lazy var twoSubtitleLabel: UILabel = {
|
|
|
let twoSubtitleLabel = UILabel()
|
|
|
- twoSubtitleLabel.text = "照片拍的真棒,我很喜欢这张照照片拍的真棒,我很喜欢这张照"
|
|
|
twoSubtitleLabel.textColor = k999999Color
|
|
|
twoSubtitleLabel.font = kRegularFont14
|
|
|
return twoSubtitleLabel
|
|
@@ -269,7 +267,6 @@ class CommunityFollowStatusTableViewCell: UITableViewCell {
|
|
|
|
|
|
private lazy var threeTitleLabel: UILabel = {
|
|
|
let threeTitleLabel = UILabel()
|
|
|
- threeTitleLabel.text = "迦百农对社会问题进行了哪些探讨啊这迦百农对社会问题进行了哪些探讨啊这"
|
|
|
threeTitleLabel.textColor = k333333Color
|
|
|
threeTitleLabel.font = kMediumFont16
|
|
|
return threeTitleLabel
|
|
@@ -291,7 +288,6 @@ class CommunityFollowStatusTableViewCell: UITableViewCell {
|
|
|
|
|
|
private lazy var skittlesTitleLabel: UILabel = {
|
|
|
let skittlesTitleLabel = UILabel()
|
|
|
- skittlesTitleLabel.text = "收获 66 个彩虹豆"
|
|
|
skittlesTitleLabel.textColor = k333333Color
|
|
|
skittlesTitleLabel.font = kRegularFont13
|
|
|
return skittlesTitleLabel
|
|
@@ -301,6 +297,8 @@ class CommunityFollowStatusTableViewCell: UITableViewCell {
|
|
|
didSet {
|
|
|
avatarButton.kf.setImage(with: kURLImage(name: communityFollowDataModel?.followAvatar ?? ""), for: UIControl.State.normal , placeholder: kImage(name: "default_avatar"))
|
|
|
titleButton.setTitle(communityFollowDataModel?.followUsername, for: UIControl.State.normal)
|
|
|
+ skittlesTitleLabel.text = "收获 \(communityFollowDataModel?.content?.beans ?? 0) 个彩虹豆"
|
|
|
+
|
|
|
communityFollowType = CommunityFollowType(rawValue: communityFollowDataModel?.type ?? "1")
|
|
|
}
|
|
|
}
|
|
@@ -324,7 +322,6 @@ class CommunityFollowStatusTableViewCell: UITableViewCell {
|
|
|
timeStatusLabel.text = "\(communityFollowDataModel?.createdAt ?? "") 评论"
|
|
|
twoTitleLabel.text = communityFollowDataModel?.content?.postDesc ?? ""
|
|
|
twoSubtitleLabel.text = "“\(communityFollowDataModel?.content?.commentDesc ?? "")”"
|
|
|
- skittlesTitleLabel.text = "收获 \(communityFollowDataModel?.content?.beans ?? 0) 个彩虹豆"
|
|
|
|
|
|
oneCardView.isHidden = true
|
|
|
twoCardView.isHidden = false
|
|
@@ -343,7 +340,8 @@ class CommunityFollowStatusTableViewCell: UITableViewCell {
|
|
|
break
|
|
|
case .forward?:
|
|
|
timeStatusLabel.text = "\(communityFollowDataModel?.createdAt ?? "") 转发"
|
|
|
- twoTitleLabel.text = communityFollowDataModel?.content?.postDesc ?? ""
|
|
|
+ threeTitleLabel.text = communityFollowDataModel?.content?.postDesc ?? ""
|
|
|
+
|
|
|
oneCardView.isHidden = true
|
|
|
twoCardView.isHidden = true
|
|
|
threeCardView.isHidden = false
|
|
@@ -361,12 +359,13 @@ class CommunityFollowStatusTableViewCell: UITableViewCell {
|
|
|
break
|
|
|
case .like?:
|
|
|
timeStatusLabel.text = "\(communityFollowDataModel?.createdAt ?? "") 点赞"
|
|
|
- twoTitleLabel.text = communityFollowDataModel?.content?.postDesc ?? ""
|
|
|
+ threeTitleLabel.text = communityFollowDataModel?.content?.postDesc ?? ""
|
|
|
oneCardView.isHidden = true
|
|
|
twoCardView.isHidden = true
|
|
|
threeCardView.isHidden = false
|
|
|
skittlesImageView.isHidden = false
|
|
|
skittlesTitleLabel.isHidden = false
|
|
|
+
|
|
|
skittlesImageView.snp_makeConstraints { (make) in
|
|
|
make.left.equalTo(15)
|
|
|
make.top.equalTo(threeCardView.snp_bottom).offset(12)
|
|
@@ -379,7 +378,8 @@ class CommunityFollowStatusTableViewCell: UITableViewCell {
|
|
|
break
|
|
|
case .collection?:
|
|
|
timeStatusLabel.text = "\(communityFollowDataModel?.createdAt ?? "") 收藏"
|
|
|
- twoTitleLabel.text = communityFollowDataModel?.content?.postDesc ?? ""
|
|
|
+ threeTitleLabel.text = communityFollowDataModel?.content?.postDesc ?? ""
|
|
|
+
|
|
|
oneCardView.isHidden = true
|
|
|
twoCardView.isHidden = true
|
|
|
threeCardView.isHidden = false
|
|
@@ -439,7 +439,13 @@ class CommunityFollowStatusTableViewCell: UITableViewCell {
|
|
|
|
|
|
/// 内容详情页面
|
|
|
@objc func contentDetail() {
|
|
|
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityContentDetailClosure"), object: communityFollowDataModel?.id)
|
|
|
+ if PostType(rawValue: communityFollowDataModel?.relateData?.type ?? "video") == .video {
|
|
|
+ NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityContentDetailClosure"), object: communityFollowDataModel?.relateId)
|
|
|
+
|
|
|
+ }else {
|
|
|
+ NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityContentDetailClosure"), object: communityFollowDataModel?.relateId)
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|