Sfoglia il codice sorgente

删除了0.1我的控制器,我的基本完成剩余分享,内容详情页跳转

南鑫林 5 anni fa
parent
commit
425d890a54

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

@@ -155,7 +155,6 @@
 		A73911B3229ECE340033177E /* UICollectionViewLeftAlignedLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = A73911B1229ECE340033177E /* UICollectionViewLeftAlignedLayout.m */; };
 		A739121A229F75F50033177E /* JXPagingMainTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7391213229F75F50033177E /* JXPagingMainTableView.swift */; };
 		A739121B229F75F50033177E /* JXPagingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7391214229F75F50033177E /* JXPagingView.swift */; };
-		A739121C229F75F50033177E /* JXPagingListRefreshView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7391215229F75F50033177E /* JXPagingListRefreshView.swift */; };
 		A739121D229F75F50033177E /* JXPagingListContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7391216229F75F50033177E /* JXPagingListContainerView.swift */; };
 		A73D7C682268A032002A4CE3 /* SwiftyStarRatingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73D7C672268A032002A4CE3 /* SwiftyStarRatingView.swift */; };
 		A743229422B88ED30017C367 /* EnumMacro.swift in Sources */ = {isa = PBXBuildFile; fileRef = A743229322B88ED30017C367 /* EnumMacro.swift */; };
@@ -205,7 +204,6 @@
 		A77F2C9E2231FDDC001BD3F6 /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77F2C9D2231FDDC001BD3F6 /* BaseViewController.swift */; };
 		A77F2CA02231FE45001BD3F6 /* BaseWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77F2C9F2231FE45001BD3F6 /* BaseWebViewController.swift */; };
 		A77F2CB52232010F001BD3F6 /* ShoppingMallViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77F2CA72232010F001BD3F6 /* ShoppingMallViewController.swift */; };
-		A77F2CB72232010F001BD3F6 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77F2CAD2232010F001BD3F6 /* MineViewController.swift */; };
 		A77F2CB92232010F001BD3F6 /* ShoppingCartViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77F2CB32232010F001BD3F6 /* ShoppingCartViewController.swift */; };
 		A77F2CC3223203BA001BD3F6 /* AppDelegate+Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77F2CC2223203BA001BD3F6 /* AppDelegate+Window.swift */; };
 		A77F2CC722320627001BD3F6 /* WRNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77F2CC522320627001BD3F6 /* WRNavigationBar.swift */; };
@@ -299,14 +297,7 @@
 		A7C0FE0222B682DB00BC1E86 /* CommunityFeaturedTopicsHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C0FE0122B682DB00BC1E86 /* CommunityFeaturedTopicsHeaderView.swift */; };
 		A7C3DD1A226422BF00FA262E /* SwiftMoyaServiceSMSApi.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C3DD19226422BF00FA262E /* SwiftMoyaServiceSMSApi.swift */; };
 		A7C3DD1C226422D200FA262E /* SwiftMoyaNetWorkServiceSMS.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C3DD1B226422D200FA262E /* SwiftMoyaNetWorkServiceSMS.swift */; };
-		A7CC74D4226FF1AA003C4F38 /* MineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CC74D3226FF1AA003C4F38 /* MineView.swift */; };
-		A7CC74D6226FF421003C4F38 /* MineNavigationBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CC74D5226FF421003C4F38 /* MineNavigationBarView.swift */; };
-		A7CC74D822700359003C4F38 /* MineTableViewHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CC74D722700359003C4F38 /* MineTableViewHeaderView.swift */; };
-		A7CC74DA22702E41003C4F38 /* MineOrderTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CC74D922702E41003C4F38 /* MineOrderTableViewCell.swift */; };
-		A7CC74DC2270352F003C4F38 /* MineOrderCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CC74DB2270352F003C4F38 /* MineOrderCollectionViewCell.swift */; };
 		A7CC74DE22703B4A003C4F38 /* MineModule.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A7CC74DD22703B4A003C4F38 /* MineModule.xcassets */; };
-		A7CC74E0227042A4003C4F38 /* MineServiceTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CC74DF227042A4003C4F38 /* MineServiceTableViewCell.swift */; };
-		A7CC74E222704429003C4F38 /* MineServiceCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CC74E122704429003C4F38 /* MineServiceCollectionViewCell.swift */; };
 		A7CC74E62270628B003C4F38 /* DeliveryMethodTypeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CC74E52270628B003C4F38 /* DeliveryMethodTypeModel.swift */; };
 		A7CC7516227161D5003C4F38 /* SetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CC7515227161D5003C4F38 /* SetViewController.swift */; };
 		A7CC751822716202003C4F38 /* SetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CC751722716202003C4F38 /* SetView.swift */; };
@@ -718,7 +709,6 @@
 		A73911B2229ECE340033177E /* UICollectionViewLeftAlignedLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICollectionViewLeftAlignedLayout.h; sourceTree = "<group>"; };
 		A7391213229F75F50033177E /* JXPagingMainTableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JXPagingMainTableView.swift; sourceTree = "<group>"; };
 		A7391214229F75F50033177E /* JXPagingView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JXPagingView.swift; sourceTree = "<group>"; };
-		A7391215229F75F50033177E /* JXPagingListRefreshView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JXPagingListRefreshView.swift; sourceTree = "<group>"; };
 		A7391216229F75F50033177E /* JXPagingListContainerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JXPagingListContainerView.swift; sourceTree = "<group>"; };
 		A73D7C672268A032002A4CE3 /* SwiftyStarRatingView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftyStarRatingView.swift; sourceTree = "<group>"; };
 		A743229322B88ED30017C367 /* EnumMacro.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumMacro.swift; sourceTree = "<group>"; };
@@ -778,7 +768,6 @@
 		A77F2C9D2231FDDC001BD3F6 /* BaseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = "<group>"; };
 		A77F2C9F2231FE45001BD3F6 /* BaseWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseWebViewController.swift; sourceTree = "<group>"; };
 		A77F2CA72232010F001BD3F6 /* ShoppingMallViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShoppingMallViewController.swift; sourceTree = "<group>"; };
-		A77F2CAD2232010F001BD3F6 /* MineViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = "<group>"; };
 		A77F2CB32232010F001BD3F6 /* ShoppingCartViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShoppingCartViewController.swift; sourceTree = "<group>"; };
 		A77F2CC2223203BA001BD3F6 /* AppDelegate+Window.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "AppDelegate+Window.swift"; sourceTree = "<group>"; };
 		A77F2CC522320627001BD3F6 /* WRNavigationBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WRNavigationBar.swift; sourceTree = "<group>"; };
@@ -874,14 +863,7 @@
 		A7C0FE0122B682DB00BC1E86 /* CommunityFeaturedTopicsHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityFeaturedTopicsHeaderView.swift; sourceTree = "<group>"; };
 		A7C3DD19226422BF00FA262E /* SwiftMoyaServiceSMSApi.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftMoyaServiceSMSApi.swift; sourceTree = "<group>"; };
 		A7C3DD1B226422D200FA262E /* SwiftMoyaNetWorkServiceSMS.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftMoyaNetWorkServiceSMS.swift; sourceTree = "<group>"; };
-		A7CC74D3226FF1AA003C4F38 /* MineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineView.swift; sourceTree = "<group>"; };
-		A7CC74D5226FF421003C4F38 /* MineNavigationBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineNavigationBarView.swift; sourceTree = "<group>"; };
-		A7CC74D722700359003C4F38 /* MineTableViewHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineTableViewHeaderView.swift; sourceTree = "<group>"; };
-		A7CC74D922702E41003C4F38 /* MineOrderTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineOrderTableViewCell.swift; sourceTree = "<group>"; };
-		A7CC74DB2270352F003C4F38 /* MineOrderCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineOrderCollectionViewCell.swift; sourceTree = "<group>"; };
 		A7CC74DD22703B4A003C4F38 /* MineModule.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = MineModule.xcassets; sourceTree = "<group>"; };
-		A7CC74DF227042A4003C4F38 /* MineServiceTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineServiceTableViewCell.swift; sourceTree = "<group>"; };
-		A7CC74E122704429003C4F38 /* MineServiceCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineServiceCollectionViewCell.swift; sourceTree = "<group>"; };
 		A7CC74E52270628B003C4F38 /* DeliveryMethodTypeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeliveryMethodTypeModel.swift; sourceTree = "<group>"; };
 		A7CC7515227161D5003C4F38 /* SetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetViewController.swift; sourceTree = "<group>"; };
 		A7CC751722716202003C4F38 /* SetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetView.swift; sourceTree = "<group>"; };
@@ -2125,7 +2107,6 @@
 				A7391214229F75F50033177E /* JXPagingView.swift */,
 				A7391213229F75F50033177E /* JXPagingMainTableView.swift */,
 				A7391216229F75F50033177E /* JXPagingListContainerView.swift */,
