Bläddra i källkod

消息模块 -- 页面搭建

Chris 5 år sedan
förälder
incheckning
b1e6d61227

+ 80 - 0
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -333,6 +333,14 @@
 		BD12203122AF4A010051C7C2 /* MessageMainItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD12203022AF4A010051C7C2 /* MessageMainItemView.swift */; };
 		BD12203622AF807C0051C7C2 /* MessagePlanetActivityController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD12203522AF807C0051C7C2 /* MessagePlanetActivityController.swift */; };
 		BD12203A22AF80AD0051C7C2 /* MessageActivityTableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD12203922AF80AD0051C7C2 /* MessageActivityTableCell.swift */; };
+		BD12203F22AF8E190051C7C2 /* MessagePlanetNotiController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD12203E22AF8E190051C7C2 /* MessagePlanetNotiController.swift */; };
+		BD12204122AF8E320051C7C2 /* MessagePlanetNotiTableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD12204022AF8E320051C7C2 /* MessagePlanetNotiTableCell.swift */; };
+		BD12204422AF996E0051C7C2 /* MessageCommentController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD12204322AF996E0051C7C2 /* MessageCommentController.swift */; };
+		BD12204622AF997E0051C7C2 /* MessageCommentTableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD12204522AF997E0051C7C2 /* MessageCommentTableCell.swift */; };
+		BD12204922AF99B90051C7C2 /* MessageFollowNotiController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD12204822AF99B90051C7C2 /* MessageFollowNotiController.swift */; };
+		BD12204B22AF99C80051C7C2 /* MessageFollowNotiTableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD12204A22AF99C80051C7C2 /* MessageFollowNotiTableCell.swift */; };
+		BD12204E22AFB07E0051C7C2 /* MessageThumbController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD12204D22AFB07E0051C7C2 /* MessageThumbController.swift */; };
+		BD12205022AFB08B0051C7C2 /* MessageThumbTableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD12204F22AFB08B0051C7C2 /* MessageThumbTableCell.swift */; };
 		BD1DC6C5228CFD0B00B89C57 /* SwiftMoyaNetWorkServiceOrder.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD1DC6C3228CFD0B00B89C57 /* SwiftMoyaNetWorkServiceOrder.swift */; };
 		BD1DC6C6228CFD0B00B89C57 /* SwiftMoyaServiceOrderApi.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD1DC6C4228CFD0B00B89C57 /* SwiftMoyaServiceOrderApi.swift */; };
 		BD1DC6C9228D005000B89C57 /* OrderCreateParameterModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD1DC6C8228D005000B89C57 /* OrderCreateParameterModel.swift */; };
