Browse Source

Merge branch 'develop' into feature/jeremy

# Conflicts:
#	RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
南鑫林 5 years ago
parent
commit
fc252495ea
16 changed files with 821 additions and 96 deletions
  1. 59 0
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 56 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddAddress/PublishAddAddressController.swift
  3. 115 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddTopic/Controller/PublishAddTopicController.swift
  4. 109 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddTopic/View/PublishTopicTypeCell.swift
  5. 108 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddTopic/View/PublishTopicTypeItemCollectionCell.swift
  6. 30 7
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/Controller/PublishEditController.swift
  7. 31 35
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/View/PublishEditAddAddressCell.swift
  8. 93 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/View/PublishEditAddImgCollectionCell.swift
  9. 84 45
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/View/PublishEditAddPicCell.swift
  10. 24 5
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/View/PublishEditAddTopicCell.swift
  11. 83 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/View/PublishEditDefaultCollectionCell.swift
  12. 4 2
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/View/PublishEditDescribeCell.swift
  13. 3 2
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/View/PublishEditTitleCell.swift
  14. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_ico_add_pic.imageset/Contents.json
  15. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_ico_add_pic.imageset/edit_ico_add_pic@2x.png
  16. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_ico_add_pic.imageset/edit_ico_add_pic@3x.png

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

@@ -449,6 +449,12 @@
 		BD28077E22B72797002AB976 /* PublishEditAddTopicCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD28077D22B72797002AB976 /* PublishEditAddTopicCell.swift */; };
 		BD28078022B727A6002AB976 /* PublishEditAddAddressCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD28077F22B727A6002AB976 /* PublishEditAddAddressCell.swift */; };
 		BD28078222B727BD002AB976 /* PublishEditAddPicCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD28078122B727BD002AB976 /* PublishEditAddPicCell.swift */; };
+		BD28078422B76568002AB976 /* PublishEditDefaultCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD28078322B76568002AB976 /* PublishEditDefaultCollectionCell.swift */; };
+		BD28078622B765E6002AB976 /* PublishEditAddImgCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD28078522B765E6002AB976 /* PublishEditAddImgCollectionCell.swift */; };
+		BD28078D22B76A8C002AB976 /* PublishAddAddressController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD28078C22B76A8C002AB976 /* PublishAddAddressController.swift */; };
+		BD28078F22B76A9F002AB976 /* PublishAddTopicController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD28078E22B76A9F002AB976 /* PublishAddTopicController.swift */; };
+		BD28079122B770C9002AB976 /* PublishTopicTypeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD28079022B770C9002AB976 /* PublishTopicTypeCell.swift */; };
+		BD28079522B7713C002AB976 /* PublishTopicTypeItemCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD28079422B7713C002AB976 /* PublishTopicTypeItemCollectionCell.swift */; };
 		BD29A92E228F99780018CFC3 /* OrderCommentParameterModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD29A92D228F99780018CFC3 /* OrderCommentParameterModel.swift */; };
 		BD2FCBE222B21CF70006D974 /* CommunityRecommendController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD2FCBE122B21CF70006D974 /* CommunityRecommendController.swift */; };
 		BD2FCBE422B244250006D974 /* RecommendDetailContentCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD2FCBE322B244250006D974 /* RecommendDetailContentCell.swift */; };
@@ -993,6 +999,12 @@
 		BD28077D22B72797002AB976 /* PublishEditAddTopicCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishEditAddTopicCell.swift; sourceTree = "<group>"; };
 		BD28077F22B727A6002AB976 /* PublishEditAddAddressCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishEditAddAddressCell.swift; sourceTree = "<group>"; };
 		BD28078122B727BD002AB976 /* PublishEditAddPicCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishEditAddPicCell.swift; sourceTree = "<group>"; };
+		BD28078322B76568002AB976 /* PublishEditDefaultCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishEditDefaultCollectionCell.swift; sourceTree = "<group>"; };
+		BD28078522B765E6002AB976 /* PublishEditAddImgCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishEditAddImgCollectionCell.swift; sourceTree = "<group>"; };
+		BD28078C22B76A8C002AB976 /* PublishAddAddressController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishAddAddressController.swift; sourceTree = "<group>"; };
+		BD28078E22B76A9F002AB976 /* PublishAddTopicController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishAddTopicController.swift; sourceTree = "<group>"; };
+		BD28079022B770C9002AB976 /* PublishTopicTypeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishTopicTypeCell.swift; sourceTree = "<group>"; };
+		BD28079422B7713C002AB976 /* PublishTopicTypeItemCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishTopicTypeItemCollectionCell.swift; sourceTree = "<group>"; };
 		BD29A92D228F99780018CFC3 /* OrderCommentParameterModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderCommentParameterModel.swift; sourceTree = "<group>"; };
 		BD2FCBE122B21CF70006D974 /* CommunityRecommendController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityRecommendController.swift; sourceTree = "<group>"; };
 		BD2FCBE322B244250006D974 /* RecommendDetailContentCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendDetailContentCell.swift; sourceTree = "<group>"; };
@@ -3613,6 +3625,8 @@
 			children = (
 				BD12B67222B4E99800AEB10B /* PublishMediaPicker */,
 				BD28077422B72175002AB976 /* PublishEditController */,
