浏览代码

个人首页调整

南鑫林 5 年之前
父节点
当前提交
dc409cf3d4

+ 7 - 3
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -158,6 +158,7 @@
 		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 */; };
 		A75414FD224B5F28002480B5 /* MobileLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A75414FB224B5F28002480B5 /* MobileLoginViewController.swift */; };
 		A7541502224C5ECB002480B5 /* BaiduMapManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7541501224C5ECA002480B5 /* BaiduMapManager.swift */; };
 		A754150F224CACF9002480B5 /* SwiftSign.swift in Sources */ = {isa = PBXBuildFile; fileRef = A754150B224CACF9002480B5 /* SwiftSign.swift */; };
@@ -678,6 +679,7 @@
 		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>"; };
 		A75414FB224B5F28002480B5 /* MobileLoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MobileLoginViewController.swift; sourceTree = "<group>"; };
 		A7541501224C5ECA002480B5 /* BaiduMapManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaiduMapManager.swift; sourceTree = "<group>"; };
 		A754150B224CACF9002480B5 /* SwiftSign.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftSign.swift; sourceTree = "<group>"; };
@@ -1804,6 +1806,7 @@
 				A72A72CA22321E2600B21995 /* Common.swift */,
 				A72A72CD22321E2600B21995 /* ColorMacro.swift */,
 				A72A72C822321E2500B21995 /* FontMacro.swift */,
+				A743229322B88ED30017C367 /* EnumMacro.swift */,
 				A72A72C922321E2600B21995 /* HTMLURLMacro.swift */,
 				A72A72C722321E2500B21995 /* NotificationCenterMacro.swift */,
 				A72A726022321D3400B21995 /* RainbowPlanet-Bridging-Header.h */,
@@ -3232,7 +3235,7 @@
 			isa = PBXGroup;
 			children = (
 				A7D07CD022B7849400186014 /* UserPersonalCenterHeaderView */,
-				A7D07CCB22B77CF500186014 /* Order */,
+				A7D07CCB22B77CF500186014 /* OrderView */,
 				A7D07CCA22B77CEC00186014 /* RainbowBeanPhysical */,
 			);
 			path = View;
@@ -3247,13 +3250,13 @@
 			path = RainbowBeanPhysical;
 			sourceTree = "<group>";
 		};