-				A7391215229F75F50033177E /* JXPagingListRefreshView.swift */,
 			);
 			path = "JXPagingView-Swift";
 			sourceTree = "<group>";
@@ -2571,7 +2552,6 @@
 		A77F2CA92232010F001BD3F6 /* MineModule */ = {
 			isa = PBXGroup;
 			children = (
-				A77F2CAA2232010F001BD3F6 /* Mine */,
 				A790705922B9B663008CE279 /* ModifyData */,
 				A7D07CB822B73E5500186014 /* PersonalCenter */,
 				A743229C22B8D13B0017C367 /* MyFollowAndFan */,
@@ -2587,23 +2567,6 @@
 			path = MineModule;
 			sourceTree = "<group>";
 		};
-		A77F2CAA2232010F001BD3F6 /* Mine */ = {
-			isa = PBXGroup;
-			children = (
-				A7CC74D2226FF190003C4F38 /* View */,
-				A77F2CAB2232010F001BD3F6 /* ViewController */,
-			);
-			path = Mine;
-			sourceTree = "<group>";
-		};
-		A77F2CAB2232010F001BD3F6 /* ViewController */ = {
-			isa = PBXGroup;
-			children = (
-				A77F2CAD2232010F001BD3F6 /* MineViewController.swift */,
-			);
-			path = ViewController;
-			sourceTree = "<group>";
-		};
 		A77F2CAE2232010F001BD3F6 /* RegisterLoginModule */ = {
 			isa = PBXGroup;
 			children = (
@@ -3149,20 +3112,6 @@
 			path = SwiftMoyaServiceSMS;
 			sourceTree = "<group>";
 		};
-		A7CC74D2226FF190003C4F38 /* View */ = {
-			isa = PBXGroup;
-			children = (
-				A7CC74D5226FF421003C4F38 /* MineNavigationBarView.swift */,
-				A7CC74D3226FF1AA003C4F38 /* MineView.swift */,
-				A7CC74D722700359003C4F38 /* MineTableViewHeaderView.swift */,
-				A7CC74D922702E41003C4F38 /* MineOrderTableViewCell.swift */,
-				A7CC74DB2270352F003C4F38 /* MineOrderCollectionViewCell.swift */,
-				A7CC74DF227042A4003C4F38 /* MineServiceTableViewCell.swift */,
-				A7CC74E122704429003C4F38 /* MineServiceCollectionViewCell.swift */,
-			);
-			path = View;
-			sourceTree = "<group>";
-		};
 		A7CC751222716194003C4F38 /* Set */ = {
 			isa = PBXGroup;
 			children = (
@@ -4782,7 +4731,6 @@
 				BD01B20022BC677900CE9F36 /* PublishVideoRecorderController.swift in Sources */,
 				BDF862AC228E5112000DEF84 /* OrderCommentAddImgCollectionCell.swift in Sources */,
 				A7931E0222AF827600297D0A /* ESTabBarItem.swift in Sources */,
-				A7CC74D4226FF1AA003C4F38 /* MineView.swift in Sources */,
 				A71AA5152272160A008FF1A5 /* ExpressAddressListTableViewCell.swift in Sources */,
 				A72A72B722321DE000B21995 /* Extension+NSMutableAttributedString.swift in Sources */,
 				A7931E0D22AF874600297D0A /* GenderSelectionViewController.swift in Sources */,
@@ -4796,12 +4744,10 @@
 				BD12B68822B4F28F00AEB10B /* KSExtension.swift in Sources */,
 				A7A98DFF227E8501005306E9 /* SwiftMoyaNetWorkServiceProduct.swift in Sources */,
 				BDDF3B28228EBB72003A7D16 /* ProductRefundReasonModel.swift in Sources */,
-				A7CC74DC2270352F003C4F38 /* MineOrderCollectionViewCell.swift in Sources */,
 				BDD4FB1222840597006FE833 /* ShoppingCartPayOrderController.swift in Sources */,
 				BD3AA45F22AE6F2500EF4F20 /* MessagePlanetTableCell.swift in Sources */,
 				BD12203A22AF80AD0051C7C2 /* MessageActivityTableCell.swift in Sources */,
 				A7284404224DBFBD00F82F30 /* UserModel.swift in Sources */,
-				A7CC74D822700359003C4F38 /* MineTableViewHeaderView.swift in Sources */,
 				A7931E1122AF989B00297D0A /* TopicSelectionViewController.swift in Sources */,
 				A71D2A602265673A00A55D16 /* RegisterLoginView.swift in Sources */,
 				BD12B6AC22B502C200AEB10B /* KSVideoPlayerBaseView.m in Sources */,
@@ -4884,7 +4830,6 @@
 				BD7AB83F228438290030646A /* OrderPayExpressAddInfoCell.swift in Sources */,
 				A7DF50DF22A5590200998908 /* BrowsePicturesViewController.swift in Sources */,
 				BD10CCF822BE6DF00040796E /* PublishCutVideoController.swift in Sources */,
-				A7CC74DA22702E41003C4F38 /* MineOrderTableViewCell.swift in Sources */,
 				A77F2CB92232010F001BD3F6 /* ShoppingCartViewController.swift in Sources */,
 				BD13B6C122BA034D008BB323 /* PublishEditAddPicCell.swift in Sources */,
 				A72A72B822321DE000B21995 /* Extension+UserDefaults.swift in Sources */,
@@ -5017,7 +4962,6 @@
 				A7D5F23322BB9BE600F8E9AF /* H5CommonViewController.swift in Sources */,
 				BD13B6C522BA034D008BB323 /* PublishEditAddAddressCell.swift in Sources */,
 				A7B4E71F228131720012914A /* ProductSlidingLeftRightCollectionViewCell.swift in Sources */,
-				A77F2CB72232010F001BD3F6 /* MineViewController.swift in Sources */,
 				A7778CA92244904500C7C47A /* Extension+Gifu.GIFImageView.swift in Sources */,
 				A71738AB22898660000AEA6A /* ShopModel.swift in Sources */,
 				A7FF1557228AC3E800A85748 /* ProductAllCommentViewController.swift in Sources */,
@@ -5059,7 +5003,6 @@
 				BD10CD0822BFC1C20040796E /* PublishMusicItemCell.swift in Sources */,
 				A7FF1564228C696B00A85748 /* OrderListView.swift in Sources */,
 				A70B2C072284305400B2449F /* ProductModel.swift in Sources */,
-				A7CC74E0227042A4003C4F38 /* MineServiceTableViewCell.swift in Sources */,
 				A72A72BC22321DE000B21995 /* Extension+UIAlertController.swift in Sources */,
 				A7BB68662269B1DD00AB07A2 /* AddressPOIView.swift in Sources */,
 				BDF862A7228E42FA000DEF84 /* OrderApplyRefundController.swift in Sources */,
@@ -5099,9 +5042,7 @@
 				BD13B6C322BA034D008BB323 /* PublishEditDescribeCell.swift in Sources */,
 				A7CC752C2271A1AE003C4F38 /* SetPasswordViewController.swift in Sources */,
 				A7C0FDEE22B6516A00BC1E86 /* CommunityBannerTableViewCell.swift in Sources */,
-				A7CC74E222704429003C4F38 /* MineServiceCollectionViewCell.swift in Sources */,
 				A738D202225AD6AD00EEE860 /* Extension+UICollectionView.swift in Sources */,
-				A7CC74D6226FF421003C4F38 /* MineNavigationBarView.swift in Sources */,
 				BD4B50B422BC8AD50073B516 /* AliyunPathManager.m in Sources */,
 				BDAF83AA22B388F20004BCC3 /* RecommendDefaultBackCell.swift in Sources */,
 				BD4B50B722BCBEBE0073B516 /* QUProgressView.m in Sources */,
@@ -5191,7 +5132,6 @@
 				A7CC751F227190C5003C4F38 /* AccountSecurityViewController.swift in Sources */,
 				BD13B6C422BA034D008BB323 /* PublishEditDefaultCollectionCell.swift in Sources */,
 				BD10CCFB22BE75080040796E /* PublishChooseVideoCover.swift in Sources */,
-				A739121C229F75F50033177E /* JXPagingListRefreshView.swift in Sources */,
 				BD29A92E228F99780018CFC3 /* OrderCommentParameterModel.swift in Sources */,
 				A7284440224DFACD00F82F30 /* InfoModel.swift in Sources */,
 				A72A72B522321DE000B21995 /* Extension+UITextView.swift in Sources */,

+ 0 - 65
RainbowPlanet/RainbowPlanet/Modules/MineModule/Mine/View/MineNavigationBarView.swift

@@ -1,65 +0,0 @@
-//
-//  MineNavigationBarView.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2019/4/24.
-//  Copyright © 2019 南鑫林. All rights reserved.
-//
-
-import UIKit
-import PPBadgeViewSwift
-
-class MineNavigationBarView: BaseView {
-
-    typealias MessageBlock = () -> Void
-    var messageBlock : MessageBlock?
-    
-    typealias SetBlock = () -> Void
-    var setBlock : SetBlock?
-    
-    override func setupViews() {
-        addSubview(messageButton)
-        addSubview(setButton)
-    }
-    
-    override func setupLayouts() {
-        messageButton.snp.makeConstraints { (make) in
-            make.centerY.equalToSuperview()
-            make.left.equalTo(14)
-            make.width.equalTo(25)
-            make.height.equalTo(23)
-        }
-        
-        setButton.snp.makeConstraints { (make) in
-            make.centerY.equalToSuperview()
-            make.right.equalTo(-14)
-            make.width.equalTo(25)
-            make.height.equalTo(23)
-        }
-    }
-    
-    private lazy var messageButton: UIButton = {
-        let messageButton = UIButton(type: UIButton.ButtonType.custom)
-        messageButton.setImage(kImage(name: "navbar_message_entrance"), for: UIControl.State.normal)
-        messageButton.pp.addBadge(number: 0)
-        messageButton.pp.badgeView.size = CGSize(width: 14, height: 14)
-        messageButton.rx.tap.subscribe(onNext: {[weak self] (data) in
-            if let messageBlock = self?.messageBlock {
-                messageBlock()
-            }
-        }).disposed(by: disposeBag)
-        return messageButton
-    }()
-    
-    private lazy var setButton: UIButton = {
-        let setButton = UIButton(type: UIButton.ButtonType.custom)
-        setButton.setImage(kImage(name: "navbar_set_entrance"), for: UIControl.State.normal)
-        setButton.rx.tap.subscribe(onNext: {[weak self] (data) in
-            if let setBlock = self?.setBlock {
-                setBlock()
-            }
-        }).disposed(by: disposeBag)
-        return setButton
-    }()
-
-}

+ 0 - 73
RainbowPlanet/RainbowPlanet/Modules/MineModule/Mine/View/MineOrderCollectionViewCell.swift

@@ -1,73 +0,0 @@
-//
-//  MineOrderCollectionViewCell.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2019/4/24.
-//  Copyright © 2019 南鑫林. All rights reserved.
-//
-
-import UIKit
-
-class MineOrderCollectionViewCell: UICollectionViewCell {
-    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> MineOrderCollectionViewCell {
-        let ID = "MineOrderCollectionViewCell"
-        collectionView.register(MineOrderCollectionViewCell.self, forCellWithReuseIdentifier: ID)
-        let cell : MineOrderCollectionViewCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! MineOrderCollectionViewCell
-        cell.indexPath = indexPath
-        return cell
-    }
-    //MARK: - 初始化
-    override init(frame: CGRect) {
-        super.init(frame: frame)
-        setupViews()
-        setupLayouts()
-    }
-    
-    required init?(coder aDecoder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-    
-    //MARK: - 设置view
-    private func setupViews() {
-        addSubview(iconButton)
-    }
-    
-    private func setupLayouts() {
-        iconButton.snp.makeConstraints { (make) in
-            make.top.centerX.equalToSuperview()
-            make.width.equalTo((kScreenWidth-28)/5)
-            make.height.equalTo(kScaleValue(value: 40)+24)
-        }
-    }
-    
-    private lazy var iconButton: UIButton = {
-        let iconButton = UIButton(type: UIButton.ButtonType.custom)
-        iconButton.setTitleColor(k999999Color, for: UIControl.State.normal)
-        iconButton.titleLabel?.font = kRegularFont13
-        iconButton.titleLabel?.adjustsFontSizeToFitWidth = true
-        iconButton.isUserInteractionEnabled = false
-        return iconButton
-    }()
-    
-    //MARK: - indexPath
-    var indexPath: IndexPath?{
-        didSet {
-            
-        }
-    }
-    
-    var images: Array<String>? {
-        didSet {
-            iconButton.setImage(kImage(name: images![(indexPath?.row)!]), for: UIControl.State.normal)
-           
-        }
-    }
-    
-    var titles: Array<String>? {
-        didSet {
-             iconButton.setTitle(titles![(indexPath?.row)!], for: UIControl.State.normal)
-            iconButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.top, imageTitleSpace: 6)
-        }
-    }
-    
-}

+ 0 - 209
RainbowPlanet/RainbowPlanet/Modules/MineModule/Mine/View/MineOrderTableViewCell.swift

@@ -1,209 +0,0 @@
-//
-//  MineOrderTableViewCell.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2019/4/24.
-//  Copyright © 2019 南鑫林. All rights reserved.
-//
-
-import UIKit
-import RxSwift
-import RxCocoa
-
-class MineOrderTableViewCell: UITableViewCell {
-    
-    let disposeBag = DisposeBag()
-    
-    typealias LookAllOrderButtonBlock = () -> Void
-    var lookAllOrderButtonBlock : LookAllOrderButtonBlock?
-    
-    typealias DidSelectItemAtClosure = (_ indexPath: IndexPath) -> Void
-     var didSelectItemAtClosure : DidSelectItemAtClosure?
-    
-    let images = ["my_payment","my_shipment","my_reception","my_evaluation","my_refund"]
-    
-    let titles = ["待付款","待发货","待收货","待评价","退款/售后"]
-
-    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> MineOrderTableViewCell {
-        let ID = "MineOrderTableViewCell"
-        tableView.register(MineOrderTableViewCell.self, forCellReuseIdentifier: ID)
-        let cell : MineOrderTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! MineOrderTableViewCell
-        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 = kf7f8faColor
-        addSubview(bgView)
-        bgView.addSubview(topButton)
-        topButton.addSubview(titleLabel)
-        topButton.addSubview(lookAllOrderButton)
-        topButton.addSubview(lineLabel)
-        bgView.addSubview(collectionView)
-    }
-    
-    private func setupLayouts() {
-        bgView.snp.makeConstraints { (make) in
-            make.top.bottom.equalToSuperview()
-            make.left.equalTo(14)
-            make.right.equalTo(-14)
-        }
-
-        topButton.snp.makeConstraints { (make) in
-            make.top.left.right.equalToSuperview()
-            make.height.equalTo(44)
-        }
-        titleLabel.snp.makeConstraints { (make) in
-            make.centerY.equalToSuperview()
-            make.left.equalTo(10)
-        }
-        lookAllOrderButton.snp.makeConstraints { (make) in
-            make.centerY.equalToSuperview()
-            make.right.equalTo(-10)
-        }
-        lookAllOrderButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.right, imageTitleSpace: 4)
-        lineLabel.snp.makeConstraints { (make) in
-            make.left.right.bottom.equalToSuperview()
-            make.height.equalTo(0.5)
-        }
-        
-        collectionView.snp.makeConstraints { (make) in
-            make.top.equalTo(topButton.snp.bottom)
-            make.left.equalTo(0)
-            make.right.equalTo(0)
-            make.height.equalTo(kScaleValue(value: 94))
-            make.bottom.lessThanOrEqualTo(bgView)
-        }
-    }
-    
-    private lazy var bgView: UIView = {
-        let bgView = UIView()
-        bgView.backgroundColor = UIColor.white
-        bgView.cornerRadius = 2.5
-        bgView.masksToBounds = true
-        return bgView
-    }()
-    
-    private lazy var topButton: UIButton = {
-        let topButton = UIButton(type: UIButton.ButtonType.custom)
-        return topButton
-    }()
-    
-    private lazy var titleLabel: UILabel = {
-        let titleLabel = UILabel()
-        titleLabel.text = "我的订单"
-        titleLabel.textColor = k333333Color
-        titleLabel.font = kMediumFont16
-        return titleLabel
-    }()
-    
-    private lazy var lookAllOrderButton: UIButton = {
-        let lookAllOrderButton = UIButton(type: UIButton.ButtonType.custom)
-        lookAllOrderButton.setTitle("查看全部订单", for: UIControl.State.normal)
-        lookAllOrderButton.setImage(kImage(name: "my_arrows_unfold"), for:
-            UIControl.State.normal)
-        lookAllOrderButton.setTitleColor(k999999Color, for: UIControl.State.normal)
-        lookAllOrderButton.titleLabel?.font = kRegularFont13
-        lookAllOrderButton.rx.tap.subscribe(onNext: {
-            [weak self] (data) in
-            if let lookAllOrderButtonBlock = self?.lookAllOrderButtonBlock {
-                lookAllOrderButtonBlock()
-            }
-        }).disposed(by: disposeBag)
-        return lookAllOrderButton
-    }()
-    
-    private lazy var lineLabel: UILabel = {
-        let lineLabel = UILabel()
-        lineLabel.backgroundColor = kf5f5f5Color
-        return lineLabel
-    }()
-    
-    private lazy var collectionView: UICollectionView = {
-        let collectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)
-        collectionView.backgroundColor = UIColor.white
-        collectionView.delegate = self;
-        collectionView.dataSource = self;
-        collectionView.showsVerticalScrollIndicator = false
-        collectionView.showsHorizontalScrollIndicator = false
-        collectionView.cornerRadius = 2.5
-        collectionView.masksToBounds = true
-        return collectionView
-    }()
-    
-    private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
-        let collectionViewLayout = UICollectionViewFlowLayout.init()
-        collectionViewLayout.minimumLineSpacing = 0
-        collectionViewLayout.minimumInteritemSpacing = 0
-        return collectionViewLayout
-    }()
-    
-    //加载数据
-    func reloadData() {
-        
-        //collectionView重新加载数据
-        self.collectionView.reloadData()
-        //更新collectionView的高度约束
-        let contentSize = self.collectionView.collectionViewLayout.collectionViewContentSize
-        collectionView.snp.remakeConstraints { (make) in
-            make.top.equalTo(topButton.snp.bottom)
-            make.left.right.equalToSuperview()
-            make.height.equalTo(contentSize.height)
-            make.bottom.lessThanOrEqualTo(bgView)
-        }
-        
-        self.collectionView.collectionViewLayout.invalidateLayout()
-    }
-    
-}
-
-extension MineOrderTableViewCell: UICollectionViewDelegateFlowLayout,UICollectionViewDataSource {
-    func numberOfSections(in collectionView: UICollectionView) -> Int {
-        return 1
-    }
-    
-    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
-        return images.count
-    }
-    
-    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
-        let cell = MineOrderCollectionViewCell.cellWith(collectionView: collectionView, indexPath: indexPath)
-        cell.images = images
-        cell.titles = titles
-        return cell
-        
-    }
-    
-    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
-        if let didSelectItemAtClosure = didSelectItemAtClosure {
-            didSelectItemAtClosure(indexPath)
-        }
-        
-    }
-    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
-        return CGSize(width:(kScreenWidth-28)/5, height: kScaleValue(value: 40)+24)
-    }
-    
-    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
-        return UIEdgeInsets(top: 14, left: 0, bottom: 14, right: 0)
-    }
-    
-}
-