@@ -749,6 +757,14 @@
 		BD12203022AF4A010051C7C2 /* MessageMainItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageMainItemView.swift; sourceTree = "<group>"; };
 		BD12203522AF807C0051C7C2 /* MessagePlanetActivityController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagePlanetActivityController.swift; sourceTree = "<group>"; };
 		BD12203922AF80AD0051C7C2 /* MessageActivityTableCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageActivityTableCell.swift; sourceTree = "<group>"; };
+		BD12203E22AF8E190051C7C2 /* MessagePlanetNotiController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagePlanetNotiController.swift; sourceTree = "<group>"; };
+		BD12204022AF8E320051C7C2 /* MessagePlanetNotiTableCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagePlanetNotiTableCell.swift; sourceTree = "<group>"; };
+		BD12204322AF996E0051C7C2 /* MessageCommentController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageCommentController.swift; sourceTree = "<group>"; };
+		BD12204522AF997E0051C7C2 /* MessageCommentTableCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageCommentTableCell.swift; sourceTree = "<group>"; };
+		BD12204822AF99B90051C7C2 /* MessageFollowNotiController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageFollowNotiController.swift; sourceTree = "<group>"; };
+		BD12204A22AF99C80051C7C2 /* MessageFollowNotiTableCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageFollowNotiTableCell.swift; sourceTree = "<group>"; };
+		BD12204D22AFB07E0051C7C2 /* MessageThumbController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageThumbController.swift; sourceTree = "<group>"; };
+		BD12204F22AFB08B0051C7C2 /* MessageThumbTableCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageThumbTableCell.swift; sourceTree = "<group>"; };
 		BD1DC6C3228CFD0B00B89C57 /* SwiftMoyaNetWorkServiceOrder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftMoyaNetWorkServiceOrder.swift; sourceTree = "<group>"; };
 		BD1DC6C4228CFD0B00B89C57 /* SwiftMoyaServiceOrderApi.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftMoyaServiceOrderApi.swift; sourceTree = "<group>"; };
 		BD1DC6C8228D005000B89C57 /* OrderCreateParameterModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderCreateParameterModel.swift; sourceTree = "<group>"; };
@@ -2931,6 +2947,58 @@
 			path = View;
 			sourceTree = "<group>";
 		};
+		BD12203B22AF8DCA0051C7C2 /* MessagePlanetNotification */ = {
+			isa = PBXGroup;
+			children = (
+				BD12203D22AF8DF10051C7C2 /* View */,
+				BD12203C22AF8DE90051C7C2 /* Controller */,
+			);
+			path = MessagePlanetNotification;
+			sourceTree = "<group>";
+		};
+		BD12203C22AF8DE90051C7C2 /* Controller */ = {
+			isa = PBXGroup;
+			children = (
+				BD12203E22AF8E190051C7C2 /* MessagePlanetNotiController.swift */,
+			);
+			path = Controller;
+			sourceTree = "<group>";
+		};
+		BD12203D22AF8DF10051C7C2 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				BD12204022AF8E320051C7C2 /* MessagePlanetNotiTableCell.swift */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		BD12204222AF99520051C7C2 /* MessageComment */ = {
+			isa = PBXGroup;
+			children = (
+				BD12204322AF996E0051C7C2 /* MessageCommentController.swift */,
+				BD12204522AF997E0051C7C2 /* MessageCommentTableCell.swift */,
+			);
+			path = MessageComment;
+			sourceTree = "<group>";
+		};
+		BD12204722AF999C0051C7C2 /* MessageFollowNoti */ = {
+			isa = PBXGroup;
+			children = (
+				BD12204822AF99B90051C7C2 /* MessageFollowNotiController.swift */,
+				BD12204A22AF99C80051C7C2 /* MessageFollowNotiTableCell.swift */,
+			);
+			path = MessageFollowNoti;
+			sourceTree = "<group>";
+		};
+		BD12204C22AFB02B0051C7C2 /* MessagePlanetThumb */ = {
+			isa = PBXGroup;
+			children = (
+				BD12204D22AFB07E0051C7C2 /* MessageThumbController.swift */,
+				BD12204F22AFB08B0051C7C2 /* MessageThumbTableCell.swift */,
+			);
+			path = MessagePlanetThumb;
+			sourceTree = "<group>";
+		};
 		BD1DC6C2228CFD0B00B89C57 /* SwiftMoyaServiceOrder */ = {
 			isa = PBXGroup;
 			children = (
@@ -3016,6 +3084,10 @@
 			children = (
 				BD3AA45522AE63A200EF4F20 /* MessageMain */,
 				BD12203222AF803A0051C7C2 /* MessagePlanetActivity */,
+				BD12203B22AF8DCA0051C7C2 /* MessagePlanetNotification */,
+				BD12204222AF99520051C7C2 /* MessageComment */,
+				BD12204C22AFB02B0051C7C2 /* MessagePlanetThumb */,
+				BD12204722AF999C0051C7C2 /* MessageFollowNoti */,
 			);
 			path = MessageModule;
 			sourceTree = "<group>";
@@ -3516,6 +3588,7 @@
 				BDAA40FD228E9CD600CF841D /* OrderApplyRefundPhoneCell.swift in Sources */,
 				A71AA51F22729F35008FF1A5 /* AuthorizationSwift.swift in Sources */,
 				A7A98E3622802AD7005306E9 /* ShoppingMallBannerFSPagerViewCell.swift in Sources */,
+				BD12204E22AFB07E0051C7C2 /* MessageThumbController.swift in Sources */,
 				A7824AFD2271EAC900ABA381 /* SelfMentionContactsListTableViewCell.swift in Sources */,
 				BD7AB83F228438290030646A /* OrderPayExpressAddInfoCell.swift in Sources */,
 				A7DF50DF22A5590200998908 /* BrowsePicturesViewController.swift in Sources */,
@@ -3547,6 +3620,7 @@
 				A7274C5B228EE636000E3A07 /* LBXScanViewController.swift in Sources */,
 				A7FF1566228C6DF200A85748 /* OrderShopAndStatusTableViewCell.swift in Sources */,
 				A7A98E332280272A005306E9 /* ShoppingMallBannerTableViewCell.swift in Sources */,
+				BD12204622AF997E0051C7C2 /* MessageCommentTableCell.swift in Sources */,
 				BDF862AA228E43A4000DEF84 /* OrderCommentTableViewCell.swift in Sources */,
 				A7B4E754228278320012914A /* ShoppingMallFloorTableViewCell.swift in Sources */,
 				BD3474F522857B85000908C5 /* CommonPayHeader.swift in Sources */,
@@ -3577,6 +3651,7 @@
 				A70B843422911AF600882BC5 /* ProductDetailView.swift in Sources */,
 				A7FF1598228D092A00A85748 /* OrderListModel.swift in Sources */,
 				A7FF157D228C837100A85748 /* OrderDetailStatusTableViewCell.swift in Sources */,
+				BD12204B22AF99C80051C7C2 /* MessageFollowNotiTableCell.swift in Sources */,
 				A7A98E41228046C5005306E9 /* ShoppingMallSepcialTableViewCell.swift in Sources */,
 				A70B2C5E22886F4D00B2449F /* ShopViewTableViewCell.swift in Sources */,
 				A7CC753A2271B98B003C4F38 /* AddressManagerAddTableViewCell.swift in Sources */,
@@ -3629,6 +3704,7 @@
 				BDF8629C228E4125000DEF84 /* OrderCommentController.swift in Sources */,
 				A7B4E75A228289BB0012914A /* ProductFloorCenterHeaderCollectionReusableView.swift in Sources */,
 				A71901752275F71F00104A50 /* BaiduToCityModel.swift in Sources */,
+				BD12203F22AF8E190051C7C2 /* MessagePlanetNotiController.swift in Sources */,
 				A7BB685922696B9200AB07A2 /* SelfRecommendationCollectionViewCell.swift in Sources */,
 				A7636AC822682BAF00374F9E /* LocationView.swift in Sources */,
 				A738D205225AF90D00EEE860 /* WeChatpayOrderModel.swift in Sources */,
@@ -3676,6 +3752,7 @@
 				BD108C9622A60C2100837DAB /* HGImagePickerCell.swift in Sources */,
 				A7A98E3C228036D7005306E9 /* ShoppingMallCategoryCollectionViewCell.swift in Sources */,
 				BD3AA45822AE63EC00EF4F20 /* MessageMainViewController.swift in Sources */,
+				BD12204922AF99B90051C7C2 /* MessageFollowNotiController.swift in Sources */,
 				A71AF0AA226EDDF5001730FE /* SearchView.swift in Sources */,
 				A7FF1583228C843700A85748 /* OrderDetailExpressSelfMentionTableViewCell.swift in Sources */,
 				A7A98E0E227EC0C6005306E9 /* CategoryTableViewCell.swift in Sources */,
@@ -3722,6 +3799,7 @@
 				A72A726722321DBD00B21995 /* LocationModel.swift in Sources */,
 				A7A98E10227EC531005306E9 /* ProductHSmallTableViewCell.swift in Sources */,
 				A7A98DFD227E84F4005306E9 /* SwiftMoyaServiceProductApi.swift in Sources */,
+				BD12205022AFB08B0051C7C2 /* MessageThumbTableCell.swift in Sources */,
 				A739121B229F75F50033177E /* JXPagingView.swift in Sources */,
 				BD7AB8452284398A0030646A /* OrderPaySelfPickAddInfoCell.swift in Sources */,
 				A72A72D222321E2700B21995 /* Common.swift in Sources */,
@@ -3730,6 +3808,7 @@
 				A71AF0A6226EDDC8001730FE /* SearchViewController.swift in Sources */,
 				BD20F1CF2283CE2300677D8E /* OrderFinishPayView.swift in Sources */,
 				A7A98E4322804851005306E9 /* ShoppingMallSepcialFlowLayout.swift in Sources */,
+				BD12204122AF8E320051C7C2 /* MessagePlanetNotiTableCell.swift in Sources */,
 				A79057062276EA3D0037F823 /* OpenCityListModel.swift in Sources */,
 				BD7AB838228420310030646A /* ShoppingCartPayOrderHeader.swift in Sources */,
 				A7824B002271F0DD00ABA381 /* EditSelfMentionContactsViewController.swift in Sources */,
@@ -3755,6 +3834,7 @@
 				A72A72B922321DE000B21995 /* Extension+Array.swift in Sources */,
 				A70B2C492288416F00B2449F /* ProductDetailHotSellCollectionViewCell.swift in Sources */,
 				A71901692275464000104A50 /* ProvinceCityAreaView.swift in Sources */,
+				BD12204422AF996E0051C7C2 /* MessageCommentController.swift in Sources */,
 				A7778CDD2246121500C7C47A /* PhoneCountryAreaListMdoel.swift in Sources */,
 				A72A733522325A4B00B21995 /* AppDelegate+HandleOpen.swift in Sources */,
 				A7FF156E228C6EAE00A85748 /* OrderDeliveryModeTableViewCell.swift in Sources */,

+ 2 - 0
RainbowPlanet/RainbowPlanet/Macro/ColorMacro.swift

@@ -117,3 +117,5 @@ let kccccccColor = UIColor(hexString: "cccccc")
 let kfafafaColor = UIColor(hexString: "fafafa")
 
 let kfff8efColor = UIColor(hexString: "fff8ef")
+
+let kebebebColor = UIColor(hexString: "ebebeb")

+ 71 - 0
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessageComment/MessageCommentController.swift

@@ -0,0 +1,71 @@
+//
+//  MessageCommentController.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/6/11.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class MessageCommentController: BaseViewController {
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupLayouts()
+        
+    }
+    
+    override func setupViews() {
+        navigationBar.title = "评论与@"
+        view.backgroundColor = kf7f8faColor
+        
+        view.addSubview(tableView)
+    }
+    
+    override func setupLayouts() {
+        tableView.snp.makeConstraints { (make) in
+            make.top.equalToSuperview().offset(kNavBarTotalHeight)
+            make.left.right.bottom.equalTo(0)
+        }
+    }
+    
+    override func setupData() {
+        
+    }
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = kf7f8faColor
+        tableView.dataSource = self
+        tableView.delegate = self
+        tableView.estimatedRowHeight = 100
+        tableView.estimatedSectionFooterHeight = 0.000001
+        tableView.estimatedSectionHeaderHeight = 0.000001
+        return tableView
+    }()
+}
+
+// MARK: - tableView dataSource && delegate
+extension MessageCommentController: UITableViewDataSource, UITableViewDelegate {
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 3
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let cell = MessageCommentTableCell.cellWith(tableView: tableView, indexPath: indexPath)        
+        return cell
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        return UITableView.automaticDimension
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 10
+    }
+    
+}