-		A7D07CCB22B77CF500186014 /* Order */ = {
+		A7D07CCB22B77CF500186014 /* OrderView */ = {
 			isa = PBXGroup;
 			children = (
 				A7D07CCC22B77D2E00186014 /* UserPersonalCenterOrderView.swift */,
 				A7D07CCE22B77E0200186014 /* UserPersonalCenterOrderCollectionViewCell.swift */,
 			);
-			path = Order;
+			path = OrderView;
 			sourceTree = "<group>";
 		};
 		A7D07CD022B7849400186014 /* UserPersonalCenterHeaderView */ = {
@@ -4671,6 +4674,7 @@
 				A7284A542252FB5C000BAEC4 /* PaginationModel.swift in Sources */,
 				A72A72D022321E2700B21995 /* FontMacro.swift in Sources */,
 				BD2FCBE622B2586C0006D974 /* CommunityTagCollectionCell.swift in Sources */,
+				A743229422B88ED30017C367 /* EnumMacro.swift in Sources */,
 				BD1DC6C9228D005000B89C57 /* OrderCreateParameterModel.swift in Sources */,
 				A7BF203422B47E8600396DB3 /* CardContentActionTableViewCell.swift in Sources */,
 				BD12B68C22B4F4FF00AEB10B /* KSSegmentedControl.m in Sources */,

+ 18 - 0
RainbowPlanet/RainbowPlanet/Macro/EnumMacro.swift

@@ -0,0 +1,18 @@
+//
+//  EnumMacro.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/18.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import Foundation
+
+/// 跳转方式
+///
+/// - none: 默认
+/// - push: push
+enum JumpModeType {
+    case none
+    case push
+}

+ 1 - 0
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/OtherPersonalCenter/ViewController/OtherPersonalCenterViewController.swift

@@ -212,6 +212,7 @@ extension OtherPersonalCenterViewController: JXPagingViewDelegate {
     
     func pagingView(_ pagingView: JXPagingView, initListAtIndex index: Int) -> JXPagingViewListViewDelegate {
         let list = PersonViewUserAndOtherListView()
+        list.jumpModeType = .push
         return list
     }
     

+ 6 - 6
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/PersonalCenterView/PersonViewUserAndOtherHeaderView.swift

@@ -147,7 +147,7 @@ class PersonViewUserAndOtherHeaderView: BaseView {
         return editButton
     }()
     
-    private lazy var followButton: UIButton = {
+    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)
@@ -158,11 +158,11 @@ class PersonViewUserAndOtherHeaderView: BaseView {
         followButton.alpha = 0
         followButton.cornerRadius = 12
         followButton.masksToBounds = true
-        followButton.isHidden = true
-        followButton.rx.tap.subscribe(onNext: {
-            [weak self] (data) in
-            followButton.isSelected = !followButton.isSelected
-        }).disposed(by: disposeBag)
+//        followButton.isHidden = true
+//        followButton.rx.tap.subscribe(onNext: {
+//            [weak self] (data) in
+//            followButton.isSelected = !followButton.isSelected
+//        }).disposed(by: disposeBag)
         return followButton
     }()
     

+ 18 - 0
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/PersonalCenterView/PersonViewUserAndOtherListCollectionViewCell.swift

@@ -38,6 +38,7 @@ class PersonViewUserAndOtherListCollectionViewCell: UICollectionViewCell {
         cornerRadius = 2
         masksToBounds = true
         addSubview(iconImageView)
+        addSubview(layerView)
         addSubview(rainbowBeanImageView)
         addSubview(rainbowBeanNumberLabel)
         addSubview(videoImageView)
@@ -69,6 +70,21 @@ class PersonViewUserAndOtherListCollectionViewCell: UICollectionViewCell {
         return iconImageView
     }()
     
+    lazy var layerView: UIView = {
+        let layerView = UIView()
+        layerView.frame = CGRect(x: 0, y: (kScreenWidth-4)/3-50*kScaleWidth, width: (kScreenWidth-4)/3, height: 50*kScaleWidth)
+        let bgGradient = CAGradientLayer()
+        bgGradient.colors = [UIColor(red: 0.29, green: 0.29, blue: 0.29, alpha: 0).cgColor, UIColor(red: 0.25, green: 0.25, blue: 0.25, alpha: 0.09).cgColor, UIColor(red: 0.23, green: 0.23, blue: 0.23, alpha: 0.44).cgColor, UIColor(red: 0.2, green: 0.2, blue: 0.2, alpha: 0.65).cgColor]
+        bgGradient.locations = [0, 0.2370000034570694, 0.5899999737739563, 1]
+        bgGradient.frame = layerView.bounds
+        bgGradient.startPoint = CGPoint(x: 0.49, y: -0.02)
+        bgGradient.endPoint = CGPoint(x: 0.5, y: 1)
+        layerView.layer.addSublayer(bgGradient)
+        layerView.layer.cornerRadius = 2;
+        layerView.alpha = 1
+        return layerView
+    }()
+    
     private lazy var rainbowBeanImageView: UIImageView = {
         let rainbowBeanImageView = UIImageView()
         rainbowBeanImageView.image = kImage(name: "center_peas")
@@ -90,4 +106,6 @@ class PersonViewUserAndOtherListCollectionViewCell: UICollectionViewCell {
     }()
     
     
+    
+    
 }

+ 15 - 7
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/PersonalCenterView/PersonViewUserAndOtherListView.swift

@@ -14,19 +14,27 @@ class PersonViewUserAndOtherListView: BaseView {
     deinit {
         listViewDidScrollCallback = nil
     }
+    
+    var jumpModeType : JumpModeType? = JumpModeType.none
+    
     override func setupViews() {
         addSubview(collectionView)
     }
     
     override func setupLayouts() {
         collectionView.snp_makeConstraints { (make) in
-            make.edges.equalToSuperview()
+            make.top.right.left.equalToSuperview()
+            if jumpModeType == JumpModeType.none {
+                make.bottom.equalTo(-kTabBarTotalHeight)
+            }else {
+                make.bottom.equalToSuperview()
+            }
         }
     }
     
     private lazy var collectionView: UICollectionView = {
         let collectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)
-        collectionView.backgroundColor = kffffffColor
+        collectionView.backgroundColor = kf7f8faColor
         collectionView.delegate = self;
         collectionView.dataSource = self;
         collectionView.showsVerticalScrollIndicator = false
@@ -36,8 +44,8 @@ class PersonViewUserAndOtherListView: BaseView {
     
     private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
         let collectionViewLayout = UICollectionViewFlowLayout.init()
-        collectionViewLayout.minimumLineSpacing = 0
-        collectionViewLayout.minimumInteritemSpacing = 0
+        collectionViewLayout.minimumLineSpacing = 1
+        collectionViewLayout.minimumInteritemSpacing = 1
         return collectionViewLayout
     }()
     
@@ -49,7 +57,7 @@ extension PersonViewUserAndOtherListView: UICollectionViewDelegateFlowLayout,UIC
     }
     
     func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
-        return 12
+        return 30
     }
     
     func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
@@ -63,11 +71,11 @@ extension PersonViewUserAndOtherListView: UICollectionViewDelegateFlowLayout,UIC
     }
     
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
-        return CGSize(width:kScreenWidth/3, height:kScreenWidth/3)
+        return CGSize(width:(kScreenWidth-4)/3, height:(kScreenWidth-4)/3)
     }
     
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
-        return UIEdgeInsets(top:0, left: 0, bottom: 10, right: 0)
+        return UIEdgeInsets(top:1, left: 1, bottom: 10, right: 1)
     }
     
     public func scrollViewDidScroll(_ scrollView: UIScrollView) {

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/UserPersonalCenter/View/Order/UserPersonalCenterOrderCollectionViewCell.swift

@@ -39,7 +39,7 @@ class UserPersonalCenterOrderCollectionViewCell: UICollectionViewCell {
     
     //MARK: - 设置view
     private func setupViews() {
-        backgroundColor = kffffffColor
+//        backgroundColor = UIColor.white
         addSubview(iconImageView)
         addSubview(titleLabel)
     }

+ 14 - 15
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/UserPersonalCenter/View/Order/UserPersonalCenterOrderView.swift

@@ -11,31 +11,30 @@ import UIKit
 class UserPersonalCenterOrderView: BaseView {
 
     override func setupViews() {
-        backgroundColor = kFEFEFEColor
+        layer.shadowColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.04).cgColor
+        layer.shadowOffset = CGSize(width: 0, height: 0.5)
+        layer.shadowOpacity = 1
+        layer.shadowRadius = 9
+        //         strokeCode
+        layer.borderColor = UIColor(red: 0.98, green: 0.98, blue: 0.98, alpha: 1).cgColor
+        layer.borderWidth = 0.5
+        //         fill
+        backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1)
+        layer.cornerRadius = 4;
+        alpha = 1
         addSubview(collectionView)
     }
     
     override func setupLayouts() {
-        collectionView.snp_makeConstraints { (make) in
-            make.top.left.right.equalToSuperview()
-            make.height.equalTo(90)
-        }
     }
     
     private lazy var collectionView: UICollectionView = {
-        let collectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)
-        collectionView.backgroundColor = kFEFEFEColor
+        let collectionView = UICollectionView.init(frame: CGRect(x: 0, y: 0, width: kScreenWidth-28, height: 90), collectionViewLayout: collectionViewLayout)
         collectionView.delegate = self;
         collectionView.dataSource = self;
         collectionView.showsVerticalScrollIndicator = false
         collectionView.showsHorizontalScrollIndicator = false
-//        // shadowCode
-//        collectionView.layer.shadowColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.04).cgColor
-//        collectionView.layer.shadowOffset = CGSize(width: 0, height: 0.5)
-//        collectionView.layer.shadowOpacity = 1
-//        collectionView.layer.shadowRadius = 9
-        // fill
-        collectionView.layer.cornerRadius = 4
+        collectionView.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1)
         return collectionView
     }()
     