+				BD28078722B769E8002AB976 /* PublishAddTopic */,
+				BD28078922B76A30002AB976 /* PublishAddAddress */,
 			);
 			path = PublishModule;
 			sourceTree = "<group>";
@@ -3789,6 +3803,8 @@
 			isa = PBXGroup;
 			children = (
 				BD28078122B727BD002AB976 /* PublishEditAddPicCell.swift */,
+				BD28078322B76568002AB976 /* PublishEditDefaultCollectionCell.swift */,
+				BD28078522B765E6002AB976 /* PublishEditAddImgCollectionCell.swift */,
 				BD28077922B72734002AB976 /* PublishEditTitleCell.swift */,
 				BD28077B22B72761002AB976 /* PublishEditDescribeCell.swift */,
 				BD28077D22B72797002AB976 /* PublishEditAddTopicCell.swift */,
@@ -3797,6 +3813,40 @@
 			path = View;
 			sourceTree = "<group>";
 		};
+		BD28078722B769E8002AB976 /* PublishAddTopic */ = {
+			isa = PBXGroup;
+			children = (
+				BD28078B22B76A5D002AB976 /* View */,
+				BD28078A22B76A55002AB976 /* Controller */,
+			);
+			path = PublishAddTopic;
+			sourceTree = "<group>";
+		};
+		BD28078922B76A30002AB976 /* PublishAddAddress */ = {
+			isa = PBXGroup;
+			children = (
+				BD28078C22B76A8C002AB976 /* PublishAddAddressController.swift */,
+			);
+			path = PublishAddAddress;
+			sourceTree = "<group>";
+		};
+		BD28078A22B76A55002AB976 /* Controller */ = {
+			isa = PBXGroup;
+			children = (
+				BD28078E22B76A9F002AB976 /* PublishAddTopicController.swift */,
+			);
+			path = Controller;
+			sourceTree = "<group>";
+		};
+		BD28078B22B76A5D002AB976 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				BD28079022B770C9002AB976 /* PublishTopicTypeCell.swift */,
+				BD28079422B7713C002AB976 /* PublishTopicTypeItemCollectionCell.swift */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
 		BD2FCBDE22B21BE00006D974 /* CommunityRecommendDetail */ = {
 			isa = PBXGroup;
 			children = (
@@ -4352,6 +4402,7 @@
 				BD108C9522A60C2100837DAB /* HGImageCollectionViewCell.swift in Sources */,
 				A7FF1589228C854900A85748 /* OrderDetailBottomView.swift in Sources */,
 				BD1FC1A722B1075F00D55081 /* UIColor+Expanded.m in Sources */,
+				BD28078422B76568002AB976 /* PublishEditDefaultCollectionCell.swift in Sources */,
 				BD12203122AF4A010051C7C2 /* MessageMainItemView.swift in Sources */,
 				BD1DC6C5228CFD0B00B89C57 /* SwiftMoyaNetWorkServiceOrder.swift in Sources */,
 				BD7AB83D228438020030646A /* OrderPayExpressInfoShowCell.swift in Sources */,
@@ -4398,6 +4449,7 @@
 				A71AF0AE226EF0A3001730FE /* SearchHeaderCollectionReusableView.swift in Sources */,
 				A7636AC52268139C00374F9E /* LocationViewController.swift in Sources */,
 				A7D46090227617D200A5A54E /* SQLModel.swift in Sources */,
+				BD28079522B7713C002AB976 /* PublishTopicTypeItemCollectionCell.swift in Sources */,
 				A72C01222275404A0065E0C3 /* ProvinceCityAreaModel.swift in Sources */,
 				A7FF1579228C82CE00A85748 /* OrderDetailViewController.swift in Sources */,
 				A7FF159C228D9E3D00A85748 /* OrderRefundDetailModel.swift in Sources */,
@@ -4405,7 +4457,12 @@
 				BDF862A2228E41CC000DEF84 /* OrderLogisticsInfoCell.swift in Sources */,
 				A739121D229F75F50033177E /* JXPagingListContainerView.swift in Sources */,
 				A72A7386223396CB00B21995 /* SwiftMoyaNetWorkManager.swift in Sources */,
+<<<<<<< HEAD
 				A7D07CCD22B77D2E00186014 /* UserPersonalCenterOrderView.swift in Sources */,
+=======
+				BD28078F22B76A9F002AB976 /* PublishAddTopicController.swift in Sources */,
+				BD28079122B770C9002AB976 /* PublishTopicTypeCell.swift in Sources */,
+>>>>>>> develop
 				A70B2C252286C03800B2449F /* NXLPageControl.swift in Sources */,
 				A7F2D6C122B0D1CB0093000B /* CommunityFollowTableHeaderView.swift in Sources */,
 				A7C0FE0022B66E5A00BC1E86 /* CommunityFeaturedTopicsViewController.swift in Sources */,
@@ -4711,6 +4768,7 @@
 				A7CC75382271ADD6003C4F38 /* AddressManagerSelfMentionExpressHeaderView.swift in Sources */,
 				A738D66F225D9BD900EEE860 /* UMLoginModel.swift in Sources */,
 				A7FF156C228C6E5E00A85748 /* OrderTotalAmountTableViewCell.swift in Sources */,
+				BD28078622B765E6002AB976 /* PublishEditAddImgCollectionCell.swift in Sources */,
 				A71738A622897892000AEA6A /* SwiftMoyaServiceShopApi.swift in Sources */,
 				A72A726722321DBD00B21995 /* LocationModel.swift in Sources */,
 				A7F2D6C622B0DC7B0093000B /* CommunityCommonSectionHeaderView.swift in Sources */,
@@ -4738,6 +4796,7 @@
 				BD29A92E228F99780018CFC3 /* OrderCommentParameterModel.swift in Sources */,
 				A7284440224DFACD00F82F30 /* InfoModel.swift in Sources */,
 				A72A72B522321DE000B21995 /* Extension+UITextView.swift in Sources */,
+				BD28078D22B76A8C002AB976 /* PublishAddAddressController.swift in Sources */,
 				BDF47D822282B3D100941AB9 /* ShoppingCartHotSaleTableViewCell.swift in Sources */,
 				BD20F1CB2283C12000677D8E /* ShoppingCartListNoneItemCell.swift in Sources */,
 				A7B4E756228281620012914A /* ShoppingMallSlidingLeftRightBgCollectionViewCell.swift in Sources */,

+ 56 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddAddress/PublishAddAddressController.swift

@@ -0,0 +1,56 @@
+//
+//  PublishAddAddressController.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/6/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class PublishAddAddressController: BaseViewController {
+    
+    typealias DidSelectBlock = (_ latitude:String,_ longitude:String,_ address:String) -> Void
+    var didSelectBlock : DidSelectBlock?
+    var locationAddress: String?
+    /// 纬度
+    var latitude : String = LocationModel.shared().getLocationModel()?.latitude ?? "34.20840377740726"
+    /// 经度
+    var longitude : String = LocationModel.shared().getLocationModel()?.longitude ?? "108.96265686107972"
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupLayouts()
+        
+    }
+    
+    override func setupViews() {
+        navigationBar.title = "选择默认地址"
+        view.addSubview(addressPOIView)
+        addressPOIView.locationAddress = locationAddress
+        addressPOIView.longitude = longitude
+        addressPOIView.latitude = latitude
+        
+    }
+    
+    override func setupLayouts() {
+        addressPOIView.snp.makeConstraints { (make) in
+            make.top.equalTo(navigationBar.snp.bottom)
+            make.left.right.bottom.equalToSuperview()
+        }
+    }
+    
+    private lazy var addressPOIView: AddressPOIView = {
+        let addressPOIView = AddressPOIView()
+        addressPOIView.didSelectBlock = { [weak self] (latitude:String,longitude:String,address:String) in
+            if let didSelectBlock = self?.didSelectBlock {
+                didSelectBlock(latitude ,longitude ,address)
+                self?.navigationController?.popViewController(animated: true)
+            }
+            
+        }
+        return addressPOIView
+    }()
+    
+}