+ 134 - 0
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessageComment/MessageCommentTableCell.swift

@@ -0,0 +1,134 @@
+//
+//  MessageCommentTableCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/6/11.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class MessageCommentTableCell: UITableViewCell {
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> MessageCommentTableCell {
+        let ID = "MessageCommentTableCell"
+        tableView.register(MessageCommentTableCell.self, forCellReuseIdentifier: ID)
+        let cell : MessageCommentTableCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! MessageCommentTableCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    
+    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+        super.init(style: style, reuseIdentifier: reuseIdentifier)
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    var indexPath: IndexPath? {
+        didSet {
+            
+        }
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        self.selectionStyle = .none
+        backgroundColor = kffffffColor
+        
+        addSubview(typeImageView)
+        addSubview(contentImageView)
+        addSubview(titleLabel)
+        addSubview(contentLabel)
+        addSubview(timeLabel)
+        addSubview(sepView)
+    }
+    
+    private func setupLayouts() {
+        typeImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(16)
+            make.left.equalTo(14)
+            make.size.equalTo(24)
+        }
+        contentImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(16)
+            make.right.equalTo(-14)
+            make.size.equalTo(60)
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(16)
+            make.left.equalTo(typeImageView.snp_right).offset(16)
+            make.right.equalTo(contentImageView.snp_left).offset(-16)
+            make.height.equalTo(20)
+        }
+        contentLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(titleLabel.snp_bottom).offset(8)
+            make.left.equalTo(titleLabel.snp_left)
+            make.right.equalTo(titleLabel.snp_right)
+        }
+        timeLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(contentLabel.snp_bottom).offset(8)
+            make.left.equalTo(titleLabel.snp_left)
+            make.height.equalTo(17)
+        }
+        sepView.snp.makeConstraints { (make) in
+            make.top.equalTo(timeLabel.snp_bottom).offset(16)
+            make.right.equalToSuperview()
+            make.left.equalToSuperview().offset(54)
+            make.height.equalTo(1)
+            make.bottom.equalToSuperview()
+        }
+    }
+    
+    lazy var typeImageView : UIImageView = {
+        let typeImageView = UIImageView()
+        typeImageView.image = kImage(name: "page05")
+        return typeImageView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "xxx恢复了xxx"
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kBoldFont14
+        titleLabel.textAlignment = .left
+        return titleLabel
+    }()
+    
+    private lazy var contentLabel: UILabel = {
+        let subLabel = UILabel()
+        subLabel.text = "”大师果然厉害,不愧是牛逼之人“"
+        subLabel.textColor = k999999Color
+        subLabel.font = kRegularFont13
+        subLabel.textAlignment = .left
+        subLabel.numberOfLines = 0
+        return subLabel
+    }()
+    
+    private lazy var timeLabel: UILabel = {
+        let timeLabel = UILabel()
+        timeLabel.text = "10分钟前"
+        timeLabel.textColor = kbbbbbbColor
+        timeLabel.font = kRegularFont12
+        timeLabel.textAlignment = .left
+        return timeLabel
+    }()
+    
+    lazy var contentImageView : UIImageView = {
+        let contentImageView = UIImageView()
+        contentImageView.image = kImage(name: "page05")
+        contentImageView.cornerRadius = 4
+        contentImageView.masksToBounds = true
+        return contentImageView
+    }()
+    
+    private lazy var sepView: UIView = {
+        let sepView = UIView()
+        sepView.backgroundColor = kf5f5f5Color
+        return sepView
+    }()
+    
+}