+ 0 - 106
RainbowPlanet/RainbowPlanet/Modules/MineModule/Mine/View/MineServiceCollectionViewCell.swift

@@ -1,106 +0,0 @@
-//
-//  MineServiceCollectionViewCell.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2019/4/24.
-//  Copyright © 2019 南鑫林. All rights reserved.
-//
-
-import UIKit
-
-class MineServiceCollectionViewCell: UICollectionViewCell {
-    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> MineServiceCollectionViewCell {
-        let ID = "MineServiceCollectionViewCell"
-        collectionView.register(MineServiceCollectionViewCell.self, forCellWithReuseIdentifier: ID)
-        let cell : MineServiceCollectionViewCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! MineServiceCollectionViewCell
-        cell.indexPath = indexPath
-        return cell
-    }
-    //MARK: - indexPath
-    var indexPath: IndexPath?{
-        didSet {
-            
-        }
-    }
-    //MARK: - 初始化
-    override init(frame: CGRect) {
-        super.init(frame: frame)
-        setupViews()
-        setupLayouts()
-    }
-    
-    required init?(coder aDecoder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-    
-    //MARK: - 设置view
-    private func setupViews() {
-        addSubview(titleLabel)
-        addSubview(detailTitleLabel)
-        addSubview(goImageView)
-        addSubview(lineLabel)
-        
-    }
-    
-    private func setupLayouts() {
-        titleLabel.snp.makeConstraints { (make) in
-            make.centerY.equalToSuperview()
-            make.left.equalTo(16)
-        }
-        detailTitleLabel.snp.makeConstraints { (make) in
-            make.centerY.equalToSuperview()
-            make.right.equalTo(goImageView.snp.left).offset(-4)
-        }
-        goImageView.snp.makeConstraints { (make) in
-            make.centerY.equalToSuperview()
-            make.right.equalTo(-10)
-        }
-        lineLabel.snp.makeConstraints { (make) in
-            make.left.equalTo(16)
-            make.height.equalTo(0.5)
-            make.bottom.right.equalToSuperview()
-        }
-    }
-    
-    private lazy var titleLabel: UILabel = {
-        let titleLabel = UILabel()
-        titleLabel.textColor = k333333Color
-        titleLabel.font = kRegularFont13
-        return titleLabel
-    }()
-    
-    private lazy var detailTitleLabel: UILabel = {
-        let detailTitleLabel = UILabel()
-        detailTitleLabel.textColor = k999999Color
-        detailTitleLabel.font = kRegularFont13
-        return detailTitleLabel
-    }()
-    
-    private lazy var goImageView: UIImageView = {
-        let goImageView = UIImageView()
-        goImageView.image = kImage(name: "my_arrows_unfold")
-        return goImageView
-    }()
-    
-    private lazy var lineLabel : UILabel = {
-        let lineLabel = UILabel()
-        lineLabel.backgroundColor = kf5f5f5Color
-        return lineLabel
-    }()
-    
-    var titles: Array<String>? {
-        didSet {
-            titleLabel.text = titles?[(indexPath?.row)!]
-            switch indexPath?.row {
-            case 0:
-                detailTitleLabel.text = "18392968047"
-                detailTitleLabel.isHidden = false
-            default:
-                detailTitleLabel.isHidden = true
-                break
-            }
-            
-        }
-    }
-    
-}

+ 0 - 171
RainbowPlanet/RainbowPlanet/Modules/MineModule/Mine/View/MineServiceTableViewCell.swift

@@ -1,171 +0,0 @@
-//
-//  MineServiceTableViewCell.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2019/4/24.
-//  Copyright © 2019 南鑫林. All rights reserved.
-//
-
-import UIKit
-
-class MineServiceTableViewCell: UITableViewCell {
-    
-    let titles = ["客服电话","个人资料","账号安全"]
-
-    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> MineServiceTableViewCell {
-        let ID = "MineServiceTableViewCell"
-        tableView.register(MineServiceTableViewCell.self, forCellReuseIdentifier: ID)
-        let cell : MineServiceTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! MineServiceTableViewCell
-        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 = kf7f8faColor
-        addSubview(bgView)
-        bgView.addSubview(topButton)
-        topButton.addSubview(titleLabel)
-        topButton.addSubview(lineLabel)
-        bgView.addSubview(collectionView)
-
-    }
-    
-    private func setupLayouts() {
-        bgView.snp.makeConstraints { (make) in
-            make.top.bottom.equalToSuperview()
-            make.left.equalTo(14)
-            make.right.equalTo(-14)
-        }
-        
-        topButton.snp.makeConstraints { (make) in
-            make.top.left.right.equalToSuperview()
-            make.height.equalTo(44)
-        }
-        titleLabel.snp.makeConstraints { (make) in
-            make.centerY.equalToSuperview()
-            make.left.equalTo(10)
-        }
-        lineLabel.snp.makeConstraints { (make) in
-            make.left.right.bottom.equalToSuperview()
-            make.height.equalTo(0.5)
-        }
-        collectionView.snp.makeConstraints { (make) in
-            make.top.equalTo(topButton.snp.bottom)
-            make.left.equalTo(0)
-            make.right.equalTo(0)
-            make.height.equalTo(kScaleValue(value: 94))
-            make.bottom.lessThanOrEqualTo(bgView)
-        }
-    }
-    
-    private lazy var bgView: UIView = {
-        let bgView = UIView()
-        bgView.backgroundColor = UIColor.white
-        bgView.cornerRadius = 2.5
-        bgView.masksToBounds = true
-        return bgView
-    }()
-    
-    private lazy var topButton: UIButton = {
-        let topButton = UIButton(type: UIButton.ButtonType.custom)
-        return topButton
-    }()
-    
-    private lazy var titleLabel: UILabel = {
-        let titleLabel = UILabel()
-        titleLabel.text = "我的服务"
-        titleLabel.textColor = k333333Color
-        titleLabel.font = kMediumFont16
-        return titleLabel
-    }()
-    
-    private lazy var lineLabel: UILabel = {
-        let lineLabel = UILabel()
-        lineLabel.backgroundColor = kf5f5f5Color
-        return lineLabel
-    }()
-    
-    private lazy var collectionView: UICollectionView = {
-        let collectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)
-        collectionView.backgroundColor = UIColor.white
-        collectionView.delegate = self;
-        collectionView.dataSource = self;
-        collectionView.showsVerticalScrollIndicator = false
-        collectionView.showsHorizontalScrollIndicator = false
-        collectionView.cornerRadius = 2.5
-        collectionView.masksToBounds = true
-        return collectionView
-    }()
-    
-    private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
-        let collectionViewLayout = UICollectionViewFlowLayout.init()
-        collectionViewLayout.minimumLineSpacing = 0
-        collectionViewLayout.minimumInteritemSpacing = 0
-        return collectionViewLayout
-    }()
-    
-    //加载数据
-    func reloadData() {
-        
-        //collectionView重新加载数据
-        self.collectionView.reloadData()
-        //更新collectionView的高度约束
-        let contentSize = self.collectionView.collectionViewLayout.collectionViewContentSize
-        collectionView.snp.remakeConstraints { (make) in
-            make.top.equalTo(topButton.snp.bottom)
-            make.left.right.equalToSuperview()
-            make.height.equalTo(contentSize.height)
-            make.bottom.lessThanOrEqualTo(bgView)
-        }
-        
-        self.collectionView.collectionViewLayout.invalidateLayout()
-    }
-    
-}
-
-extension MineServiceTableViewCell: UICollectionViewDelegateFlowLayout,UICollectionViewDataSource {
-    func numberOfSections(in collectionView: UICollectionView) -> Int {
-        return 1
-    }
-    
-    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
-        return titles.count
-    }
-    
-    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
-        let cell = MineServiceCollectionViewCell.cellWith(collectionView: collectionView, indexPath: indexPath)
-        cell.titles = titles
-        return cell
-        
-    }
-    
-    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
-        showSwiftProgressHUDInfo()
-    }
-    
-    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
-        return CGSize(width:kScreenWidth-28, height: 48)
-    }
-    
-    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
-        return UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
-    }
-    
-}

