Przeglądaj źródła

修改资料完成

南鑫林 5 lat temu
rodzic
commit
c660c51290
15 zmienionych plików z 615 dodań i 9 usunięć
  1. 50 0
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 3 1
      RainbowPlanet/RainbowPlanet/Macro/ColorMacro.swift
  3. 2 0
      RainbowPlanet/RainbowPlanet/Macro/RainbowPlanet-Bridging-Header.h
  4. 0 2
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Cell/CardContent/PicVideo/CardContentPicVideoModel.swift
  5. 1 1
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Cell/CardContent/User/CardContentUserTableViewCell.swift
  6. 1 1
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Cell/FollowStatus/CommunityFollowStatusTableViewCell.swift
  7. 1 1
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Cell/RecommendFollow/CommunityRecommendFollowCollectionViewCell.swift
  8. 54 0
      RainbowPlanet/RainbowPlanet/Modules/MineModule/ModifyData/View/ModifyDataAvatarView.swift
  9. 172 0
      RainbowPlanet/RainbowPlanet/Modules/MineModule/ModifyData/View/ModifyDataNickNameSignView.swift
  10. 44 0
      RainbowPlanet/RainbowPlanet/Modules/MineModule/ModifyData/ViewController/ModifyDataViewController.swift
  11. 1 1
      RainbowPlanet/RainbowPlanet/Modules/MineModule/MyFollowAndFan/View/MyFollowAndFanTableViewCell.swift
  12. 5 0
      RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/PersonalCenterView/PersonViewUserAndOtherHeaderView.swift
  13. 2 2
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingCart/View/ShoppingCartHotSale/ShoppingCartHotSaleTableViewCell.swift
  14. 66 0
      RainbowPlanet/RainbowPlanet/Tools/TextLimitTool/TextLimitTool.h
  15. 213 0
      RainbowPlanet/RainbowPlanet/Tools/TextLimitTool/TextLimitTool.m

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

@@ -217,6 +217,10 @@
 		A7824B082271F53A00ABA381 /* EditSetDefaultTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7824B072271F53A00ABA381 /* EditSetDefaultTableViewCell.swift */; };
 		A79057022276C9770037F823 /* SetPasswordModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A79057012276C9770037F823 /* SetPasswordModel.swift */; };
 		A79057062276EA3D0037F823 /* OpenCityListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A79057052276EA3D0037F823 /* OpenCityListModel.swift */; };
+		A790705B22B9B680008CE279 /* ModifyDataViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A790705A22B9B680008CE279 /* ModifyDataViewController.swift */; };
+		A790705D22B9B723008CE279 /* ModifyDataAvatarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A790705C22B9B723008CE279 /* ModifyDataAvatarView.swift */; };
+		A790706122B9C294008CE279 /* ModifyDataNickNameSignView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A790706022B9C294008CE279 /* ModifyDataNickNameSignView.swift */; };
+		A790706522B9DFAD008CE279 /* TextLimitTool.m in Sources */ = {isa = PBXBuildFile; fileRef = A790706422B9DFAD008CE279 /* TextLimitTool.m */; };
 		A7931DEF22AF4C9100297D0A /* BaseBasicContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7931DEC22AF4C9100297D0A /* BaseBasicContentView.swift */; };
 		A7931DF022AF4C9100297D0A /* BaseBouncesContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7931DED22AF4C9100297D0A /* BaseBouncesContentView.swift */; };
 		A7931DF122AF4C9100297D0A /* BaseIrregularityBasicContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7931DEE22AF4C9100297D0A /* BaseIrregularityBasicContentView.swift */; };