+ 71 - 0
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessageFollowNoti/MessageFollowNotiController.swift

@@ -0,0 +1,71 @@
+//
+//  MessageFollowNotiController.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/6/11.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class MessageFollowNotiController: BaseViewController {
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupLayouts()
+        
+    }
+    
+    override func setupViews() {
+        navigationBar.title = "关注通知"
+        view.backgroundColor = kf7f8faColor
+        
+        view.addSubview(tableView)
+    }
+    
+    override func setupLayouts() {
+        tableView.snp.makeConstraints { (make) in
+            make.top.equalToSuperview().offset(kNavBarTotalHeight)
+            make.left.right.bottom.equalTo(0)
+        }
+    }
+    
+    override func setupData() {
+        
+    }
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = kf7f8faColor
+        tableView.dataSource = self
+        tableView.delegate = self
+        tableView.estimatedRowHeight = 100
+        tableView.estimatedSectionFooterHeight = 0.000001
+        tableView.estimatedSectionHeaderHeight = 0.000001
+        return tableView
+    }()
+}
+
+// MARK: - tableView dataSource && delegate
+extension MessageFollowNotiController: UITableViewDataSource, UITableViewDelegate {
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 4
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let cell = MessageFollowNotiTableCell.cellWith(tableView: tableView, indexPath: indexPath)
+        return cell
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        return UITableView.automaticDimension
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 10
+    }
+    
+}