+ 0 - 167
RainbowPlanet/RainbowPlanet/Modules/MineModule/Mine/View/MineTableViewHeaderView.swift

@@ -1,167 +0,0 @@
-//
-//  MineTableViewHeaderView.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2019/4/24.
-//  Copyright © 2019 南鑫林. All rights reserved.
-//
-
-import UIKit
-
-class MineTableViewHeaderView: BaseView {
-
-    typealias AddressClosure = () -> Void
-    var addressClosure : AddressClosure?
-    
-    override func setupViews() {
-        addSubview(bgView)
-        addSubview(homepageView)
-        homepageView.addSubview(avatarBgButton)
-        homepageView.addSubview(lineLabel)
-        homepageView.addSubview(addressBgButton)
-        avatarBgButton.addSubview(avatarButton)
-        avatarBgButton.addSubview(nickNameLabel)
-        avatarBgButton.addSubview(goButton)
-        addressBgButton.addSubview(addressLabel)
-        addressBgButton.addSubview(goAddressButton)
-        
-    }
-    
-    override func setupLayouts() {
-        homepageView.snp.makeConstraints { (make) in
-            make.top.equalTo(kNavBarTotalHeight)
-            make.left.equalTo(15)
-            make.right.equalTo(-15)
-            make.height.equalTo(124)
-        }
-        avatarBgButton.snp.makeConstraints { (make) in
-            make.top.left.right.equalToSuperview()
-            make.height.equalTo(80)
-        }
-        lineLabel.snp.makeConstraints { (make) in
-            make.top.equalTo(avatarBgButton.snp.bottom)
-            make.left.equalToSuperview().offset(16)
-            make.right.equalToSuperview()
-            make.height.equalTo(0.5)
-        }
-        addressBgButton.snp.makeConstraints { (make) in
-            make.top.equalTo(lineLabel.snp.bottom)
-            make.bottom.left.right.equalToSuperview()
-        }
-        avatarButton.snp.makeConstraints { (make) in
-            make.centerY.equalToSuperview()
-            make.left.equalToSuperview().offset(16)
-            make.size.equalTo(50)
-        }
-        nickNameLabel.snp.makeConstraints { (make) in
-            make.centerY.equalToSuperview()
-            make.left.equalTo(avatarButton.snp.right).offset(15)
-        }
-        
-        goButton.snp.makeConstraints { (make) in
-            make.centerY.equalToSuperview()
-            make.right.equalTo(-10)
-        }
-        goButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.right, imageTitleSpace: 4)
-        
-        addressLabel.snp.makeConstraints { (make) in
-            make.centerY.equalToSuperview()
-            make.left.equalTo(16)
-        }
-        
-        goAddressButton.snp.makeConstraints { (make) in
-            make.centerY.equalToSuperview()
-            make.right.equalTo(-10)
-        }
-    }
-    
-    private lazy var bgView: UIView = {
-        let bgView = UIView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: kNavBarTotalHeight + 46))
-        bgView.backgroundColor = kf7f8faColor
-        let bgLayer1 = CAGradientLayer()
-        bgLayer1.colors = [UIColor(red: 0.99, green: 0.74, blue: 0.42, alpha: 1).cgColor, UIColor(red: 1, green: 0.67, blue: 0.2, alpha: 1).cgColor]
-        bgLayer1.locations = [0, 1]
-        bgLayer1.frame = bgView.bounds
-        bgLayer1.startPoint = CGPoint(x: 1, y: 0)
-        bgLayer1.endPoint = CGPoint(x: 1.13, y: 1.13)
-        bgView.layer.addSublayer(bgLayer1)
-        return bgView
-    }()
-    
-    private lazy var homepageView : UIView = {
-        let homepageView = UIView()
-        homepageView.backgroundColor = UIColor.white
-        homepageView.cornerRadius = 2.5
-        homepageView.masksToBounds = true
-        return homepageView
-    }()
-    
-    private lazy var avatarBgButton: UIButton = {
-        let avatarBgButton = UIButton(type: UIButton.ButtonType.custom)
-        return avatarBgButton
-    }()
-    
-    private lazy var lineLabel: UILabel = {
-        let lineLabel = UILabel()
-        lineLabel.backgroundColor = kf5f5f5Color
-        return lineLabel
-    }()
-    
-    private lazy var addressBgButton: UIButton = {
-        let avatarBgButton = UIButton(type: UIButton.ButtonType.custom)
-        avatarBgButton.rx.tap.subscribe(onNext: { [weak self] (data) in
-            if let addressClosure = self?.addressClosure {
-                addressClosure()
-            }
-        }).disposed(by: disposeBag)
-        return avatarBgButton
-    }()
-    
-    private lazy var avatarButton: UIButton = {
-        let avatarButton = UIButton(type: UIButton.ButtonType.custom)
-        avatarButton.setBackgroundImage(kImage(name: "pic_preload"), for: UIControl.State.normal)
-        avatarButton.cornerRadius = 25
-        avatarButton.masksToBounds = true
-        return avatarButton
-    }()
-    
-    private lazy var nickNameLabel: UILabel = {
-        let nickNameLabel = UILabel()
-        nickNameLabel.text = "昵称"
-        nickNameLabel.textColor = k333333Color
-        nickNameLabel.font = kMediumFont21
-        return nickNameLabel
-    }()
-    
-    private lazy var goButton: UIButton = {
-        let goButton = UIButton(type: UIButton.ButtonType.custom)
-        goButton.setImage(kImage(name: "my_arrows_unfold"), for: UIControl.State.normal)
-        goButton.setTitle("个人主页", for: UIControl.State.normal)
-        goButton.setTitleColor(k999999Color, for: UIControl.State.normal)
-        goButton.titleLabel?.font = kRegularFont13
-        return goButton
-    }()
-    
-    private lazy var addressLabel: UILabel = {
-        let addressLabel = UILabel()
-        addressLabel.text = "我的地址管理"
-        addressLabel.textColor = k333333Color
-        addressLabel.font = kRegularFont16
-        return addressLabel
-    }()
-    
-    private lazy var goAddressButton: UIButton = {
-        let goAddressButton = UIButton(type: UIButton.ButtonType.custom)
-        goAddressButton.setImage(kImage(name: "my_arrows_unfold"), for: UIControl.State.normal)
-        return goAddressButton
-    }()
-    
-    var userModel : UserModel? {
-        didSet {
-            avatarButton.kf.setImage(with: kURLImage(name: userModel?.avatarurl ?? ""), for: UIControl.State.normal, placeholder: kImage(name: "pic_preload"))
-            nickNameLabel.text = userModel?.username
-        }
-    }
-    
-
-}