+ 115 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddTopic/Controller/PublishAddTopicController.swift

@@ -0,0 +1,115 @@
+//
+//  PublishAddTopicController.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/6/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import RxSwift
+import SwiftyJSON
+import Photos
+
+class PublishAddTopicController: BaseViewController {
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupData()
+    }
+    
+    override func setupViews() {
+        self.view.backgroundColor = kffffffColor
+        
+        navigationBar.title = "添加话题"
+        navigationBar.wr_setRightButton(title: "完成(x/5)", titleColor: k333333Color)
+        navigationBar.onClickRightButton = {
+            [weak self] in
+            print("----点击了完成")
+        }
+        
+        view.addSubview(tableView)
+        tableView.snp.makeConstraints { (make) in
+            make.top.equalToSuperview().offset(kNavBarTotalHeight)
+            make.left.right.bottom.equalToSuperview()
+        }
+    }
+    
+    override func setupData() {
+        
+    }
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = kffffffColor
+        tableView.dataSource = self
+        tableView.delegate = self
+        tableView.estimatedRowHeight = 0.000001
+        tableView.estimatedSectionFooterHeight = 0.000001
+        tableView.estimatedSectionHeaderHeight = 0.000001
+        return tableView
+    }()
+    
+}
+
+// MARK: - tableView dataSource && delegate
+extension PublishAddTopicController : UITableViewDelegate, UITableViewDataSource {
+    
+    func numberOfSections(in tableView: UITableView) -> Int {
+        return 2
+    }
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        switch section {
+        case 0:
+            return 1
+        case 1:
+            return 6
+        default:
+            return 1
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        switch indexPath.section {
+        case 0:
+            let picCell = PublishTopicTypeCell.cellWith(tableView: tableView, indexPath: indexPath)
+            return picCell
+        case 1:
+            let titleCell = PublishEditTitleCell.cellWith(tableView: tableView, indexPath: indexPath)
+            return titleCell
+        default:
+            return UITableViewCell()
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        switch indexPath.section {
+        case 0:
+            return 90
+        case 1:
+            return 50
+        default:
+            return 50
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 0
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        return nil
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        return nil
+    }
+    
+}

+ 109 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddTopic/View/PublishTopicTypeCell.swift

@@ -0,0 +1,109 @@
+//
+//  PublishTopicTypeCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/6/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  添加话题--话题类型のCell
+
+import UIKit
+
+class PublishTopicTypeCell: UITableViewCell {
+    
+    typealias ChoosePicBlock = () -> Void
+    var choosePicBlock : ChoosePicBlock?
+    
+    var imgCount: Int = 0
+    var goodsImageArr: Array<UIImage>? {
+        didSet {
+            imgCount = self.goodsImageArr?.count ?? 0
+        }
+    }
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> PublishTopicTypeCell {
+        let ID = "PublishTopicTypeCell"
+        tableView.register(PublishTopicTypeCell.self, forCellReuseIdentifier: ID)
+        let cell : PublishTopicTypeCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! PublishTopicTypeCell
+        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
+        
+        addSubview(collectionView)
+    }
+    
+    private func setupLayouts() {
+        collectionView.snp.makeConstraints { (make) in
+            make.top.equalTo(10)
+            make.bottom.equalTo(-10)
+            make.left.right.equalToSuperview()
+        }
+    }
+    
+    private lazy var collectionView: UICollectionView = {
+        let collectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)
+        collectionView.backgroundColor = kffffffColor
+        collectionView.delegate = self;
+        collectionView.dataSource = self;
+        collectionView.showsVerticalScrollIndicator = false
+        collectionView.showsHorizontalScrollIndicator = false
+        return collectionView
+    }()
+    
+    private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
+        let collectionViewLayout = UICollectionViewFlowLayout.init()
+        collectionViewLayout.minimumInteritemSpacing = 10
+        collectionViewLayout.scrollDirection = .horizontal
+        return collectionViewLayout
+    }()
+    
+}
+
+extension PublishTopicTypeCell: UICollectionViewDelegateFlowLayout,UICollectionViewDataSource,UICollectionViewDelegate {
+    func numberOfSections(in collectionView: UICollectionView) -> Int {
+        return 1
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+        return 6
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        let cell = PublishTopicTypeItemCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+        return cell
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
+        return CGSize(width:70, height: 70)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
+        return UIEdgeInsets(top: 0, left: 14, bottom: 0, right: 14)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        if let choosePicBlock = self.choosePicBlock {
+            choosePicBlock()
+        }
+    }
+    
+}

