|
@@ -7,12 +7,14 @@
|
|
|
//
|
|
|
|
|
|
import UIKit
|
|
|
+import SwiftyMediator
|
|
|
|
|
|
class CardContentCommentListFooterView: BaseView {
|
|
|
|
|
|
//MRAK: - 设置View
|
|
|
override func setupViews() {
|
|
|
addSubview(allCommentLabel)
|
|
|
+ self.addTapGesture(1, target: self, action: #selector(tapAction))
|
|
|
}
|
|
|
|
|
|
override func setupLayouts() {
|
|
@@ -32,6 +34,26 @@ class CardContentCommentListFooterView: BaseView {
|
|
|
return allCommentLabel
|
|
|
}()
|
|
|
|
|
|
+ @objc func tapAction() {
|
|
|
+ if communityRecommendDataModel != nil {
|
|
|
+ if PostType(rawValue: communityRecommendDataModel?.type ?? "video") == .video {
|
|
|
+ Mediator.push(CommunityRouterModuleType.pushPostDetailVoide(postId: "\(communityRecommendDataModel?.id ?? 0)", departType: .others, topicId: 0))
|
|
|
+ }else {
|
|
|
+ Mediator.push(CommunityRouterModuleType.pushPostDetailContent(postId: "\(communityRecommendDataModel?.id ?? 0)"))
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if communityFollowDataModel != nil {
|
|
|
+ if PostType(rawValue: communityFollowDataModel?.relateData?.type ?? "video") == .video {
|
|
|
+
|
|
|
+ Mediator.push(CommunityRouterModuleType.pushPostDetailVoide(postId: "\(communityFollowDataModel?.relateData?.id ?? 0)", departType: .others, topicId: 0))
|
|
|
+
|
|
|
+ }else {
|
|
|
+ Mediator.push(CommunityRouterModuleType.pushPostDetailContent(postId: "\(communityFollowDataModel?.relateData?.id ?? 0)"))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
var communityRecommendDataModel: CommunityRecommendDataModel? {
|
|
|
didSet {
|
|
|
allCommentLabel.text = "共\(communityRecommendDataModel?.commentCount ?? 0)条评论"
|