+ 0 - 150
RainbowPlanet/RainbowPlanet/Modules/MineModule/Mine/View/MineView.swift

@@ -1,150 +0,0 @@
-//
-//  MineView.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2019/4/24.
-//  Copyright © 2019 南鑫林. All rights reserved.
-//
-
-import UIKit
-
-class MineView: BaseView {
-    
-
-    typealias ScrollViewDidScrollBlock = (_ offsetY:CGFloat,_ alpha:CGFloat) -> Void
-    var scrollViewDidScrollBlock : ScrollViewDidScrollBlock?
-    
-    typealias LookAllOrderButtonBlock = () -> Void
-    var lookAllOrderButtonBlock : LookAllOrderButtonBlock?
-    
-    typealias DidSelectItemAtClosure = (_ indexPath: IndexPath) -> Void
-    var didSelectItemAtClosure : DidSelectItemAtClosure?
-    
-    typealias AddressClosure = () -> Void
-    var addressClosure : AddressClosure?
-    
-    override func setupViews() {
-        addSubview(tableView)
-        if #available(iOS 11.0, *) {
-            tableView.contentInsetAdjustmentBehavior = .never
-        }
-    }
-    
-    override func setupLayouts() {
-        tableView.snp.makeConstraints { (make) in
-            make.edges.equalToSuperview()
-        }
-    }
-    
-    lazy var tableView: UITableView = {
-        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
-        tableView.backgroundColor = kf7f8faColor
-        tableView.delegate = self
-        tableView.dataSource = self
-        tableView.tableHeaderView = mineTableViewHeaderView
-        tableView.separatorStyle = .none
-        return tableView
-    }()
-    
-    private lazy var mineTableViewHeaderView: MineTableViewHeaderView = {
-        let mineTableViewHeaderView = MineTableViewHeaderView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: kNavBarTotalHeight + 46+78))
-        let userModel = UserModel.shared().getModel()
-        mineTableViewHeaderView.userModel = userModel
-        mineTableViewHeaderView.addressClosure = {
-            [weak self] in
-            if let addressClosure = self?.addressClosure {
-                addressClosure()
-            }
-        }
-        return mineTableViewHeaderView
-    }()
-    
-}
-
-extension MineView: UITableViewDelegate,UITableViewDataSource {
-    
-    func numberOfSections(in tableView: UITableView) -> Int {
-        return 2
-    }
-    
-    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
-        return 1
-    }
-    
-    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
-        switch indexPath.section {
-        case 0:
-            let cell = MineOrderTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
-            cell.lookAllOrderButtonBlock = {
-                [weak self] in
-                
-                if let lookAllOrderButtonBlock = self?.lookAllOrderButtonBlock {
-                    lookAllOrderButtonBlock()
-                }
-            }
-            cell.didSelectItemAtClosure = {
-                [weak self] indexPath in
-                if let didSelectItemAtClosure = self?.didSelectItemAtClosure {
-                    didSelectItemAtClosure(indexPath)
-                }
-            }
-
-            cell.frame = tableView.bounds
-            cell.layoutIfNeeded()
-            cell.reloadData()
-            return cell
-        case 1:
-            let cell = MineServiceTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
-            cell.frame = tableView.bounds
-            cell.layoutIfNeeded()
-            cell.reloadData()
-            return cell
-        default:
-            return UITableViewCell()
-        }
-       
-    }
-    
-    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
-        return  UITableView.automaticDimension
-    }
-    
-    func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
-        
-        switch indexPath.section {
-        case 0:
-            return  138
-        case 1:
-            return  188
-        default:
-            return 0
-        }
-    }
-    
-    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
-        return 10
-    }
-    
-    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
-        return 0.000001
-    }
-    
-    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
-        let view = UIView(frame: CGRect(x: 0, y: 0, width: kScaleWidth, height: 10))
-        view.backgroundColor = kf7f8faColor
-        return view
-    }
-    
-    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
-        return nil
-    }
-    
-    func scrollViewDidScroll(_ scrollView: UIScrollView) {
-        let offsetY = scrollView.contentOffset.y
-        let alpha = offsetY / kNavBarTotalHeight;
-        if let scrollViewDidScrollBlock = self.scrollViewDidScrollBlock {
-            scrollViewDidScrollBlock(offsetY,alpha)
-        }
-    }
-
-}