@@ -751,6 +755,11 @@
 		A7824B072271F53A00ABA381 /* EditSetDefaultTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditSetDefaultTableViewCell.swift; sourceTree = "<group>"; };
 		A79057012276C9770037F823 /* SetPasswordModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SetPasswordModel.swift; sourceTree = "<group>"; };
 		A79057052276EA3D0037F823 /* OpenCityListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenCityListModel.swift; sourceTree = "<group>"; };
+		A790705A22B9B680008CE279 /* ModifyDataViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModifyDataViewController.swift; sourceTree = "<group>"; };
+		A790705C22B9B723008CE279 /* ModifyDataAvatarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModifyDataAvatarView.swift; sourceTree = "<group>"; };
+		A790706022B9C294008CE279 /* ModifyDataNickNameSignView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModifyDataNickNameSignView.swift; sourceTree = "<group>"; };
+		A790706322B9DFAD008CE279 /* TextLimitTool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TextLimitTool.h; sourceTree = "<group>"; };
+		A790706422B9DFAD008CE279 /* TextLimitTool.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TextLimitTool.m; sourceTree = "<group>"; };
 		A7931DEC22AF4C9100297D0A /* BaseBasicContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseBasicContentView.swift; sourceTree = "<group>"; };
 		A7931DED22AF4C9100297D0A /* BaseBouncesContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseBouncesContentView.swift; sourceTree = "<group>"; };
 		A7931DEE22AF4C9100297D0A /* BaseIrregularityBasicContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseIrregularityBasicContentView.swift; sourceTree = "<group>"; };
@@ -2479,6 +2488,7 @@
 		A77F2CA92232010F001BD3F6 /* MineModule */ = {
 			isa = PBXGroup;
 			children = (
+				A790705922B9B663008CE279 /* ModifyData */,
 				A7D07CB822B73E5500186014 /* PersonalCenter */,
 				A743229C22B8D13B0017C367 /* MyFollowAndFan */,
 				A77F2CAA2232010F001BD3F6 /* Mine */,
@@ -2562,6 +2572,7 @@
 		A77F2CBC2232022A001BD3F6 /* Tools */ = {
 			isa = PBXGroup;
 			children = (
+				A790706222B9DF81008CE279 /* TextLimitTool */,
 				A743229922B8C1440017C367 /* AppStoreReview */,
 				BD1FC19022B1075E00D55081 /* CommentKeyboard */,
 				A7931DF422AF827600297D0A /* ESTabBarController-swift */,
@@ -2649,6 +2660,41 @@
 			path = SwiftMoyaServiceManger;
 			sourceTree = "<group>";
 		};
+		A790705922B9B663008CE279 /* ModifyData */ = {
+			isa = PBXGroup;
+			children = (
+				A790705F22B9C26B008CE279 /* View */,
+				A790705E22B9C25F008CE279 /* ViewController */,
+			);
+			path = ModifyData;
+			sourceTree = "<group>";
+		};
+		A790705E22B9C25F008CE279 /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				A790705A22B9B680008CE279 /* ModifyDataViewController.swift */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		A790705F22B9C26B008CE279 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				A790705C22B9B723008CE279 /* ModifyDataAvatarView.swift */,
+				A790706022B9C294008CE279 /* ModifyDataNickNameSignView.swift */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		A790706222B9DF81008CE279 /* TextLimitTool */ = {
+			isa = PBXGroup;
+			children = (
+				A790706322B9DFAD008CE279 /* TextLimitTool.h */,
+				A790706422B9DFAD008CE279 /* TextLimitTool.m */,
+			);
+			path = TextLimitTool;
+			sourceTree = "<group>";
+		};
 		A7931DF422AF827600297D0A /* ESTabBarController-swift */ = {
 			isa = PBXGroup;
 			children = (
@@ -4420,6 +4466,7 @@
 				A71AF0AE226EF0A3001730FE /* SearchHeaderCollectionReusableView.swift in Sources */,
 				A7636AC52268139C00374F9E /* LocationViewController.swift in Sources */,
 				A7D46090227617D200A5A54E /* SQLModel.swift in Sources */,
+				A790706522B9DFAD008CE279 /* TextLimitTool.m in Sources */,
 				A72C01222275404A0065E0C3 /* ProvinceCityAreaModel.swift in Sources */,
 				A7FF1579228C82CE00A85748 /* OrderDetailViewController.swift in Sources */,
 				A7FF159C228D9E3D00A85748 /* OrderRefundDetailModel.swift in Sources */,
@@ -4446,6 +4493,7 @@
 				BD7AB83622841A8B0030646A /* ShoppingCartPayOrderItemCell.swift in Sources */,
 				A71AA519227219D7008FF1A5 /* EditExpressAddressViewController.swift in Sources */,
 				A7FF1568228C6E2300A85748 /* OrderDeliveryModeAndTimeTableViewCell.swift in Sources */,
+				A790705B22B9B680008CE279 /* ModifyDataViewController.swift in Sources */,
 				A71738A822897E96000AEA6A /* SwiftMoyaNetWorkServiceShop.swift in Sources */,
 				BD20F1CD2283C51300677D8E /* OrderFinishPayController.swift in Sources */,
 				A729B5B022671310004AE098 /* MobileLoginView.swift in Sources */,
@@ -4515,6 +4563,7 @@
 				A7274C5B228EE636000E3A07 /* LBXScanViewController.swift in Sources */,
 				A7FF1566228C6DF200A85748 /* OrderShopAndStatusTableViewCell.swift in Sources */,
 				A7A98E332280272A005306E9 /* ShoppingMallBannerTableViewCell.swift in Sources */,
+				A790706122B9C294008CE279 /* ModifyDataNickNameSignView.swift in Sources */,
 				BD12204622AF997E0051C7C2 /* MessageCommentTableCell.swift in Sources */,
 				BDF862AA228E43A4000DEF84 /* OrderCommentTableViewCell.swift in Sources */,
 				A7B4E754228278320012914A /* ShoppingMallFloorTableViewCell.swift in Sources */,
@@ -4622,6 +4671,7 @@
 				A7B4E75A228289BB0012914A /* ProductFloorCenterHeaderCollectionReusableView.swift in Sources */,
 				A71901752275F71F00104A50 /* BaiduToCityModel.swift in Sources */,
 				BD12203F22AF8E190051C7C2 /* MessagePlanetNotiController.swift in Sources */,
+				A790705D22B9B723008CE279 /* ModifyDataAvatarView.swift in Sources */,
 				A7BB685922696B9200AB07A2 /* SelfRecommendationCollectionViewCell.swift in Sources */,
 				BD12B69A22B4FA8400AEB10B /* KSMediaPickerSelectIndicator.swift in Sources */,
 				A7636AC822682BAF00374F9E /* LocationView.swift in Sources */,

+ 3 - 1
RainbowPlanet/RainbowPlanet/Macro/ColorMacro.swift

@@ -110,6 +110,8 @@ let kfe352bColor = UIColor(hexString: "fe352b")
 
 let kbbbbbbColor = UIColor(hexString: "bbbbbb")
 
+let kB4B4B4Color = UIColor(hexString: "B4B4B4")
+
 let kFFAC33Color = UIColor(hexString: "FFAC33")
 
 let kEDEEF0Color = UIColor(hexString: "EDEEF0")
@@ -124,7 +126,7 @@ let kD2D3D5Color = UIColor(hexString: "D2D3D5")
 
 let kfee5e4Color = UIColor(hexString: "fee5e4")
 
-let kccccccColor = UIColor(hexString: "cccccc")
+let kCCCCCCColor = UIColor(hexString: "CCCCCC")
 
 let kfafafaColor = UIColor(hexString: "fafafa")
 

+ 2 - 0
RainbowPlanet/RainbowPlanet/Macro/RainbowPlanet-Bridging-Header.h

@@ -18,6 +18,8 @@
 
 #import "UIScrollView+MJRefreshEX.h"
 
+#import "TextLimitTool.h"
+
 //空白页面占位图
 #import <LYEmptyView/LYEmptyViewHeader.h>
 

+ 0 - 2
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Cell/CardContent/PicVideo/CardContentPicVideoModel.swift

@@ -30,10 +30,8 @@ class CardContentPicVideoModel: NSObject {
                     return 232 * kScaleWidth
                 }else{
                      if width / height > 2 {
-                        NXLLog(((347 * height) / width) * kScaleWidth)
                         return ((347 * height) / width) * kScaleWidth
                      }else {
-                        NXLLog(((232 * height) / width) * kScaleWidth)
                         return ((232 * height) / width) * kScaleWidth
                     }
                 }

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Cell/CardContent/User/CardContentUserTableViewCell.swift

@@ -159,7 +159,7 @@ class CardContentUserTableViewCell: UITableViewCell {
                 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.layer.borderColor = kCCCCCCColor.cgColor
                 followButton.setBackgroundImage(UIImage.imageWithColor(color: kffffffColor), for: UIControl.State.normal)
                 followButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 0)
                 

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Cell/FollowStatus/CommunityFollowStatusTableViewCell.swift

@@ -405,7 +405,7 @@ class CommunityFollowStatusTableViewCell: UITableViewCell {
                 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.layer.borderColor = kCCCCCCColor.cgColor
                 followButton.setBackgroundImage(UIImage.imageWithColor(color: kffffffColor), for: UIControl.State.normal)
                 followButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 0)
                 

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Cell/RecommendFollow/CommunityRecommendFollowCollectionViewCell.swift

@@ -151,7 +151,7 @@ class CommunityRecommendFollowCollectionViewCell: UICollectionViewCell {
                 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.layer.borderColor = kCCCCCCColor.cgColor
                 followButton.setBackgroundImage(UIImage.imageWithColor(color: kffffffColor), for: UIControl.State.normal)
                 followButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 0)
                 

+ 54 - 0
RainbowPlanet/RainbowPlanet/Modules/MineModule/ModifyData/View/ModifyDataAvatarView.swift

@@ -0,0 +1,54 @@
+//
+//  ModifyDataAvatarView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/19.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class ModifyDataAvatarView: BaseView {
+
+
+    override func setupViews() {
+        backgroundColor = .white
+        addSubview(avatarButton)
+        addSubview(editButton)
+    }
+    
+    override func setupLayouts() {
+        avatarButton.snp_makeConstraints { (make) in
+            make.top.equalTo(20)
+            make.centerX.equalToSuperview()
+            make.size.equalTo(80)
+        }
+        editButton.snp_makeConstraints { (make) in
+            make.top.equalTo(avatarButton.snp_bottom).offset(4)
+            make.width.equalTo(64)
+            make.height.equalTo(24)
+            make.centerX.equalToSuperview()
+        }
+    }
+    
+    private lazy var avatarButton: UIButton = {
+        let avatarButton = UIButton(type: UIButton.ButtonType.custom)
+        avatarButton.setBackgroundImage(kImage(name: "defaul_tavatar"), for: UIControl.State.normal)
+        avatarButton.cornerRadius = 40
+        avatarButton.masksToBounds = true
+        return avatarButton
+    }()
+    
+    private lazy var editButton : UIButton = {
+        let editButton = UIButton(type: UIButton.ButtonType.custom)
+        editButton.setTitle("更换头像", for: UIControl.State.normal)
+        editButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+        editButton.layer.borderColor = kB4B4B4Color.cgColor
+        editButton.layer.borderWidth = 1
+        editButton.titleLabel?.font = kRegularFont12
+        editButton.cornerRadius = 12
+        editButton.masksToBounds = true
+        return editButton
+    }()
+
+}

+ 172 - 0
RainbowPlanet/RainbowPlanet/Modules/MineModule/ModifyData/View/ModifyDataNickNameSignView.swift

@@ -0,0 +1,172 @@
+//
+//  ModifyDataNickNameSignView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/19.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import IQKeyboardManagerSwift
+class ModifyDataNickNameSignView: BaseView {
+    
+    var nickNameTextViewSize : CGSize?
+    var signNameTextViewSize : CGSize?
+        
+    override func setupViews() {
+        backgroundColor = .white
+        addSubview(nickBgView)
+        nickBgView.addSubview(nickNameLabel)
+        nickBgView.addSubview(nickNameTextView)
+        addSubview(signBgView)
+        addSubview(lineLabel)
+        signBgView.addSubview(signNameLabel)
+        signBgView.addSubview(signNameTextView)
+    }
+    
+    override func setupLayouts() {
+        nickBgView.snp_makeConstraints { (make) in
+            make.left.right.top.equalToSuperview()
+            make.height.equalTo(56)
+        }
+        nickNameLabel.snp_makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(14)
+            make.width.equalTo(32)
+            make.height.equalTo(23)
+        }
+        nickNameTextView.snp_makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(nickNameLabel.snp_right).offset(16)
+            make.right.equalTo(-14)
+            make.height.equalTo(23)
+        }
+        lineLabel.snp_makeConstraints { (make) in
+            make.top.equalTo(nickBgView.snp.bottom)
+            make.left.equalTo(nickNameLabel)
+            make.right.equalToSuperview()
+            make.height.equalTo(1)
+        }
+        signBgView.snp_makeConstraints { (make) in
+            make.top.equalTo(lineLabel.snp_bottom)
+            make.left.right.equalTo(nickBgView)
+            make.height.equalTo(56)
+        }
+       signNameLabel.snp_makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(14)
+            make.width.equalTo(32)
+            make.height.equalTo(23)
+        }
+        signNameTextView.snp_makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(signNameLabel.snp_right).offset(16)
+            make.right.equalTo(-14)
+            make.height.equalTo(23)
+        }
+    }
+    
+    lazy var nickBgView: UIView = {
+        let nickBgView = UIView()
+        nickBgView.backgroundColor = .white
+        return nickBgView
+    }()
+    
+    lazy var nickNameLabel: UILabel = {
+        let nickNameLabel = UILabel()
+        nickNameLabel.text = "昵称"
+        nickNameLabel.textColor = k333333Color
+        nickNameLabel.font = kRegularFont16
+        return nickNameLabel
+    }()
+    
+    lazy var nickNameTextView: IQTextView = {
+        let nickNameTextView = IQTextView()
+        nickNameTextView.placeholder = "添加昵称"
+        nickNameTextView.textColor = k999999Color
+        nickNameTextView.font = kRegularFont16
+        nickNameTextView.tintColor = kThemeColor
+        nickNameTextView.isScrollEnabled = false
+        nickNameTextView.textContainer.lineFragmentPadding = 0
+        nickNameTextView.textContainerInset = .zero
+        nickNameTextView.rx.text.orEmpty.changed.subscribe(onNext: {
+            [weak self] (text) in
+            TextLimitTool.restrictionInputTextView((self?.nickNameTextView)!, maxNumber: 16)
+            let constraintSize = CGSize(width: (self?.nickNameTextView.frame.size.width)!, height: CGFloat(MAXFLOAT))
+            self?.nickNameTextViewSize = self?.nickNameTextView.sizeThatFits(constraintSize)
+            let height = (self?.nickNameTextViewSize?.height ?? 23) + 66 + (self?.signNameTextViewSize?.height ?? 23)
+            self?.frame = CGRect(x: 0, y: 10 + 148 + 10 + kNavBarTotalHeight, width: kScreenWidth, height: height)
+            
+            self?.nickBgView.snp.remakeConstraints { (make) in
+                make.top.equalToSuperview()
+                make.left.right.equalToSuperview()
+                make.height.equalTo(33 + (self?.nickNameTextViewSize?.height ?? 23))
+            }
+            self?.nickNameTextView.snp.remakeConstraints { (make) in
+                make.centerY.equalToSuperview()
+                make.left.equalTo((self?.nickNameLabel.snp_right)!).offset(16)
+                make.right.equalTo(-14)
+                make.height.equalTo((self?.nickNameTextViewSize?.height ?? 23))
+            }
+ 
+        }).disposed(by: disposeBag)
+        return nickNameTextView
+    }()
+    
+    lazy var lineLabel: UILabel = {
+        let lineLabel = UILabel()
+        lineLabel.backgroundColor = kf5f5f5Color
+        return lineLabel
+    }()
+    
+    lazy var signBgView: UIView = {
+        let signBgView = UIView()
+        signBgView.backgroundColor = .white
+        return signBgView
+    }()
+    
+    lazy var signNameLabel: UILabel = {
+        let signNameLabel = UILabel()
+        signNameLabel.text = "签名"
+        signNameLabel.textColor = k313334Color
+        signNameLabel.font = kRegularFont16
+        return signNameLabel
+    }()
+    
+    lazy var signNameTextView: IQTextView = {
+        let signNameTextView = IQTextView()
+        signNameTextView.placeholder = "添加个人简介,让更多的彩虹居民认识你~"
+        signNameTextView.textColor = k999999Color
+        signNameTextView.font = kRegularFont16
+        signNameTextView.tintColor = kThemeColor
+        signNameTextView.isScrollEnabled = false
+        signNameTextView.textContainer.lineFragmentPadding = 0
+        signNameTextView.textContainerInset = .zero
+        signNameTextView.rx.text.orEmpty.changed.subscribe(onNext: {
+            [weak self] (text) in
+            TextLimitTool.restrictionInputTextView((self?.signNameTextView)!, maxNumber: 24)
+            let constraintSize = CGSize(width: (self?.signNameTextView.frame.size.width)!, height: CGFloat(MAXFLOAT))
+            self?.signNameTextViewSize = self?.signNameTextView.sizeThatFits(constraintSize)
+            
+            let height = (self?.nickNameTextViewSize?.height ?? 23) + 66 + (self?.signNameTextViewSize?.height ?? 23)
+            
+            self?.frame = CGRect(x: 0, y: 10 + 148 + 10 + kNavBarTotalHeight, width: kScreenWidth, height: height)
+            
+            self?.signBgView.snp.remakeConstraints { (make) in
+                make.top.equalTo((self?.lineLabel.snp_bottom)!)
+                make.left.right.equalTo((self?.nickBgView)!)
+                make.height.equalTo(33 + (self?.signNameTextViewSize?.height ?? 23))
+            }
+            self?.signNameTextView.snp.remakeConstraints { (make) in
+                make.centerY.equalToSuperview()
+                make.left.equalTo((self?.signNameLabel.snp_right)!).offset(16)
+                make.right.equalTo(-14)
+                make.height.equalTo((self?.signNameTextViewSize?.height ?? 23))
+            }
+            
+        }).disposed(by: disposeBag)
+        return signNameTextView
+    }()
+
+}
+