+ 132 - 0
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessageFollowNoti/MessageFollowNotiTableCell.swift

@@ -0,0 +1,132 @@
+//
+//  MessageFollowNotiTableCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/6/11.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class MessageFollowNotiTableCell: UITableViewCell {
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> MessageFollowNotiTableCell {
+        let ID = "MessageFollowNotiTableCell"
+        tableView.register(MessageFollowNotiTableCell.self, forCellReuseIdentifier: ID)
+        let cell : MessageFollowNotiTableCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! MessageFollowNotiTableCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    
+    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+        super.init(style: style, reuseIdentifier: reuseIdentifier)
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    var indexPath: IndexPath? {
+        didSet {
+            
+        }
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        self.selectionStyle = .none
+        backgroundColor = kffffffColor
+        
+        addSubview(typeImageView)
+        addSubview(contentImageView)
+        addSubview(titleLabel)
+        addSubview(contentLabel)
+        addSubview(timeLabel)
+        addSubview(sepView)
+    }
+    
+    private func setupLayouts() {
+        typeImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(16)
+            make.left.equalTo(14)
+            make.size.equalTo(24)
+        }
+        contentImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(16)
+            make.right.equalTo(-14)
+            make.size.equalTo(44)
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(16)
+            make.left.equalTo(typeImageView.snp_right).offset(16)
+            make.right.equalTo(contentImageView.snp_left).offset(-16)
+            make.height.equalTo(20)
+        }
+        contentLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(titleLabel.snp_bottom).offset(8)
+            make.left.equalTo(titleLabel.snp_left)
+            make.right.equalTo(titleLabel.snp_right)
+        }
+        timeLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(contentLabel.snp_bottom).offset(8)
+            make.left.equalTo(titleLabel.snp_left)
+            make.height.equalTo(17)
+        }
+        sepView.snp.makeConstraints { (make) in
+            make.top.equalTo(timeLabel.snp_bottom).offset(16)
+            make.right.equalToSuperview()
+            make.left.equalToSuperview().offset(54)
+            make.height.equalTo(1)
+            make.bottom.equalToSuperview()
+        }
+    }
+    
+    lazy var typeImageView : UIImageView = {
+        let typeImageView = UIImageView()
+        typeImageView.image = kImage(name: "page05")
+        return typeImageView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "xxx关注了你"
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kBoldFont14
+        titleLabel.textAlignment = .left
+        return titleLabel
+    }()
+    
+    private lazy var contentLabel: UILabel = {
+        let subLabel = UILabel()
+        subLabel.text = "你们的爱好相似度高于90%,快去回个粉吧!"
+        subLabel.textColor = k999999Color
+        subLabel.font = kRegularFont13
+        subLabel.textAlignment = .left
+        subLabel.numberOfLines = 0
+        return subLabel
+    }()
+    
+    private lazy var timeLabel: UILabel = {
+        let timeLabel = UILabel()
+        timeLabel.text = "5月20日"
+        timeLabel.textColor = kbbbbbbColor
+        timeLabel.font = kRegularFont12
+        timeLabel.textAlignment = .left
+        return timeLabel
+    }()
+    
+    lazy var contentImageView : UIImageView = {
+        let contentImageView = UIImageView()
+        contentImageView.image = kImage(name: "page05")
+        return contentImageView
+    }()
+    
+    private lazy var sepView: UIView = {
+        let sepView = UIView()
+        sepView.backgroundColor = kf5f5f5Color
+        return sepView
+    }()
+    
+}