+ 108 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddTopic/View/PublishTopicTypeItemCollectionCell.swift

@@ -0,0 +1,108 @@
+//
+//  PublishTopicTypeItemCollectionCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/6/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  添加话题--话题类别のCell
+
+import UIKit
+import RxSwift
+
+class PublishTopicTypeItemCollectionCell: UICollectionViewCell {
+    
+    let disposeBag = DisposeBag()
+    
+    var showImage: UIImage? {
+        didSet {
+            if self.showImage != nil {
+                picImageView.image = self.showImage
+            }
+        }
+    }
+    
+    var productSearchModel: ProductSearchModel? {
+        didSet {
+            picImageView.kf.setImage(with: kURLImage(name: productSearchModel?.img ?? "pic_preload"), placeholder: kImage(name: "pic_preload"))
+        }
+    }
+    
+    typealias DelPicBlock = (_ idxRow:Int?) -> Void
+    var delPicBlock : DelPicBlock?
+    
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> PublishTopicTypeItemCollectionCell {
+        let ID = "PublishTopicTypeItemCollectionCell"
+        collectionView.register(PublishTopicTypeItemCollectionCell.self, forCellWithReuseIdentifier: ID)
+        let cell : PublishTopicTypeItemCollectionCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! PublishTopicTypeItemCollectionCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    //MARK: - indexPath
+    var indexPath: IndexPath?{
+        didSet {
+            
+        }
+    }
+    //MARK: - 初始化
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        cornerRadius = 2
+        masksToBounds = true
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        addSubview(picImageView)
+        addSubview(titleLabel)
+        addSubview(focusView)
+        
+        backgroundColor = UIColor.green
+    }
+    
+    private func setupLayouts() {
+        picImageView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(39)
+            make.height.equalTo(20)
+            make.centerX.equalToSuperview()
+        }
+        focusView.snp.makeConstraints { (make) in
+            make.top.equalTo(titleLabel.snp_bottom).offset(3)
+            make.width.equalTo(20)
+            make.height.equalTo(3)
+            make.centerX.equalToSuperview()
+        }
+    }
+    
+    private lazy var picImageView: UIImageView = {
+        let picImageView = UIImageView()
+        return picImageView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "文艺电影"
+        titleLabel.textColor = kffffffColor
+        titleLabel.font = kMediumFont14
+        titleLabel.textAlignment = .center
+        titleLabel.numberOfLines = 1
+        return titleLabel
+    }()
+    
+    private lazy var focusView: UIView = {
+        let focusView = UIView()
+        focusView.backgroundColor = kffffffColor
+        focusView.cornerRadius = 2
+        focusView.masksToBounds = true
+        return focusView
+    }()
+    
+}