+ 44 - 0
RainbowPlanet/RainbowPlanet/Modules/MineModule/ModifyData/ViewController/ModifyDataViewController.swift

@@ -0,0 +1,44 @@
+//
+//  ModifyDataViewController.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/19.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class ModifyDataViewController: BaseViewController {
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupData()
+    }
+    
+    override func setupViews() {
+        view.backgroundColor = kf7f8faColor
+        navigationBar.title = "修改资料"
+        navigationBar.wr_setRightButton(title: "保存", titleColor: kThemeColor)
+        view.addSubview(modifyDataAvatarView)
+        view.addSubview(modifyDataNickNameSignView)
+        
+    }
+    
+    override func setupData() {
+        navigationBar.onClickRightButton = {
+            
+        }
+    }
+    
+    lazy var modifyDataAvatarView: ModifyDataAvatarView = {
+        let modifyDataAvatarView = ModifyDataAvatarView(frame: CGRect(x: 0, y: 10+kNavBarTotalHeight, width: kScreenWidth, height: 148))
+        return modifyDataAvatarView
+    }()
+    
+    lazy var modifyDataNickNameSignView: ModifyDataNickNameSignView = {
+        let modifyDataNickNameSignView = ModifyDataNickNameSignView(frame: CGRect(x: 0, y: 10+148+10+kNavBarTotalHeight, width: kScreenWidth, height: 112))
+        return modifyDataNickNameSignView
+    }()
+
+}

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/MyFollowAndFan/View/MyFollowAndFanTableViewCell.swift