+ 0 - 95
RainbowPlanet/RainbowPlanet/Modules/MineModule/Mine/ViewController/MineViewController.swift

@@ -1,95 +0,0 @@
-//
-//  MineViewController.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2019/3/7.
-//  Copyright © 2019 南鑫林. All rights reserved.
-//
-
-import UIKit
-import RxSwift
-
-class MineViewController: BaseViewController {
-    
-    override func viewDidLoad() {
-        super.viewDidLoad()
-        setupViews()
-        setupLayouts()
-        setupData()
-        
-    }
-    
-    override func setupViews() {
-        navigationBar.title = "我的彩虹"
-        navigationBar.titleLabelColor = UIColor.white.withAlphaComponent(0)
-        navigationBar.wr_setBackgroundAlpha(alpha: 0)
-        navigationBar.barBackgroundColor = kFFAC33Color.withAlphaComponent(0)
-        statusBarStyle = .lightContent
-        view.addSubview(mineView)
-        view.insertSubview(navigationBar, aboveSubview: mineView.tableView)
-        navigationBar.addSubview(navigationBarView)
-    }
-    
-    override func setupLayouts() {
-        navigationBarView.snp.makeConstraints { (make) in
-            make.top.equalTo(kSafeStatusBarHeight)
-            make.bottom.left.right.equalToSuperview()
-        }
-        mineView.snp.makeConstraints { (make) in
-            make.edges.equalToSuperview()
-        }
-    }
-    
-    override func setupData() {
-        let operationQueue = OperationQueue.main
-        NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: "AccountSecurity"), object: nil, queue: operationQueue) {
-            [weak self] (notification) in
-            self?.mineView.tableView.reloadData()
-        }
-        navigationBarView.messageBlock = {
-            [weak self] in
-//            self?.navigationController?.pushViewController(MessageViewController(), animated: true)
-        }
-        navigationBarView.setBlock = {
-            [weak self] in
-            self?.navigationController?.pushViewController(SetViewController(), animated: true)
-        }
-        mineView.scrollViewDidScrollBlock = {
-            [weak self] (offsetY,alpha) in
-            self?.navigationBar.barBackgroundColor = kFFAC33Color.withAlphaComponent(alpha)
-            self?.navigationBar.wr_setBackgroundAlpha(alpha: alpha)
-            self?.navigationBar.titleLabelColor = UIColor.white.withAlphaComponent(alpha)
-        }
-        mineView.addressClosure = {
-            [weak self] in
-            let vc = AddressManagerViewController()            
-            self?.navigationController?.pushViewController(vc, animated: true)
-        }
-        mineView.lookAllOrderButtonBlock = {
-            [weak self] in
-            let vc = OrderViewController()
-            vc.orderVCType = .all
-            self?.navigationController?.pushViewController(vc, animated: true)
-        }
-        
-        mineView.didSelectItemAtClosure = {
-            [weak self] indexPath in
-            let vc = OrderViewController()
-            vc.orderVCType = OrderVCType(rawValue: indexPath.row)
-            self?.navigationController?.pushViewController(vc, animated: true)
-        }
-    }
-    
-    private lazy var navigationBarView: MineNavigationBarView = {
-        let navigationBarView = MineNavigationBarView()
-       
-        return navigationBarView
-    }()
-    
-    private lazy var mineView: MineView = {
-        let mineView = MineView()
-       
-        return mineView
-    }()
-    
-}