+ 30 - 7
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/Controller/PublishEditController.swift

@@ -13,9 +13,6 @@ import Photos
 
 class PublishEditController: BaseViewController {
     
-    // 上传图片数组
-    var goodsImageArr = Array<UIImage>()
-    
     override func viewDidLoad() {
         super.viewDidLoad()
         setupViews()
@@ -32,10 +29,7 @@ class PublishEditController: BaseViewController {
             print("----点击了发布")
         }
         
-        self.view.addSubview(tableView)
-    }
-    
-    override func setupLayouts() {
+        view.addSubview(tableView)
         tableView.snp.makeConstraints { (make) in
             make.top.equalToSuperview().offset(kNavBarTotalHeight)
             make.left.right.bottom.equalToSuperview()
@@ -98,8 +92,37 @@ extension PublishEditController : UITableViewDelegate, UITableViewDataSource {
         }
     }
     
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        switch indexPath.row {
+//        case 0:
+//            let picCell = PublishEditAddPicCell.cellWith(tableView: tableView, indexPath: indexPath)
+//            return picCell
+//        case 1:
+//            let titleCell = PublishEditTitleCell.cellWith(tableView: tableView, indexPath: indexPath)
+//            return titleCell
+//        case 2:
+//            let desCell = PublishEditDescribeCell.cellWith(tableView: tableView, indexPath: indexPath)
+//            //            actCell.allSelectBlock = {
+//            //                [weak self] (isAllSel) in
+//            //                self?.isAllSelected = isAllSel
+//            //                self?.allSelectedAction(isAllSel)
+//            //            }
+//            return desCell
+        case 3:
+            let vc = PublishAddTopicController()
+            self.navigationController?.pushViewController(vc, animated: true)
+        case 4:
+            let vc = PublishAddAddressController()
+            self.navigationController?.pushViewController(vc, animated: true)
+        default:
+            print("----点击了-\(indexPath.row)")
+        }
+    }
+    
     func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
         switch indexPath.row {
+        case 0:
+            return 130
         case 1,3,4:
             return 50
         case 2:

+ 31 - 35
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/View/PublishEditAddAddressCell.swift

@@ -40,9 +40,9 @@ class PublishEditAddAddressCell: UITableViewCell {
         backgroundColor = kffffffColor
         
         addSubview(iconImageView)
+        addSubview(arrowImageView)
         addSubview(titleLabel)
-        addSubview(contentLabel)
-        addSubview(timeLabel)
+        addSubview(subLabel)
     }
     
     private func setupLayouts() {
@@ -51,23 +51,23 @@ class PublishEditAddAddressCell: UITableViewCell {
             make.left.equalTo(14)
             make.size.equalTo(24)
         }
-        titleLabel.snp.makeConstraints { (make) in
-            make.left.equalTo(iconImageView.snp_right).offset(10)
-            make.right.equalToSuperview().offset(-26)
-            make.centerY.equalTo(iconImageView)
-            make.height.equalTo(17)
+        arrowImageView.snp.makeConstraints { (make) in
+            make.right.equalToSuperview().offset(-19)
+            make.centerY.equalToSuperview()
+            make.width.equalTo(7)
+            make.height.equalTo(12)
         }
-        contentLabel.snp.makeConstraints { (make) in
-            make.top.equalTo(titleLabel.snp_bottom).offset(12)
-            make.left.equalTo(titleLabel.snp_left)
-            make.right.equalToSuperview().offset(-26)
+        titleLabel.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(iconImageView.snp_right).offset(6)
+            make.width.equalTo(56)
+            make.height.equalTo(20)
         }
-        timeLabel.snp.makeConstraints { (make) in
-            make.top.equalTo(contentLabel.snp_bottom).offset(8)
-            make.left.equalTo(titleLabel.snp_left)
-            make.right.equalTo(contentLabel.snp_right)
-            make.height.equalTo(15)
-            make.bottom.equalToSuperview().offset(-20)
+        subLabel.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(titleLabel.snp_right).offset(10)
+            make.right.equalTo(arrowImageView.snp_left).offset(-10)
+            make.height.equalTo(17)
         }
     }
     
@@ -79,30 +79,26 @@ class PublishEditAddAddressCell: UITableViewCell {
     
     private lazy var titleLabel: UILabel = {
         let titleLabel = UILabel()
-        titleLabel.text = "张吃饭"
-        titleLabel.textColor = k999999Color
-        titleLabel.font = kRegularFont14
+        titleLabel.text = "添加地点"
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kMediumFont14
         titleLabel.textAlignment = .left
         return titleLabel
     }()
     
-    private lazy var contentLabel: UILabel = {
-        let contentLabel = UILabel()
-        contentLabel.text = "点击单条评时弹出选择操作框(目前仅支持回复),点击操作框后进行相应的操作"
-        contentLabel.textColor = k333333Color
-        contentLabel.font = kRegularFont14
-        contentLabel.textAlignment = .left
-        contentLabel.numberOfLines = 0
-        return contentLabel
+    private lazy var subLabel: UILabel = {
+        let subLabel = UILabel()
+        subLabel.text = "(打卡地点,结识附近的彩虹居民)"
+        subLabel.textColor = kDDDDDDColor
+        subLabel.font = kRegularFont12
+        subLabel.textAlignment = .left
+        return subLabel
     }()
     
-    private lazy var timeLabel: UILabel = {
-        let timeLabel = UILabel()
-        timeLabel.text = "6个小时前"
-        timeLabel.textColor = kbbbbbbColor
-        timeLabel.font = kRegularFont12
-        timeLabel.textAlignment = .left
-        return timeLabel
+    lazy var arrowImageView : UIImageView = {
+        let iconImageView = UIImageView()
+        iconImageView.image = kImage(name: "my_arrows_unfold")
+        return iconImageView
     }()
     
 }

+ 93 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/View/PublishEditAddImgCollectionCell.swift

@@ -0,0 +1,93 @@
+//
+//  PublishEditAddImgCollectionCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/6/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  编辑发布--添加照片のCell(有图)
+
+import UIKit
+import RxSwift
+
+class PublishEditAddImgCollectionCell: UICollectionViewCell {
+    
+    let disposeBag = DisposeBag()
+    
+    var showImage: UIImage? {
+        didSet {
+            if self.showImage != nil {
+                picImageView.image = self.showImage
+            }
+        }
+    }
+    
+    var productSearchModel: ProductSearchModel? {
+        didSet {
+            picImageView.kf.setImage(with: kURLImage(name: productSearchModel?.img ?? "pic_preload"), placeholder: kImage(name: "pic_preload"))
+        }
+    }
+    
+    typealias DelPicBlock = (_ idxRow:Int?) -> Void
+    var delPicBlock : DelPicBlock?
+    
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> PublishEditAddImgCollectionCell {
+        let ID = "PublishEditAddImgCollectionCell"
+        collectionView.register(PublishEditAddImgCollectionCell.self, forCellWithReuseIdentifier: ID)
+        let cell : PublishEditAddImgCollectionCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! PublishEditAddImgCollectionCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    //MARK: - indexPath
+    var indexPath: IndexPath?{
+        didSet {
+            
+        }
+    }
+    //MARK: - 初始化
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        cornerRadius = 2
+        masksToBounds = true
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        addSubview(picImageView)        
+        addSubview(delButton)
+    }
+    
+    private func setupLayouts() {
+        picImageView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+        delButton.snp.makeConstraints { (make) in
+            make.top.right.equalToSuperview()
+            make.size.equalTo(26)
+        }
+    }
+    
+    private lazy var picImageView: UIImageView = {
+        let picImageView = UIImageView()
+        return picImageView
+    }()
+    
+    private lazy var delButton: UIButton = {
+        let delButton = UIButton(type: UIButton.ButtonType.custom)
+        delButton.setImage(kImage(name: "common_sku_cancel"), for: UIControl.State.normal)
+        delButton.rx.tap.subscribe(onNext: {
+            [weak self] (data) in
+            let idxPath = self?.indexPath
+            if let delPicBlock = self?.delPicBlock {
+                delPicBlock(idxPath?.row)
+            }
+        }).disposed(by: disposeBag)
+        return delButton
+    }()
+    
+}

+ 84 - 45
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/View/PublishEditAddPicCell.swift

@@ -7,15 +7,23 @@
 //
 
 import UIKit
-import RxSwift
-import IQKeyboardManagerSwift
 
 class PublishEditAddPicCell: UITableViewCell {
     
-    let disposeBag = DisposeBag()
+    private let maxImageCount: Int = 3
     
-    typealias NoteTextViewClosure = (_ text: String) -> Void
-    var noteTextViewClosure : NoteTextViewClosure?
+    typealias ChoosePicBlock = () -> Void
+    var choosePicBlock : ChoosePicBlock?
+    
+    typealias DelPicTransBlock = (_ idxRow:Int?) -> Void
+    var delPicTransBlock : DelPicTransBlock?
+    
+    var imgCount: Int = 0
+    var goodsImageArr: Array<UIImage>? {
+        didSet {
+            imgCount = self.goodsImageArr?.count ?? 0
+        }
+    }
     
     class func cellWith(tableView:UITableView,indexPath:IndexPath) -> PublishEditAddPicCell {
         let ID = "PublishEditAddPicCell"
@@ -40,62 +48,93 @@ class PublishEditAddPicCell: UITableViewCell {
             
         }
     }
+    
     //MRAK: - 设置View
     private func setupViews() {
         self.selectionStyle = .none
-        addSubview(titleLabel)
-        addSubview(noteTextView)
+        
+        addSubview(collectionView)
     }
     
     private func setupLayouts() {
-        titleLabel.snp.makeConstraints { (make) in
-            make.top.left.equalTo(14)
-            make.width.equalTo(56)
-            make.height.equalTo(20)
-        }
-        noteTextView.snp.remakeConstraints { (make) in
-            make.top.equalTo(6).priority(999)
-            make.height.greaterThanOrEqualTo(46).priority(888)
-            make.bottom.equalTo(-6).priority(777)
-            make.left.equalTo(titleLabel.snp_right).offset(20)
-            make.right.equalToSuperview().offset(-14)
+        collectionView.snp.remakeConstraints { (make) in
+            make.top.equalTo(15)
+            make.bottom.equalTo(-15)
+            make.left.right.equalToSuperview()
         }
     }
     
-    lazy var titleLabel: UILabel = {
-        let titleLabel = UILabel()
-        titleLabel.textColor = k333333Color
-        titleLabel.font = kRegularFont14
-        titleLabel.text = "备注信息"
-        return titleLabel
+    private lazy var collectionView: UICollectionView = {
+        let collectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)
+        collectionView.backgroundColor = kffffffColor
+        collectionView.delegate = self;
+        collectionView.dataSource = self;
+        collectionView.showsVerticalScrollIndicator = false
+        collectionView.showsHorizontalScrollIndicator = false
+        return collectionView
     }()
     
-    lazy var noteTextView: IQTextView = {
-        let noteTextView = IQTextView()
-        noteTextView.backgroundColor = kffffffColor
-        noteTextView.textColor = k999999Color
-        noteTextView.font = kRegularFont14
-        noteTextView.placeholder = "如需部分商品退款请备注退款商品的名称和数量,如订单疑问可通过“我的”联系社长哦"
-        noteTextView.placeholderTextColor = k999999Color
-        noteTextView.isScrollEnabled = false
-        noteTextView.delegate = self
-        return noteTextView
+    private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
+        let collectionViewLayout = UICollectionViewFlowLayout.init()
+        collectionViewLayout.minimumInteritemSpacing = 10
+        collectionViewLayout.scrollDirection = .horizontal
+        return collectionViewLayout
     }()
     
 }
 
-extension PublishEditAddPicCell: UITextViewDelegate {
-    
-    func textViewDidChange(_ textView: UITextView) {
-        if textView == noteTextView {
-            var fullStr = textView.text ?? ""
-            if textView.text?.count ?? 0 > 180 {
-                fullStr = String(fullStr.prefix(150)) as String
-                textView.text = fullStr
+extension PublishEditAddPicCell: UICollectionViewDelegateFlowLayout,UICollectionViewDataSource,UICollectionViewDelegate {
+    func numberOfSections(in collectionView: UICollectionView) -> Int {
+        return 1
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+        if imgCount < maxImageCount {
+            return imgCount+1
+        } else {
+            return maxImageCount
+        }        
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        if imgCount < maxImageCount && indexPath.row == imgCount {
+            // 添加图片
+            let cell = PublishEditDefaultCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+            if imgCount == 0 {
+                cell.noteStr = "添加图片"
+            } else {
+                cell.noteStr = "\(imgCount)/\(maxImageCount)"
             }
-            
-            if let noteTextViewClosure = self.noteTextViewClosure {
-                noteTextViewClosure(self.noteTextView.text ?? "")
+            return cell
+        } else {
+            // 展示图片
+            let pCell = PublishEditAddImgCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+            if indexPath.row < imgCount {
+                pCell.showImage = self.goodsImageArr![indexPath.row]
+            }
+            pCell.delPicBlock = {
+                [weak self] (idxRow) in
+                if let delPicTransBlock = self?.delPicTransBlock {
+                    delPicTransBlock(idxRow)
+                }
+            }
+            return pCell
+        }
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
+        return CGSize(width:100, height: 100)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
+        return UIEdgeInsets(top: 0, left: 14, bottom: 0, right: 14)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        if imgCount < maxImageCount && indexPath.row == imgCount {
+            // 添加图片
+            if let choosePicBlock = self.choosePicBlock {
+                choosePicBlock()
             }
         }
     }

+ 24 - 5
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/View/PublishEditAddTopicCell.swift

@@ -40,7 +40,9 @@ class PublishEditAddTopicCell: UITableViewCell {
         backgroundColor = kffffffColor
         
         addSubview(iconImageView)
-        
+        addSubview(arrowImageView)
+        addSubview(titleLabel)
+        addSubview(subLabel)
     }
     
     private func setupLayouts() {
@@ -49,7 +51,24 @@ class PublishEditAddTopicCell: UITableViewCell {
             make.left.equalTo(14)
             make.size.equalTo(24)
         }
-        
+        arrowImageView.snp.makeConstraints { (make) in
+            make.right.equalToSuperview().offset(-19)
+            make.centerY.equalToSuperview()
+            make.width.equalTo(7)
+            make.height.equalTo(12)
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(iconImageView.snp_right).offset(6)
+            make.width.equalTo(56)
+            make.height.equalTo(20)
+        }
+        subLabel.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(titleLabel.snp_right).offset(10)
+            make.right.equalTo(arrowImageView.snp_left).offset(-10)
+            make.height.equalTo(17)
+        }
     }
     
     lazy var iconImageView : UIImageView = {
@@ -69,9 +88,9 @@ class PublishEditAddTopicCell: UITableViewCell {
     
     private lazy var subLabel: UILabel = {
         let subLabel = UILabel()
-        subLabel.text = "添加话题"
-        subLabel.textColor = k333333Color
-        subLabel.font = kMediumFont14
+        subLabel.text = "(选择合适的话题让更多人看到)"
+        subLabel.textColor = kDDDDDDColor
+        subLabel.font = kRegularFont12
         subLabel.textAlignment = .left
         return subLabel
     }()

+ 83 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/View/PublishEditDefaultCollectionCell.swift

@@ -0,0 +1,83 @@
+//
+//  PublishEditDefaultCollectionCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/6/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  编辑发布--添加照片のCell(默认,无图)
+
+import UIKit
+import RxSwift
+
+class PublishEditDefaultCollectionCell: UICollectionViewCell {
+    
+    let disposeBag = DisposeBag()
+    
+    var noteStr: String? {
+        didSet {
+            titleLabel.text = noteStr
+        }
+    }
+    
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> PublishEditDefaultCollectionCell {
+        let ID = "PublishEditDefaultCollectionCell.swift"
+        collectionView.register(PublishEditDefaultCollectionCell.self, forCellWithReuseIdentifier: ID)
+        let cell : PublishEditDefaultCollectionCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! PublishEditDefaultCollectionCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    //MARK: - indexPath
+    var indexPath: IndexPath?{
+        didSet {
+            
+        }
+    }
+    //MARK: - 初始化
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        backgroundColor = kf7f8faColor
+        cornerRadius = 2
+        masksToBounds = true
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        addSubview(addImgView)
+        addSubview(titleLabel)
+    }
+    
+    private func setupLayouts() {
+        addImgView.snp.makeConstraints { (make) in
+            make.top.equalToSuperview().offset(28)
+            make.centerX.equalToSuperview()
+            make.size.equalTo(24)
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(addImgView.snp_bottom).offset(6)
+            make.centerX.equalToSuperview()
+            make.height.equalTo(17)
+        }
+    }
+    
+    private lazy var addImgView: UIImageView = {
+        let addImgView = UIImageView()
+        addImgView.image = kImage(name: "edit_ico_add_pic")
+        return addImgView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.textColor = kbbbbbbColor
+        titleLabel.font = kRegularFont12
+        titleLabel.textAlignment = .center
+        titleLabel.numberOfLines = 1
+        return titleLabel
+    }()
+    
+}

+ 4 - 2
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/View/PublishEditDescribeCell.swift

@@ -50,7 +50,9 @@ class PublishEditDescribeCell: UITableViewCell {
     
     private func setupLayouts() {
         cmtTextView.snp.makeConstraints { (make) in
-            make.edges.equalToSuperview()
+            make.top.bottom.equalToSuperview()
+            make.left.equalTo(14)
+            make.right.equalTo(-14)
         }
     }
     
@@ -60,7 +62,7 @@ class PublishEditDescribeCell: UITableViewCell {
         cmtTextView.textColor = k333333Color
         cmtTextView.font = kRegularFont14
         cmtTextView.placeholder = "说一说你的美好心得..."
-        cmtTextView.placeholderTextColor = k999999Color
+        cmtTextView.placeholderTextColor = kDDDDDDColor
         cmtTextView.delegate = self
         return cmtTextView
     }()

+ 3 - 2
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/View/PublishEditTitleCell.swift

@@ -65,10 +65,11 @@ class PublishEditTitleCell: UITableViewCell {
     private lazy var editTextField: UITextField = {
         let editTextField = UITextField()
         editTextField.textColor = k333333Color
-        editTextField.font = kRegularFont16
+        editTextField.font = kRegularFont14
         editTextField.tintColor = kEnabledButtonColor
         editTextField.clearButtonMode = .whileEditing
-        editTextField.placeholder = "标题吸引人,收豆不求人(标题20字,内容详情页不限)"
+//        editTextField.placeholder = "标题吸引人,收豆不求人(标题20字,内容详情页不限)"
+        editTextField.attributedPlaceholder = NSAttributedString.init(string:"标题吸引人,收豆不求人(标题20字,内容详情页不限)", attributes: [NSAttributedString.Key.font:kRegularFont14 as Any, NSAttributedString.Key.foregroundColor:kDDDDDDColor])
         editTextField.rx.text.orEmpty.changed.subscribe(onNext: {
             [weak self] (text) in
             self?.editTextField.text = String(describing: text.prefix(11))

+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_ico_add_pic.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "edit_ico_add_pic@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "edit_ico_add_pic@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_ico_add_pic.imageset/edit_ico_add_pic@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_ico_add_pic.imageset/edit_ico_add_pic@3x.png