@@ -73,7 +72,7 @@ extension UserPersonalCenterOrderView: UICollectionViewDelegateFlowLayout,UIColl
     }
     
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
-        return UIEdgeInsets(top:0, left: 14, bottom: 0, right: 14)
+        return UIEdgeInsets(top:0, left: 0, bottom: 0, right: 0)
     }
     
 }

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/UserPersonalCenter/View/RainbowBeanPhysical/RainbowBeanPhysicalView.swift

@@ -22,7 +22,7 @@ class RainbowBeanPhysicalView: BaseView {
     
     private lazy var collectionView: UICollectionView = {
         let collectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)
-        collectionView.backgroundColor = kFEFEFEColor
+        collectionView.backgroundColor = kffffffColor
         collectionView.delegate = self;
         collectionView.dataSource = self;
         collectionView.showsVerticalScrollIndicator = false

+ 4 - 3
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/UserPersonalCenter/View/UserPersonalCenterHeaderView/UserPersonalCenterHeaderView.swift

@@ -11,7 +11,7 @@ import UIKit
 class UserPersonalCenterHeaderView: BaseView {
 
     override func setupViews() {
-        self.backgroundColor = kFEFEFEColor
+        self.backgroundColor = kffffffColor
         addSubview(personViewUserAndOtherHeaderView)
         addSubview(rainbowBeanPhysicalView)
         addSubview(userPersonalCenterOrderView)
@@ -29,8 +29,9 @@ class UserPersonalCenterHeaderView: BaseView {
         }
         userPersonalCenterOrderView.snp.makeConstraints { (make) in
             make.top.equalTo(rainbowBeanPhysicalView.snp_bottom)
-            make.left.right.equalToSuperview()
-            make.height.equalTo(104)
+            make.left.equalTo(14)
+            make.right.equalTo(-14)
+            make.height.equalTo(90)
         }
         
     }

+ 3 - 7
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/UserPersonalCenter/ViewController/UserPersonalCenterViewController.swift

@@ -10,10 +10,6 @@ import UIKit
 import JXSegmentedView
 import RxSwift
 
-enum UserPersonalCenterVCPushType {
-    case none
-    case push
-}
 
 class UserPersonalCenterViewController: BaseViewController {
     
@@ -21,7 +17,7 @@ class UserPersonalCenterViewController: BaseViewController {
     let JXheightForHeaderInSection: Int = 44
     var cmsTemplateTitles = ["发布 0", "收藏 0", "分享 0"]
     var userPersonalCenterVCType : Int = 0
-    var userPersonalCenterVCPushType : UserPersonalCenterVCPushType = UserPersonalCenterVCPushType.none
+     var jumpModeType : JumpModeType? = JumpModeType.none
     
     override func viewDidLoad() {
         super.viewDidLoad()
@@ -34,7 +30,6 @@ class UserPersonalCenterViewController: BaseViewController {
         userHeaderContainerView.addSubview(userHeaderView)
         view.addSubview(segmentedView)
         view.addSubview(pagingView)
-//        view.insertSubview(navigationBar, aboveSubview: segmentedView)
         view.insertSubview(navigationBar, aboveSubview: pagingView)
         setnavigationBar()
     }
@@ -63,7 +58,7 @@ class UserPersonalCenterViewController: BaseViewController {
             make.edges.equalToSuperview()
         }
         avatarButton.snp.makeConstraints { (make) in
-            if userPersonalCenterVCPushType == .none {
+            if jumpModeType == JumpModeType.none {
                 make.left.equalTo(14)
             }else {
                 make.left.equalTo(navigationBar.snp_right).offset(8)
@@ -234,6 +229,7 @@ extension UserPersonalCenterViewController: JXPagingViewDelegate {
     
     func pagingView(_ pagingView: JXPagingView, initListAtIndex index: Int) -> JXPagingViewListViewDelegate {
         let list = PersonViewUserAndOtherListView()
+        list.jumpModeType = jumpModeType
         return list
     }