+ 5 - 6
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessageMain/View/MessageMainItemView.swift

@@ -16,8 +16,8 @@ enum ItemViewType {
 
 class MessageMainItemView: BaseView {
     
-    typealias AddressClosure = () -> Void
-    var addressClosure : AddressClosure?
+    typealias MsgClickClosure = () -> Void
+    var msgClickClosure : MsgClickClosure?
     
     var itemViewType :ItemViewType? {
         didSet {
@@ -77,10 +77,9 @@ class MessageMainItemView: BaseView {
     private lazy var itemButton: UIButton = {
         let itemButton = UIButton(type: UIButton.ButtonType.custom)
         itemButton.rx.tap.subscribe(onNext: { [weak self] (data) in
-//            if let addressClosure = self?.addressClosure {
-//                addressClosure()
-//            }
-            print("点击了--\(String(describing: self?.itemViewType))")
+            if let msgClickClosure = self?.msgClickClosure {
+                msgClickClosure()
+            }
         }).disposed(by: disposeBag)
         return itemButton
     }()

+ 27 - 10
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessageMain/ViewController/MessageMainViewController.swift

@@ -82,21 +82,36 @@ class MessageMainViewController: BaseViewController {
     }()
     
     private lazy var commentItemView: MessageMainItemView = {
-        let commentItemView = MessageMainItemView()
-        commentItemView.itemViewType = ItemViewType.comment
-        return commentItemView
+        let itemView = MessageMainItemView()
+        itemView.itemViewType = ItemViewType.comment
+        itemView.msgClickClosure = {
+            [weak self] () in
+            let vc = MessageCommentController()
+            self?.navigationController?.pushViewController(vc, animated: true)
+        }
+        return itemView
     }()
     
     private lazy var thumbItemView: MessageMainItemView = {
-        let thumbItemView = MessageMainItemView()
-        thumbItemView.itemViewType = ItemViewType.thumb
-        return thumbItemView
+        let itemView = MessageMainItemView()
+        itemView.itemViewType = ItemViewType.thumb
+        itemView.msgClickClosure = {
+            [weak self] () in
+            let vc = MessageThumbController()
+            self?.navigationController?.pushViewController(vc, animated: true)
+        }
+        return itemView
     }()
     
     private lazy var notiItemView: MessageMainItemView = {
-        let notiItemView = MessageMainItemView()
-        notiItemView.itemViewType = ItemViewType.followNoti
-        return notiItemView
+        let itemView = MessageMainItemView()
+        itemView.itemViewType = ItemViewType.followNoti
+        itemView.msgClickClosure = {
+            [weak self] () in
+            let vc = MessageFollowNotiController()
+            self?.navigationController?.pushViewController(vc, animated: true)
+        }
+        return itemView
     }()
     
 }
@@ -134,9 +149,11 @@ extension MessageMainViewController: UITableViewDataSource, UITableViewDelegate
         case 0:
             // 星球通知
             print("点击--星球通知")
+            let vc = MessagePlanetNotiController()
+            self.navigationController?.pushViewController(vc, animated: true)
         case 1:
             // 星球活动
-            let vc = MessagePlanetActivityController()            
+            let vc = MessagePlanetActivityController()
             self.navigationController?.pushViewController(vc, animated: true)
         default:
             return

+ 1 - 2
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessagePlanetActivity/Controller/MessagePlanetActivityController.swift

@@ -41,8 +41,7 @@ class MessagePlanetActivityController: BaseViewController {
         tableView.backgroundColor = kf7f8faColor
         tableView.dataSource = self
         tableView.delegate = self
-        tableView.isScrollEnabled = false
-        tableView.estimatedRowHeight = 70
+        tableView.estimatedRowHeight = 200
         tableView.estimatedSectionFooterHeight = 0.000001
         tableView.estimatedSectionHeaderHeight = 0.000001
         return tableView

+ 69 - 0
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessagePlanetNotification/Controller/MessagePlanetNotiController.swift

@@ -0,0 +1,69 @@
+//
+//  MessagePlanetNotiController.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/6/11.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+class MessagePlanetNotiController: BaseViewController {
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupLayouts()
+        
+    }
+    
+    override func setupViews() {
+        navigationBar.title = "星球活动"
+        view.backgroundColor = kf7f8faColor
+        
+        view.addSubview(tableView)
+    }
+    
+    override func setupLayouts() {
+        tableView.snp.makeConstraints { (make) in
+            make.top.equalToSuperview().offset(kNavBarTotalHeight)
+            make.left.right.bottom.equalTo(0)
+        }
+    }
+    
+    override func setupData() {
+        
+    }
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = kf7f8faColor
+        tableView.dataSource = self
+        tableView.delegate = self
+        tableView.estimatedRowHeight = 200
+        tableView.estimatedSectionFooterHeight = 0.000001
+        tableView.estimatedSectionHeaderHeight = 0.000001
+        return tableView
+    }()
+}
+
+// MARK: - tableView dataSource && delegate
+extension MessagePlanetNotiController: UITableViewDataSource, UITableViewDelegate {
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 2
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let cell = MessagePlanetNotiTableCell.cellWith(tableView: tableView, indexPath: indexPath)
+        return cell
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        return UITableView.automaticDimension
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 0
+    }
+    
+}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 158 - 0
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessagePlanetNotification/View/MessagePlanetNotiTableCell.swift


+ 71 - 0
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessagePlanetThumb/MessageThumbController.swift

@@ -0,0 +1,71 @@
+//
+//  MessageThumbController.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/6/11.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class MessageThumbController: BaseViewController {
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupLayouts()
+        
+    }
+    
+    override func setupViews() {
+        navigationBar.title = "赞与互动"
+        view.backgroundColor = kf7f8faColor
+        
+        view.addSubview(tableView)
+    }
+    
+    override func setupLayouts() {
+        tableView.snp.makeConstraints { (make) in
+            make.top.equalToSuperview().offset(kNavBarTotalHeight)
+            make.left.right.bottom.equalTo(0)
+        }
+    }
+    
+    override func setupData() {
+        
+    }
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = kf7f8faColor
+        tableView.dataSource = self
+        tableView.delegate = self
+        tableView.estimatedRowHeight = 100
+        tableView.estimatedSectionFooterHeight = 0.000001
+        tableView.estimatedSectionHeaderHeight = 0.000001
+        return tableView
+    }()
+}
+
+// MARK: - tableView dataSource && delegate
+extension MessageThumbController: UITableViewDataSource, UITableViewDelegate {
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 2
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let cell = MessageThumbTableCell.cellWith(tableView: tableView, indexPath: indexPath)
+        return cell
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        return UITableView.automaticDimension
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 10
+    }
+    
+}