+ 71 - 5
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/PersonalCenterView/PersonViewUserAndOtherHeaderView.swift

@@ -8,6 +8,10 @@
 
 import UIKit
 
+/// 用户类型
+///
+/// - user: 自己
+/// - other: 其他类型
 enum PersonViewUserAndOtherHeaderViewType {
     case user
     case other
@@ -84,6 +88,7 @@ class PersonViewUserAndOtherHeaderView: BaseView {
         let bgImageView = UIImageView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 140 + kNavBarTotalHeight))
         bgImageView.image = kImage(name: "pic_preload")
         bgImageView.contentMode = .scaleAspectFill
+        bgImageView.layer.masksToBounds = true
         return bgImageView
     }()
     
@@ -172,10 +177,6 @@ class PersonViewUserAndOtherHeaderView: BaseView {
     lazy var followButton: UIButton = {
         let followButton = UIButton(type: UIButton.ButtonType.custom)
         followButton.setTitle("关注", for: UIControl.State.normal)
-        followButton.setImage(kImage(name: "center_attention_white"), for: UIControl.State.normal)
-        followButton.setImage(kImage(name: "center_followed_white"), for: UIControl.State.selected)
-        followButton.setBackgroundImage(UIImage.imageWithColor(color: kThemeColor), for:  UIControl.State.normal)
-        followButton.setBackgroundImage(UIImage.imageWithColor(color: UIColor.clear), for: UIControl.State.selected)
         followButton.titleLabel?.font = kMediumFont13
         followButton.alpha = 1
         followButton.cornerRadius = 12
@@ -183,7 +184,17 @@ class PersonViewUserAndOtherHeaderView: BaseView {
         followButton.isHidden = true
         followButton.rx.tap.subscribe(onNext: {
             [weak self] (data) in
-            followButton.isSelected = !followButton.isSelected
+            if self?.userDetailModel?.isFollowStatus == 0 {
+                self?.userFollow(followUid: self?.userDetailModel?.uid ?? 0, completion: { (isFollowStatus) in
+                    self?.userDetailModel?.isFollowStatus = isFollowStatus
+                    self?.followType = FollowType(rawValue: self?.userDetailModel?.isFollowStatus ?? 0)
+                })
+            }else {
+                self?.userCancelFollow(followUid: self?.userDetailModel?.uid ?? 0, completion: { (isFollowStatus) in
+                    self?.userDetailModel?.isFollowStatus = isFollowStatus
+                    self?.followType = FollowType(rawValue: self?.userDetailModel?.isFollowStatus ?? 0)
+                })
+            }
         }).disposed(by: disposeBag)
         return followButton
     }()
@@ -221,6 +232,7 @@ class PersonViewUserAndOtherHeaderView: BaseView {
     
     var userDetailModel: UserDetailModel? {
         didSet {
+            followType = FollowType(rawValue: userDetailModel?.isFollowStatus ?? 0)
             bgImageView.kf.setImage(with: kURLImage(name: userDetailModel?.backgroundImg ?? "pic_preload"), placeholder: kImage(name: "pic_preload"))
             titleLabel.text = userDetailModel?.username
             if userDetailModel?.signature == "" {
@@ -235,4 +247,58 @@ class PersonViewUserAndOtherHeaderView: BaseView {
         }
     }
     
+    var followType: FollowType! {
+        didSet {
+            switch followType {
+            case .futureFollow?:
+                followButton.setTitle("关注", for: UIControl.State.normal)
+                followButton.setTitleColor(kThemeColor, for: UIControl.State.normal)
+                followButton.setImage(kImage(name: "star_attention"), for: UIControl.State.normal)
+                followButton.layer.borderColor = kThemeColor.cgColor
+                followButton.setBackgroundImage(UIImage.imageWithColor(color: kffffffColor), for: UIControl.State.normal)
+                followButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 2)
+                
+                break
+            case .alreadyFollow?:
+                followButton.setTitle("关注", for: UIControl.State.normal)
+                followButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+                followButton.setImage(kImage(name: "star_followed"), for: UIControl.State.normal)
+                followButton.layer.borderColor = kf7f8faColor.cgColor
+                followButton.setBackgroundImage(UIImage.imageWithColor(color: kf7f8faColor), for: UIControl.State.normal)
+                followButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 2)
+                break
+            case .mutualFollow?:
+                followButton.setTitle("互相关注", for: UIControl.State.normal)
+                followButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+                followButton.setImage(nil, for: UIControl.State.normal)
+                followButton.layer.borderColor = kCCCCCCColor.cgColor
+                followButton.setBackgroundImage(UIImage.imageWithColor(color: kffffffColor), for: UIControl.State.normal)
+                followButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 0)
+                
+                break
+            default:
+                break
+            }
+        }
+    }
+    
+}
+extension PersonViewUserAndOtherHeaderView {
+    
+    /// 关注
+    func userFollow(followUid:Int,completion: @escaping (Int) -> Void) {
+        SwiftMoyaNetWorkServiceUser.shared().userFollowApi(followUid: followUid) {(followStatusModel) -> (Void) in
+            let followStatusModel = followStatusModel as? FollowStatusModel
+            completion(followStatusModel?.isFollowStatus ?? 0)
+        }
+    }
+    
+    /// 取消关注
+    func userCancelFollow(followUid:Int,completion: @escaping (Int) -> Void) {
+        SwiftMoyaNetWorkServiceUser.shared().userCancelFollowApi(followUid: followUid) {
+            (followStatusModel) -> (Void) in
+            let followStatusModel = followStatusModel as? FollowStatusModel
+            completion(followStatusModel?.isFollowStatus ?? 0)
+        }
+    }
 }

+ 2 - 0
RainbowPlanet/RainbowPlanet/Service/Model/UserModel/UserDetailModel.swift

@@ -42,6 +42,7 @@ class UserDetailModel : NSObject, Mappable{
 	var unionId : AnyObject?
 	var updatedAt : String?
 	var username : String?
+    var isFollowStatus : Int?
 
 
 	class func newInstance(map: Map) -> Mappable?{
@@ -86,6 +87,7 @@ class UserDetailModel : NSObject, Mappable{
 		unionId <- map["union_id"]
 		updatedAt <- map["updated_at"]
 		username <- map["username"]
+        isFollowStatus <- map["is_follow_status"]
 		
 	}
 }

+ 0 - 84
RainbowPlanet/RainbowPlanet/Tools/JXPagingView-Swift/JXPagingListRefreshView.swift

@@ -1,84 +0,0 @@
-//
-//  JXPagingListRefreshView.swift
-//  JXPagingView
-//
-//  Created by jiaxin on 2018/8/28.
-//  Copyright © 2018年 jiaxin. All rights reserved.
-//
-
-import UIKit
-
-open class JXPagingListRefreshView: JXPagingView {
-    fileprivate var lastScrollingListViewContentOffsetY: CGFloat = 0
-
-    override open func initializeViews() {
-        super.initializeViews()
-
-        mainTableView.bounces = false
-    }
-
-    override open func preferredProcessMainTableViewDidScroll(_ scrollView: UIScrollView) {
-        if pinSectionHeaderVerticalOffset != 0 {
-            if scrollView.contentOffset.y == 0 {
-                mainTableView.bounces = false
-            }else {
-                mainTableView.bounces = true
-            }
-        }
-        if (self.currentScrollingListView != nil && self.currentScrollingListView!.contentOffset.y > 0) {
-            //mainTableView的header已经滚动不见,开始滚动某一个listView,那么固定mainTableView的contentOffset,让其不动
-            self.mainTableView.contentOffset = CGPoint(x: 0, y: getMainTableViewMaxContentOffsetY())
-        }
-
-        if (mainTableView.contentOffset.y < getMainTableViewMaxContentOffsetY()) {
-            //mainTableView已经显示了header,listView的contentOffset需要重置
-            for list in self.validListDict.values {
-                //正在下拉刷新时,不需要重置
-                if list.listScrollView().contentOffset.y > 0 {
-                    list.listScrollView().contentOffset = CGPoint.zero
-                }
-            }
-        }
-
-        if scrollView.contentOffset.y > getMainTableViewMaxContentOffsetY() && self.currentScrollingListView?.contentOffset.y == 0 {
-            //当往上滚动mainTableView的headerView时,滚动到底时,修复listView往上小幅度滚动
-            self.mainTableView.contentOffset = CGPoint(x: 0, y: getMainTableViewMaxContentOffsetY())
-        }
-    }
-    
-    override open func preferredProcessListViewDidScroll(scrollView: UIScrollView) {
-        var shouldProcess = true
-        if currentScrollingListView!.contentOffset.y > self.lastScrollingListViewContentOffsetY {
-            //往上滚动
-        }else {
-            //往下滚动
-            if self.mainTableView.contentOffset.y == 0 {
-                shouldProcess = false
-            }else {
-                if (self.mainTableView.contentOffset.y < getMainTableViewMaxContentOffsetY()) {
-                    //mainTableView的header还没有消失,让listScrollView一直为0
-                    currentScrollingListView!.contentOffset = CGPoint.zero;
-                    currentScrollingListView!.showsVerticalScrollIndicator = false;
-                }
-            }
-        }
-        if shouldProcess {
-            if (self.mainTableView.contentOffset.y < getMainTableViewMaxContentOffsetY()) {
-                //处于下拉刷新的状态,scrollView.contentOffset.y为负数,就重置为0
-                if currentScrollingListView!.contentOffset.y > 0 {
-                    //mainTableView的header还没有消失,让listScrollView一直为0
-                    currentScrollingListView!.contentOffset = CGPoint.zero;
-                    currentScrollingListView!.showsVerticalScrollIndicator = false;
-                }else {
-                    
-                }
-            } else {
-                //mainTableView的header刚好消失,固定mainTableView的位置,显示listScrollView的滚动条
-                self.mainTableView.contentOffset = CGPoint(x: 0, y: getMainTableViewMaxContentOffsetY());
-                currentScrollingListView!.showsVerticalScrollIndicator = true;
-            }
-        }
-        self.lastScrollingListViewContentOffsetY = currentScrollingListView!.contentOffset.y;
-    }
-
-}