@@ -149,7 +149,7 @@ class MyFollowAndFanTableViewCell: UITableViewCell {
                 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.layer.borderColor = kCCCCCCColor.cgColor
                 followButton.setBackgroundImage(UIImage.imageWithColor(color: kffffffColor), for: UIControl.State.normal)
                 followButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 0)
                 

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

@@ -191,6 +191,11 @@ class PersonViewUserAndOtherHeaderView: BaseView {
         editButton.layer.borderWidth = 1
         editButton.isHidden = true
         editButton.backgroundColor = UIColor.clear
+        editButton.rx.tap.subscribe(onNext: {[weak self] (data) in
+            let currentVC = editButton.findViewController() as? BaseViewController
+            let vc = ModifyDataViewController()
+            currentVC?.navigationController?.pushViewController(vc, animated: true)
+        }).disposed(by: disposeBag)
         return editButton
     }()
     

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingCart/View/ShoppingCartHotSale/ShoppingCartHotSaleTableViewCell.swift

@@ -83,7 +83,7 @@ class ShoppingCartHotSaleTableViewCell: UITableViewCell {
         }
         
         let leftLineView = UIView()
-        leftLineView.backgroundColor = kccccccColor
+        leftLineView.backgroundColor = kCCCCCCColor
         titleView.addSubview(leftLineView)
         leftLineView.snp.makeConstraints({ (make) in
             make.centerY.equalTo(titleLabel)
@@ -93,7 +93,7 @@ class ShoppingCartHotSaleTableViewCell: UITableViewCell {
         })
         
         let rightLineView = UIView()
-        rightLineView.backgroundColor = kccccccColor
+        rightLineView.backgroundColor = kCCCCCCColor
         titleView.addSubview(rightLineView)
         rightLineView.snp.makeConstraints({ (make) in
             make.centerY.equalTo(titleLabel)

+ 66 - 0
RainbowPlanet/RainbowPlanet/Tools/TextLimitTool/TextLimitTool.h

@@ -0,0 +1,66 @@
+//
+//  TextLimitTool.h
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/19.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface TextLimitTool : NSObject
+/**
+ 判断是否有表情
+ */
++ (BOOL)isContainsEmoji:(NSString *)string;
+
+/**
+ 删除emoji表情
+ */
++ (NSString *)disableEmoji:(NSString *)text;
+
+/**
+ 判断是否有特殊字符
+ */
++ (BOOL)isContainsSpecialCharacters:(NSString *)string;
+
+/**
+ 汉字,数字,英文,括号,下划线,横杠,空格(只能输入这些)
+ */
++(NSString *)filterCharactors:(NSString *)string;
+
+/**
+ 根据正在过滤特殊字符
+ */
++ (NSString *)filterCharactor:(NSString *)string withRegex:(NSString *)regexStr;
+
+/**
+ 除去特殊字符并限制字数的textFiled
+ */
++ (void)restrictionInputTextFieldMaskSpecialCharacter:(UITextField *)textField maxNumber:(NSInteger)maxNumber;
+
+/**
+ textFiled限制字数
+ */
++ (void)restrictionInputTextField:(UITextField *)textField maxNumber:(NSInteger)maxNumber;
+
+/**
+ 除去特殊字符并限制字数的TextView
+ */
++ (void)restrictionInputTextViewMaskSpecialCharacter:(UITextView *)textView maxNumber:(NSInteger)maxNumber;
+
+/**
+ textView限制字数
+ */
++ (void)restrictionInputTextView:(UITextView *)textView maxNumber:(NSInteger)maxNumber;
+
+/**
+ 防止原生emoji表情被截断
+ */
++ (NSString *)subStringWith:(NSString *)string index:(NSInteger)index;
+@end
+
+NS_ASSUME_NONNULL_END

+ 213 - 0
RainbowPlanet/RainbowPlanet/Tools/TextLimitTool/TextLimitTool.m

@@ -0,0 +1,213 @@
+//
+//  TextLimitTool.m
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/19.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+#import "TextLimitTool.h"
+
+@implementation TextLimitTool
+/**
+ 判断NSString中是否有表情
+ */
++ (BOOL)isContainsEmoji:(NSString *)string {
+    __block BOOL isEomji = NO;
+    [string enumerateSubstringsInRange:NSMakeRange(0, [string length]) options:NSStringEnumerationByComposedCharacterSequences usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) {
+        const unichar hs = [substring characterAtIndex:0];
+        // surrogate pair
+        if (0xd800 <= hs && hs <= 0xdbff) {
+            if (substring.length > 1) {
+                const unichar ls = [substring characterAtIndex:1];
+                const int uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000;
+                if (0x1d000 <= uc && uc <= 0x1f77f) {
+                    isEomji = YES;
+                }
+            }
+        } else {
+            // non surrogate
+            if (0x2100 <= hs && hs <= 0x27ff && hs != 0x263b) {
+                if (!(9312 <= hs && hs <= 9327)) { // 9312代表①   表示①至⑯
+                    isEomji = YES;
+                }
+            } else if (0x2B05 <= hs && hs <= 0x2b07) {
+                isEomji = YES;
+            } else if (0x2934 <= hs && hs <= 0x2935) {
+                isEomji = YES;
+            } else if (0x3297 <= hs && hs <= 0x3299) {
+                isEomji = YES;
+            } else if (hs == 0xa9 || hs == 0xae || hs == 0x303d || hs == 0x3030 || hs == 0x2b55 || hs == 0x2b1c || hs == 0x2b1b || hs == 0x2b50|| hs == 0x231a ) {
+                isEomji = YES;
+            }
+            if (!isEomji && substring.length > 1) {
+                const unichar ls = [substring characterAtIndex:1];
+                if (ls == 0x20e3) {
+                    isEomji = YES;
+                }
+            }
+        }
+    }];
+    return isEomji;
+}
+
+/**
+ 删除emoji表情
+ */
++ (NSString *)disableEmoji:(NSString *)text{
+    NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"[^\\u0020-\\u007E\\u00A0-\\u00BE\\u2E80-\\uA4CF\\uF900-\\uFAFF\\uFE30-\\uFE4F\\uFF00-\\uFFEF\\u0080-\\u009F\\u2000-\\u201f\r\n]"options:NSRegularExpressionCaseInsensitive error:nil];
+    NSString *modifiedString = [regex stringByReplacingMatchesInString:text
+                                                               options:0
+                                                                 range:NSMakeRange(0, [text length])
+                                                          withTemplate:@""];
+    return modifiedString;
+}
+
+/**
+ 只能输入汉字,数字,英文,括号,下划线,横杠,空格
+ */
++(NSString *)filterCharactors:(NSString *)string{
+    
+    NSString *regular = @"[^a-zA-Z0-9()_\u4E00-\u9FA5\\s-]"; //
+    NSString *str = [[self class] filterCharactor:string withRegex:[NSString stringWithFormat:@"%@",regular]];
+    
+    return str;
+}
+
+/**
+ 判断是否存在特殊字符 只能输入汉字,数字,英文,括号,下划线,横杠,空格
+ */
++ (BOOL)isContainsSpecialCharacters:(NSString *)searchText
+{
+    //    NSString *regex = @"[^a-zA-Z0-9()_\u4E00-\u9FA5\\s-]";
+    //    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex];
+    //    BOOL isValid = [predicate evaluateWithObject:string];
+    //    return isValid;
+    
+    NSError *error = NULL;
+    NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"[^a-zA-Z0-9()_\u4E00-\u9FA5\\s-]" options:NSRegularExpressionCaseInsensitive error:&error];
+    NSTextCheckingResult *result = [regex firstMatchInString:searchText options:0 range:NSMakeRange(0, [searchText length])];
+    if (result) {
+        return YES;
+    }else {
+        return NO;
+    }
+    
+}
+
+
+/**
+ 根据正则过滤特殊字符
+ */
++ (NSString *)filterCharactor:(NSString *)string withRegex:(NSString *)regexStr{
+    NSString *searchText = string;
+    NSError *error = NULL;
+    NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:regexStr options:NSRegularExpressionCaseInsensitive error:&error];
+    NSString *result = [regex stringByReplacingMatchesInString:searchText options:NSMatchingReportCompletion range:NSMakeRange(0, searchText.length) withTemplate:@""];
+    return result;
+}
+
+
+/**
+ 除去特殊字符并限制字数的textFiled
+ */
++ (void)restrictionInputTextFieldMaskSpecialCharacter:(UITextField *)textField maxNumber:(NSInteger)maxNumber{
+    
+    if ([[self class]isContainsEmoji:textField.text]){
+        textField.text = [[self class]disableEmoji:textField.text];
+        return;
+    }
+    if ([[self class]isContainsSpecialCharacters:textField.text]){
+        textField.text = [[self class]filterCharactors:textField.text];
+        return;
+    }
+    [[self class]restrictionInputTextField:textField maxNumber:maxNumber];
+}
+/**
+ 除去特殊字符并限制字数的TextView
+ */
++ (void)restrictionInputTextViewMaskSpecialCharacter:(UITextView *)textView maxNumber:(NSInteger)maxNumber{
+    
+    if ([[self class]isContainsEmoji:textView.text]){
+        textView.text = [[self class]disableEmoji:textView.text];
+        return;
+    }
+    if ([[self class]isContainsSpecialCharacters:textView.text]){
+        textView.text = [[self class]filterCharactors:textView.text];
+        return;
+    }
+    [[self class]restrictionInputTextView:textView maxNumber:maxNumber];
+}
+
+/**
+ textFiled限制字数
+ */
++ (void)restrictionInputTextField:(UITextField *)textField maxNumber:(NSInteger)maxNumber{
+    
+    NSString *toBeString = textField.text;
+    NSString *lang = textField.textInputMode.primaryLanguage; // 键盘输入模式
+    if([lang isEqualToString:@"zh-Hans"]) { //简体中文输入,包括简体拼音,健体五笔,简体手写
+        UITextRange *selectedRange = [textField markedTextRange];
+        //获取高亮部分
+        UITextPosition *position = [textField positionFromPosition:selectedRange.start offset:0];
+        //没有高亮选择的字,则对已输入的文字进行字数统计和限制
+        if(!position) {
+            
+            if(toBeString.length > maxNumber) {
+                textField.text = [toBeString substringToIndex:maxNumber];
+            }
+        } else{ //有高亮选择的字符串,则暂不对文字进行统计和限制
+            
+        }
+    }
+    else{ //中文输入法以外的直接对其统计限制即可,不考虑其他语种情况
+        
+        if(toBeString.length > maxNumber) {
+            //防止表情被截段
+            textField.text = [[self class] subStringWith:toBeString index:maxNumber];
+        }
+    }
+    
+}
+
+/**
+ textView限制字数
+ */
++ (void)restrictionInputTextView:(UITextView *)textView maxNumber:(NSInteger)maxNumber{
+    
+    NSString *toBeString = textView.text;
+    NSString *lang = textView.textInputMode.primaryLanguage; // 键盘输入模式
+    if([lang isEqualToString:@"zh-Hans"]) { //简体中文输入,包括简体拼音,健体五笔,简体手写
+        UITextRange *selectedRange = [textView markedTextRange];
+        //获取高亮部分
+        UITextPosition *position = [textView positionFromPosition:selectedRange.start offset:0];
+        //没有高亮选择的字,则对已输入的文字进行字数统计和限制
+        if(!position) {
+            if(toBeString.length > maxNumber) {
+                textView.text = [toBeString substringToIndex:maxNumber];
+            }
+        } else{ //有高亮选择的字符串,则暂不对文字进行统计和限制
+        }
+    } else{ //中文输入法以外的直接对其统计限制即可,不考虑其他语种情况
+        if(toBeString.length > maxNumber) {
+            
+            //防止表情被截段
+            textView.text = [[self class] subStringWith:toBeString index:maxNumber];
+        }
+    }
+}
+
+/**
+ 防止原生emoji表情被截断
+ */
++ (NSString *)subStringWith:(NSString *)string index:(NSInteger)index{
+    
+    NSString *result = string;
+    if (result.length > index) {
+        NSRange rangeIndex = [result rangeOfComposedCharacterSequenceAtIndex:index];
+        result = [result substringToIndex:(rangeIndex.location)];
+    }
+    
+    return result;
+}
+@end