+ 134 - 0
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessagePlanetThumb/MessageThumbTableCell.swift

@@ -0,0 +1,134 @@
+//
+//  MessageThumbTableCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/6/11.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class MessageThumbTableCell: UITableViewCell {
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> MessageThumbTableCell {
+        let ID = "MessageThumbTableCell"
+        tableView.register(MessageThumbTableCell.self, forCellReuseIdentifier: ID)
+        let cell : MessageThumbTableCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! MessageThumbTableCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    
+    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+        super.init(style: style, reuseIdentifier: reuseIdentifier)
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    var indexPath: IndexPath? {
+        didSet {
+            
+        }
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        self.selectionStyle = .none
+        backgroundColor = kffffffColor
+        
+        addSubview(typeImageView)
+        addSubview(contentImageView)
+        addSubview(titleLabel)
+        addSubview(contentLabel)
+        addSubview(timeLabel)
+        addSubview(sepView)
+    }
+    
+    private func setupLayouts() {
+        typeImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(16)
+            make.left.equalTo(14)
+            make.size.equalTo(24)
+        }
+        contentImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(16)
+            make.right.equalTo(-14)
+            make.size.equalTo(60)
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(16)
+            make.left.equalTo(typeImageView.snp_right).offset(16)
+            make.right.equalTo(contentImageView.snp_left).offset(-16)
+            make.height.equalTo(20)
+        }
+        contentLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(titleLabel.snp_bottom).offset(8)
+            make.left.equalTo(titleLabel.snp_left)
+            make.right.equalTo(titleLabel.snp_right)
+        }
+        timeLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(contentLabel.snp_bottom).offset(8)
+            make.left.equalTo(titleLabel.snp_left)
+            make.height.equalTo(17)
+        }
+        sepView.snp.makeConstraints { (make) in
+            make.top.equalTo(timeLabel.snp_bottom).offset(16)
+            make.right.equalToSuperview()
+            make.left.equalToSuperview().offset(54)
+            make.height.equalTo(1)
+            make.bottom.equalToSuperview()
+        }
+    }
+    
+    lazy var typeImageView : UIImageView = {
+        let typeImageView = UIImageView()
+        typeImageView.image = kImage(name: "page05")
+        return typeImageView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "xxx赞了你的内容"
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kBoldFont14
+        titleLabel.textAlignment = .left
+        return titleLabel
+    }()
+    
+    private lazy var contentLabel: UILabel = {
+        let subLabel = UILabel()
+        subLabel.text = "那是春的感觉,并非只在复苏的田野"
+        subLabel.textColor = k999999Color
+        subLabel.font = kRegularFont13
+        subLabel.textAlignment = .left
+        subLabel.numberOfLines = 0
+        return subLabel
+    }()
+    
+    private lazy var timeLabel: UILabel = {
+        let timeLabel = UILabel()
+        timeLabel.text = "5月20日"
+        timeLabel.textColor = kbbbbbbColor
+        timeLabel.font = kRegularFont12
+        timeLabel.textAlignment = .left
+        return timeLabel
+    }()
+    
+    lazy var contentImageView : UIImageView = {
+        let contentImageView = UIImageView()
+        contentImageView.image = kImage(name: "page05")
+        contentImageView.cornerRadius = 4
+        contentImageView.masksToBounds = true
+        return contentImageView
+    }()
+    
+    private lazy var sepView: UIView = {
+        let sepView = UIView()
+        sepView.backgroundColor = kf5f5f5Color
+        return sepView
+    }()
+    
+}