Prechádzať zdrojové kódy

删除无用的东西

nanxinlin 6 rokov pred
rodič
commit
127c0c6543
24 zmenil súbory, kde vykonal 306 pridanie a 2008 odobranie
  1. 0 13
      RainbowPlanet/Podfile
  2. 1 1
      RainbowPlanet/Podfile.lock
  3. 91 158
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  4. 0 30
      RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate+BaiduMap.swift
  5. 0 18
      RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate+IQKeyboardManagerSwift.swift
  6. 3 3
      RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate+UM.swift
  7. 2 2
      RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate.swift
  8. 25 8
      RainbowPlanet/RainbowPlanet/Manager/BaiduMapManager/BaiduMapManager.swift
  9. 26 0
      RainbowPlanet/RainbowPlanet/Manager/IQKeyboardManagerSwiftManager/IQKeyboardManagerSwiftManager.swift
  10. 1 2
      RainbowPlanet/RainbowPlanet/Modules/MineModule/Mine/ViewController/MineViewController.swift
  11. 1 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallNavigationBarView.swift
  12. 3 3
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/ApiMacro.swift
  13. 0 46
      RainbowPlanet/RainbowPlanet/Tools/AlertView/BAAlertController/BAAlertController.h
  14. 0 108
      RainbowPlanet/RainbowPlanet/Tools/AlertView/BAAlertController/NSObject+BARunTime.h
  15. 0 268
      RainbowPlanet/RainbowPlanet/Tools/AlertView/BAAlertController/NSObject+BARunTime.m
  16. 0 190
      RainbowPlanet/RainbowPlanet/Tools/AlertView/BAAlertController/UIAlertController+BAKit.h
  17. 0 377
      RainbowPlanet/RainbowPlanet/Tools/AlertView/BAAlertController/UIAlertController+BAKit.m
  18. 2 3
      RainbowPlanet/RainbowPlanet/Tools/AppInfo/AppInfo.swift
  19. 151 177
      RainbowPlanet/RainbowPlanet/Tools/Extension/Extension+NSMutableAttributedString.swift
  20. 0 145
      RainbowPlanet/RainbowPlanet/Tools/Extension/NSMutableAttributedString+BAKit.h
  21. 0 264
      RainbowPlanet/RainbowPlanet/Tools/Extension/NSMutableAttributedString+BAKit.m
  22. 0 99
      RainbowPlanet/RainbowPlanet/Tools/Extension/UIBarButtonItem+SXCreate.h
  23. 0 92
      RainbowPlanet/RainbowPlanet/Tools/Extension/UIBarButtonItem+SXCreate.m
  24. 0 0
      RainbowPlanet/RainbowPlanet/Tools/SwiftProgressHUD/SwiftProgressHUD.swift

+ 0 - 13
RainbowPlanet/Podfile

@@ -51,8 +51,6 @@ target 'RainbowPlanet' do
   pod 'FWPopupView'
   # 存储数据Keychain
   pod 'KeychainAccess'
-  # 路由
-#  pod 'MGJRouter'
 
   #======================第三方平台===========
   #======================友盟===========
@@ -82,15 +80,4 @@ target 'RainbowPlanet' do
 #  #百度地图定位SDK
   pod 'BMKLocationKit'
 
-
-  target 'RainbowPlanetTests' do
-    inherit! :search_paths
-    # Pods for testing
-  end
-
-  target 'RainbowPlanetUITests' do
-    inherit! :search_paths
-    # Pods for testing
-  end
-
 end

+ 1 - 1
RainbowPlanet/Podfile.lock

@@ -181,6 +181,6 @@ SPEC CHECKSUMS:
   UMCSecurityPlugins: 0831a08f3988f3cea9f1d3a7626cd9bee4fef150
   UMCShare: 552b29753f1b4da87b51d96545ed19e6263df397
 
-PODFILE CHECKSUM: 1fa779029416bec4902d54f85c1d95f7b4fd2ddf
+PODFILE CHECKSUM: ad163bded8c5e8d280749b01b1c86240908c574c
 
 COCOAPODS: 1.5.3

+ 91 - 158
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -8,8 +8,6 @@
 
 /* Begin PBXBuildFile section */
 		0A110C4CD931995B8E8BF7C5 /* Pods_RainbowPlanet.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D469F6C3768252BCB7001EDD /* Pods_RainbowPlanet.framework */; };
-		3E58CC90A9E5EF3B7AF4AE42 /* Pods_RainbowPlanetTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7E03A30F40582782EC5DA89 /* Pods_RainbowPlanetTests.framework */; };
-		867818C053169E7AE52C09C6 /* Pods_RainbowPlanetUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 88DF1EFD2E202DA7C627E8A7 /* Pods_RainbowPlanetUITests.framework */; };
 		A72A726622321DBD00B21995 /* BaiduMapManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A726222321DBD00B21995 /* BaiduMapManager.swift */; };
 		A72A726722321DBD00B21995 /* LocationModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A726322321DBD00B21995 /* LocationModel.swift */; };
 		A72A726822321DBD00B21995 /* UMManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A726522321DBD00B21995 /* UMManager.swift */; };
@@ -28,8 +26,6 @@
 		A72A72AF22321DE000B21995 /* AppInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A727E22321DDF00B21995 /* AppInfo.swift */; };
 		A72A72B022321DE000B21995 /* CGView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A728022321DDF00B21995 /* CGView.swift */; };
 		A72A72B122321DE000B21995 /* UIScrollView+MJRefreshEX.m in Sources */ = {isa = PBXBuildFile; fileRef = A72A728222321DDF00B21995 /* UIScrollView+MJRefreshEX.m */; };
-		A72A72B222321DE000B21995 /* NSObject+BARunTime.m in Sources */ = {isa = PBXBuildFile; fileRef = A72A728622321DE000B21995 /* NSObject+BARunTime.m */; };
-		A72A72B322321DE000B21995 /* UIAlertController+BAKit.m in Sources */ = {isa = PBXBuildFile; fileRef = A72A728722321DE000B21995 /* UIAlertController+BAKit.m */; };
 		A72A72B422321DE000B21995 /* Extension+UIImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A728C22321DE000B21995 /* Extension+UIImage.swift */; };
 		A72A72B522321DE000B21995 /* Extension+UITextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A728D22321DE000B21995 /* Extension+UITextView.swift */; };
 		A72A72B622321DE000B21995 /* Extension+NSRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A728E22321DE000B21995 /* Extension+NSRange.swift */; };
@@ -43,8 +39,6 @@
 		A72A72BE22321DE000B21995 /* Extension+RxTimer.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A729822321DE000B21995 /* Extension+RxTimer.swift */; };
 		A72A72BF22321DE000B21995 /* Extension+UIButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A729922321DE000B21995 /* Extension+UIButton.swift */; };
 		A72A72C022321DE000B21995 /* Extension+UIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A729A22321DE000B21995 /* Extension+UIView.swift */; };
-		A72A72C122321DE000B21995 /* NSMutableAttributedString+BAKit.m in Sources */ = {isa = PBXBuildFile; fileRef = A72A729B22321DE000B21995 /* NSMutableAttributedString+BAKit.m */; };
-		A72A72C222321DE000B21995 /* UIBarButtonItem+SXCreate.m in Sources */ = {isa = PBXBuildFile; fileRef = A72A729C22321DE000B21995 /* UIBarButtonItem+SXCreate.m */; };
 		A72A72C322321DE000B21995 /* Extension+Date.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A729D22321DE000B21995 /* Extension+Date.swift */; };
 		A72A72C422321DE000B21995 /* Extension+CAGradientLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A729E22321DE000B21995 /* Extension+CAGradientLayer.swift */; };
 		A72A72C522321DE000B21995 /* WKWebViewConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A72A022321DE000B21995 /* WKWebViewConfig.swift */; };
@@ -57,8 +51,6 @@
 		A72A72D422321E2700B21995 /* EnumMacro.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A72CC22321E2600B21995 /* EnumMacro.swift */; };
 		A72A72D522321E2700B21995 /* ColorMacro.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A72CD22321E2600B21995 /* ColorMacro.swift */; };
 		A72A72D622321E2700B21995 /* ThirdPartyMacro.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A72CE22321E2700B21995 /* ThirdPartyMacro.swift */; };
-		A72A72ED22321E5200B21995 /* AlipaySDK.bundle in Resources */ = {isa = PBXBuildFile; fileRef = A72A72E222321E5200B21995 /* AlipaySDK.bundle */; };
-		A72A72EE22321E5200B21995 /* AlipaySDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A72A72E322321E5200B21995 /* AlipaySDK.framework */; };
 		A72A72F022321E8800B21995 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A72A72EF22321E8800B21995 /* CoreMotion.framework */; };
 		A72A72F222321E9300B21995 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A72A72F122321E9300B21995 /* CFNetwork.framework */; };
 		A72A72F422321E9A00B21995 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A72A72F322321E9A00B21995 /* Foundation.framework */; };
@@ -71,16 +63,12 @@
 		A72A730222321EEE00B21995 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A72A730122321EEE00B21995 /* libz.tbd */; };
 		A72A730422321EFA00B21995 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A72A730322321EFA00B21995 /* libc++.tbd */; };
 		A72A730C2232207700B21995 /* AppDelegate+UM.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A73082232207600B21995 /* AppDelegate+UM.swift */; };
-		A72A730D2232207700B21995 /* AppDelegate+BaiduMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A73092232207600B21995 /* AppDelegate+BaiduMap.swift */; };
-		A72A730F2232207700B21995 /* AppDelegate+IQKeyboardManagerSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A730B2232207600B21995 /* AppDelegate+IQKeyboardManagerSwift.swift */; };
 		A72A73142232475E00B21995 /* AlipayManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A73132232475E00B21995 /* AlipayManager.swift */; };
 		A72A73162232481600B21995 /* WeChatpayManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A73152232481600B21995 /* WeChatpayManager.swift */; };
 		A72A7333223256E100B21995 /* PayManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A7332223256E100B21995 /* PayManager.swift */; };
 		A72A733522325A4B00B21995 /* AppDelegate+HandleOpen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A733422325A4B00B21995 /* AppDelegate+HandleOpen.swift */; };
 		A72A733722325EED00B21995 /* AlipayResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A733622325EED00B21995 /* AlipayResultModel.swift */; };
 		A72A73392232688100B21995 /* AlipayOrderModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A73382232688100B21995 /* AlipayOrderModel.swift */; };
-		A72A73402232772900B21995 /* README.txt in Resources */ = {isa = PBXBuildFile; fileRef = A72A733D2232772900B21995 /* README.txt */; };
-		A72A73412232772900B21995 /* libWeChatSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A72A733F2232772900B21995 /* libWeChatSDK.a */; };
 		A72A734322327DE300B21995 /* WeChatpayOrderModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A734222327DE300B21995 /* WeChatpayOrderModel.swift */; };
 		A72A737E2233966800B21995 /* RootInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A73742233966800B21995 /* RootInfoModel.swift */; };
 		A72A737F2233966800B21995 /* RootModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A73752233966800B21995 /* RootModel.swift */; };
@@ -96,6 +84,17 @@
 		A775CBFE2237493600EBDCF8 /* ShoppingMallNavigationBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A775CBFD2237493600EBDCF8 /* ShoppingMallNavigationBarView.swift */; };
 		A775CC00223774A300EBDCF8 /* ShoppingMallView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A775CBFF223774A300EBDCF8 /* ShoppingMallView.swift */; };
 		A775CC0322377C6500EBDCF8 /* EmptyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A775CC0222377C6500EBDCF8 /* EmptyView.swift */; };
+		A7778C8D22438A5200C7C47A /* AlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7778C8C22438A5200C7C47A /* AlertView.swift */; };
+		A7778C9722438F5D00C7C47A /* AlipaySDK.bundle in Resources */ = {isa = PBXBuildFile; fileRef = A7778C8F22438F5C00C7C47A /* AlipaySDK.bundle */; };
+		A7778C9822438F5D00C7C47A /* AlipaySDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7778C9022438F5C00C7C47A /* AlipaySDK.framework */; };
+		A7778C9922438F5D00C7C47A /* README.txt in Resources */ = {isa = PBXBuildFile; fileRef = A7778C9422438F5D00C7C47A /* README.txt */; };
+		A7778C9A22438F5D00C7C47A /* libWeChatSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A7778C9622438F5D00C7C47A /* libWeChatSDK.a */; };
+		A7778C9C2243934A00C7C47A /* MineModule.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A7778C9B2243934A00C7C47A /* MineModule.xcassets */; };
+		A7778C9E2243937300C7C47A /* RegisterLoginModule.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A7778C9D2243937300C7C47A /* RegisterLoginModule.xcassets */; };
+		A7778CA02243938200C7C47A /* ShoppingCartModule.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A7778C9F2243938200C7C47A /* ShoppingCartModule.xcassets */; };
+		A7778CA22243939100C7C47A /* ShoppingMallModule.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A7778CA12243939100C7C47A /* ShoppingMallModule.xcassets */; };
+		A7778CA4224393A900C7C47A /* CommonModule.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A7778CA3224393A900C7C47A /* CommonModule.xcassets */; };
+		A7778CA72243A05400C7C47A /* IQKeyboardManagerSwiftManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7778CA62243A05400C7C47A /* IQKeyboardManagerSwiftManager.swift */; };
 		A77F2C612231FB49001BD3F6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77F2C602231FB49001BD3F6 /* AppDelegate.swift */; };
 		A77F2C682231FB4A001BD3F6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A77F2C672231FB4A001BD3F6 /* Assets.xcassets */; };
 		A77F2C762231FB4A001BD3F6 /* RainbowPlanetTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77F2C752231FB4A001BD3F6 /* RainbowPlanetTests.swift */; };
@@ -139,7 +138,6 @@
 /* Begin PBXFileReference section */
 		57C497E128081597F165C771 /* Pods-RainbowPlanet.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RainbowPlanet.release.xcconfig"; path = "Pods/Target Support Files/Pods-RainbowPlanet/Pods-RainbowPlanet.release.xcconfig"; sourceTree = "<group>"; };
 		88DF1EFD2E202DA7C627E8A7 /* Pods_RainbowPlanetUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RainbowPlanetUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		9D60C551769808F63D7376A8 /* Pods-RainbowPlanetTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RainbowPlanetTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RainbowPlanetTests/Pods-RainbowPlanetTests.debug.xcconfig"; sourceTree = "<group>"; };
 		A72A726022321D3400B21995 /* RainbowPlanet-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RainbowPlanet-Bridging-Header.h"; sourceTree = "<group>"; };
 		A72A726222321DBD00B21995 /* BaiduMapManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaiduMapManager.swift; sourceTree = "<group>"; };
 		A72A726322321DBD00B21995 /* LocationModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocationModel.swift; sourceTree = "<group>"; };
@@ -160,11 +158,6 @@
 		A72A728022321DDF00B21995 /* CGView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CGView.swift; sourceTree = "<group>"; };
 		A72A728222321DDF00B21995 /* UIScrollView+MJRefreshEX.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+MJRefreshEX.m"; sourceTree = "<group>"; };
 		A72A728322321DDF00B21995 /* UIScrollView+MJRefreshEX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+MJRefreshEX.h"; sourceTree = "<group>"; };
-		A72A728622321DE000B21995 /* NSObject+BARunTime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+BARunTime.m"; sourceTree = "<group>"; };
-		A72A728722321DE000B21995 /* UIAlertController+BAKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIAlertController+BAKit.m"; sourceTree = "<group>"; };
-		A72A728822321DE000B21995 /* BAAlertController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BAAlertController.h; sourceTree = "<group>"; };
-		A72A728922321DE000B21995 /* NSObject+BARunTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+BARunTime.h"; sourceTree = "<group>"; };
-		A72A728A22321DE000B21995 /* UIAlertController+BAKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIAlertController+BAKit.h"; sourceTree = "<group>"; };
 		A72A728C22321DE000B21995 /* Extension+UIImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Extension+UIImage.swift"; sourceTree = "<group>"; };
 		A72A728D22321DE000B21995 /* Extension+UITextView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Extension+UITextView.swift"; sourceTree = "<group>"; };
 		A72A728E22321DE000B21995 /* Extension+NSRange.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Extension+NSRange.swift"; sourceTree = "<group>"; };
@@ -174,14 +167,10 @@
 		A72A729222321DE000B21995 /* Extension+String.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Extension+String.swift"; sourceTree = "<group>"; };
 		A72A729322321DE000B21995 /* Extension+UILabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Extension+UILabel.swift"; sourceTree = "<group>"; };
 		A72A729422321DE000B21995 /* Extension+UIAlertController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Extension+UIAlertController.swift"; sourceTree = "<group>"; };
-		A72A729522321DE000B21995 /* UIBarButtonItem+SXCreate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIBarButtonItem+SXCreate.h"; sourceTree = "<group>"; };
-		A72A729622321DE000B21995 /* NSMutableAttributedString+BAKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableAttributedString+BAKit.h"; sourceTree = "<group>"; };
 		A72A729722321DE000B21995 /* Extension+UIColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Extension+UIColor.swift"; sourceTree = "<group>"; };
 		A72A729822321DE000B21995 /* Extension+RxTimer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Extension+RxTimer.swift"; sourceTree = "<group>"; };
 		A72A729922321DE000B21995 /* Extension+UIButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Extension+UIButton.swift"; sourceTree = "<group>"; };
 		A72A729A22321DE000B21995 /* Extension+UIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Extension+UIView.swift"; sourceTree = "<group>"; };
-		A72A729B22321DE000B21995 /* NSMutableAttributedString+BAKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableAttributedString+BAKit.m"; sourceTree = "<group>"; };
-		A72A729C22321DE000B21995 /* UIBarButtonItem+SXCreate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIBarButtonItem+SXCreate.m"; sourceTree = "<group>"; };
 		A72A729D22321DE000B21995 /* Extension+Date.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Extension+Date.swift"; sourceTree = "<group>"; };
 		A72A729E22321DE000B21995 /* Extension+CAGradientLayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Extension+CAGradientLayer.swift"; sourceTree = "<group>"; };
 		A72A72A022321DE000B21995 /* WKWebViewConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WKWebViewConfig.swift; sourceTree = "<group>"; };
@@ -194,8 +183,6 @@
 		A72A72CC22321E2600B21995 /* EnumMacro.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EnumMacro.swift; sourceTree = "<group>"; };
 		A72A72CD22321E2600B21995 /* ColorMacro.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorMacro.swift; sourceTree = "<group>"; };
 		A72A72CE22321E2700B21995 /* ThirdPartyMacro.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThirdPartyMacro.swift; sourceTree = "<group>"; };
-		A72A72E222321E5200B21995 /* AlipaySDK.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = AlipaySDK.bundle; sourceTree = "<group>"; };
-		A72A72E322321E5200B21995 /* AlipaySDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AlipaySDK.framework; sourceTree = "<group>"; };
 		A72A72EF22321E8800B21995 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
 		A72A72F122321E9300B21995 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
 		A72A72F322321E9A00B21995 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -208,19 +195,12 @@
 		A72A730122321EEE00B21995 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
 		A72A730322321EFA00B21995 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
 		A72A73082232207600B21995 /* AppDelegate+UM.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "AppDelegate+UM.swift"; sourceTree = "<group>"; };
-		A72A73092232207600B21995 /* AppDelegate+BaiduMap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "AppDelegate+BaiduMap.swift"; sourceTree = "<group>"; };
-		A72A730B2232207600B21995 /* AppDelegate+IQKeyboardManagerSwift.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "AppDelegate+IQKeyboardManagerSwift.swift"; sourceTree = "<group>"; };
 		A72A73132232475E00B21995 /* AlipayManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlipayManager.swift; sourceTree = "<group>"; };
 		A72A73152232481600B21995 /* WeChatpayManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeChatpayManager.swift; sourceTree = "<group>"; };
 		A72A7332223256E100B21995 /* PayManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PayManager.swift; sourceTree = "<group>"; };
 		A72A733422325A4B00B21995 /* AppDelegate+HandleOpen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppDelegate+HandleOpen.swift"; sourceTree = "<group>"; };
 		A72A733622325EED00B21995 /* AlipayResultModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlipayResultModel.swift; sourceTree = "<group>"; };
 		A72A73382232688100B21995 /* AlipayOrderModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlipayOrderModel.swift; sourceTree = "<group>"; };
-		A72A733B2232772900B21995 /* WXApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXApi.h; sourceTree = "<group>"; };
-		A72A733C2232772900B21995 /* WXApiObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXApiObject.h; sourceTree = "<group>"; };
-		A72A733D2232772900B21995 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.txt; sourceTree = "<group>"; };
-		A72A733E2232772900B21995 /* WechatAuthSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WechatAuthSDK.h; sourceTree = "<group>"; };
-		A72A733F2232772900B21995 /* libWeChatSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libWeChatSDK.a; sourceTree = "<group>"; };
 		A72A734222327DE300B21995 /* WeChatpayOrderModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeChatpayOrderModel.swift; sourceTree = "<group>"; };
 		A72A73592233577000B21995 /* libc++.1.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.1.tbd"; path = "usr/lib/libc++.1.tbd"; sourceTree = SDKROOT; };
 		A72A73742233966800B21995 /* RootInfoModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RootInfoModel.swift; sourceTree = "<group>"; };
@@ -237,6 +217,20 @@
 		A775CBFD2237493600EBDCF8 /* ShoppingMallNavigationBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallNavigationBarView.swift; sourceTree = "<group>"; };
 		A775CBFF223774A300EBDCF8 /* ShoppingMallView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallView.swift; sourceTree = "<group>"; };
 		A775CC0222377C6500EBDCF8 /* EmptyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyView.swift; sourceTree = "<group>"; };
+		A7778C8C22438A5200C7C47A /* AlertView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlertView.swift; sourceTree = "<group>"; };
+		A7778C8F22438F5C00C7C47A /* AlipaySDK.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = AlipaySDK.bundle; sourceTree = "<group>"; };
+		A7778C9022438F5C00C7C47A /* AlipaySDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AlipaySDK.framework; sourceTree = "<group>"; };
+		A7778C9222438F5D00C7C47A /* WXApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXApi.h; sourceTree = "<group>"; };
+		A7778C9322438F5D00C7C47A /* WXApiObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXApiObject.h; sourceTree = "<group>"; };
+		A7778C9422438F5D00C7C47A /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.txt; sourceTree = "<group>"; };
+		A7778C9522438F5D00C7C47A /* WechatAuthSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WechatAuthSDK.h; sourceTree = "<group>"; };
+		A7778C9622438F5D00C7C47A /* libWeChatSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libWeChatSDK.a; sourceTree = "<group>"; };
+		A7778C9B2243934A00C7C47A /* MineModule.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = MineModule.xcassets; sourceTree = "<group>"; };
+		A7778C9D2243937300C7C47A /* RegisterLoginModule.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = RegisterLoginModule.xcassets; sourceTree = "<group>"; };
+		A7778C9F2243938200C7C47A /* ShoppingCartModule.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = ShoppingCartModule.xcassets; sourceTree = "<group>"; };
+		A7778CA12243939100C7C47A /* ShoppingMallModule.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = ShoppingMallModule.xcassets; sourceTree = "<group>"; };
+		A7778CA3224393A900C7C47A /* CommonModule.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = CommonModule.xcassets; sourceTree = "<group>"; };
+		A7778CA62243A05400C7C47A /* IQKeyboardManagerSwiftManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IQKeyboardManagerSwiftManager.swift; sourceTree = "<group>"; };
 		A77F2C5D2231FB49001BD3F6 /* RainbowPlanet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RainbowPlanet.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		A77F2C602231FB49001BD3F6 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
 		A77F2C672231FB4A001BD3F6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@@ -266,11 +260,8 @@
 		A7A97FD82238FBAC0070F84D /* VerticalListCellCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VerticalListCellCollectionViewCell.swift; sourceTree = "<group>"; };
 		A7A97FD92238FBAD0070F84D /* VerticalSectionHeaderView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VerticalSectionHeaderView.swift; sourceTree = "<group>"; };
 		A7E03A30F40582782EC5DA89 /* Pods_RainbowPlanetTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RainbowPlanetTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		B1B8205A06E3602D2CF199C8 /* Pods-RainbowPlanetTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RainbowPlanetTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RainbowPlanetTests/Pods-RainbowPlanetTests.release.xcconfig"; sourceTree = "<group>"; };
 		BD9052C044FD3AE4E62D3929 /* Pods-RainbowPlanet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RainbowPlanet.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RainbowPlanet/Pods-RainbowPlanet.debug.xcconfig"; sourceTree = "<group>"; };
-		CC787426207DCFB69B1A7CFE /* Pods-RainbowPlanetUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RainbowPlanetUITests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RainbowPlanetUITests/Pods-RainbowPlanetUITests.release.xcconfig"; sourceTree = "<group>"; };
 		D469F6C3768252BCB7001EDD /* Pods_RainbowPlanet.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RainbowPlanet.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		FD5011AB6141BA86DC737616 /* Pods-RainbowPlanetUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RainbowPlanetUITests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RainbowPlanetUITests/Pods-RainbowPlanetUITests.debug.xcconfig"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -278,6 +269,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				A7778C9A22438F5D00C7C47A /* libWeChatSDK.a in Frameworks */,
 				A72A730422321EFA00B21995 /* libc++.tbd in Frameworks */,
 				A72A730222321EEE00B21995 /* libz.tbd in Frameworks */,
 				A72A730022321EE900B21995 /* SystemConfiguration.framework in Frameworks */,
@@ -288,9 +280,8 @@
 				A72A72F622321EA000B21995 /* UIKit.framework in Frameworks */,
 				A72A72F422321E9A00B21995 /* Foundation.framework in Frameworks */,
 				A72A72F222321E9300B21995 /* CFNetwork.framework in Frameworks */,
+				A7778C9822438F5D00C7C47A /* AlipaySDK.framework in Frameworks */,
 				A72A72F022321E8800B21995 /* CoreMotion.framework in Frameworks */,
-				A72A72EE22321E5200B21995 /* AlipaySDK.framework in Frameworks */,
-				A72A73412232772900B21995 /* libWeChatSDK.a in Frameworks */,
 				0A110C4CD931995B8E8BF7C5 /* Pods_RainbowPlanet.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -299,7 +290,6 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				3E58CC90A9E5EF3B7AF4AE42 /* Pods_RainbowPlanetTests.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -307,7 +297,6 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				867818C053169E7AE52C09C6 /* Pods_RainbowPlanetUITests.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -319,10 +308,6 @@
 			children = (
 				BD9052C044FD3AE4E62D3929 /* Pods-RainbowPlanet.debug.xcconfig */,
 				57C497E128081597F165C771 /* Pods-RainbowPlanet.release.xcconfig */,
-				9D60C551769808F63D7376A8 /* Pods-RainbowPlanetTests.debug.xcconfig */,
-				B1B8205A06E3602D2CF199C8 /* Pods-RainbowPlanetTests.release.xcconfig */,
-				FD5011AB6141BA86DC737616 /* Pods-RainbowPlanetUITests.debug.xcconfig */,
-				CC787426207DCFB69B1A7CFE /* Pods-RainbowPlanetUITests.release.xcconfig */,
 			);
 			name = Pods;
 			sourceTree = "<group>";
@@ -339,8 +324,8 @@
 		A72A725322321A6900B21995 /* Lib */ = {
 			isa = PBXGroup;
 			children = (
-				A72A733A2232772900B21995 /* WeChatSDK */,
-				A72A72E122321E5200B21995 /* AlipaySDK */,
+				A7778C8E22438F5C00C7C47A /* AlipaySDK */,
+				A7778C9122438F5D00C7C47A /* WeChatSDK */,
 			);
 			path = Lib;
 			sourceTree = "<group>";
@@ -348,6 +333,7 @@
 		A72A725422321B9400B21995 /* Manager */ = {
 			isa = PBXGroup;
 			children = (
+				A7778CA52243A03400C7C47A /* IQKeyboardManagerSwiftManager */,
 				A72A730522321F1D00B21995 /* PayManager */,
 				A72A726122321DBD00B21995 /* BaiduMapManager */,
 				A72A726422321DBD00B21995 /* UMManager */,
@@ -358,9 +344,9 @@
 		A72A725922321C5E00B21995 /* Define */ = {
 			isa = PBXGroup;
 			children = (
+				A72A72CA22321E2600B21995 /* Common.swift */,
 				A72A72CB22321E2600B21995 /* CacheMacro.swift */,
 				A72A72CD22321E2600B21995 /* ColorMacro.swift */,
-				A72A72CA22321E2600B21995 /* Common.swift */,
 				A72A72CC22321E2600B21995 /* EnumMacro.swift */,
 				A72A72C822321E2500B21995 /* FontMacro.swift */,
 				A72A72C922321E2600B21995 /* HTMLURLMacro.swift */,
@@ -418,12 +404,12 @@
 			path = Log;
 			sourceTree = "<group>";
 		};
-		A72A727522321DDE00B21995 /* MBProgressHUD */ = {
+		A72A727522321DDE00B21995 /* SwiftProgressHUD */ = {
 			isa = PBXGroup;
 			children = (
 				A72A727622321DDE00B21995 /* SwiftProgressHUD.swift */,
 			);
-			path = MBProgressHUD;
+			path = SwiftProgressHUD;
 			sourceTree = "<group>";
 		};
 		A72A727722321DDF00B21995 /* Regex */ = {
@@ -467,46 +453,22 @@
 			path = MJRefreshEX;
 			sourceTree = "<group>";
 		};
-		A72A728422321DE000B21995 /* AlertView */ = {
-			isa = PBXGroup;
-			children = (
-				A72A728522321DE000B21995 /* BAAlertController */,
-			);
-			path = AlertView;
-			sourceTree = "<group>";
-		};
-		A72A728522321DE000B21995 /* BAAlertController */ = {
-			isa = PBXGroup;
-			children = (
-				A72A728622321DE000B21995 /* NSObject+BARunTime.m */,
-				A72A728722321DE000B21995 /* UIAlertController+BAKit.m */,
-				A72A728822321DE000B21995 /* BAAlertController.h */,
-				A72A728922321DE000B21995 /* NSObject+BARunTime.h */,
-				A72A728A22321DE000B21995 /* UIAlertController+BAKit.h */,
-			);
-			path = BAAlertController;
-			sourceTree = "<group>";
-		};
 		A72A728B22321DE000B21995 /* Extension */ = {
 			isa = PBXGroup;
 			children = (
 				A72A728C22321DE000B21995 /* Extension+UIImage.swift */,
 				A72A728D22321DE000B21995 /* Extension+UITextView.swift */,
 				A72A728E22321DE000B21995 /* Extension+NSRange.swift */,
-				A72A728F22321DE000B21995 /* Extension+NSMutableAttributedString.swift */,
 				A72A729022321DE000B21995 /* Extension+UserDefaults.swift */,
 				A72A729122321DE000B21995 /* Extension+Array.swift */,
 				A72A729222321DE000B21995 /* Extension+String.swift */,
 				A72A729322321DE000B21995 /* Extension+UILabel.swift */,
 				A72A729422321DE000B21995 /* Extension+UIAlertController.swift */,
-				A72A729522321DE000B21995 /* UIBarButtonItem+SXCreate.h */,
-				A72A729622321DE000B21995 /* NSMutableAttributedString+BAKit.h */,
 				A72A729722321DE000B21995 /* Extension+UIColor.swift */,
 				A72A729822321DE000B21995 /* Extension+RxTimer.swift */,
 				A72A729922321DE000B21995 /* Extension+UIButton.swift */,
 				A72A729A22321DE000B21995 /* Extension+UIView.swift */,
-				A72A729B22321DE000B21995 /* NSMutableAttributedString+BAKit.m */,
-				A72A729C22321DE000B21995 /* UIBarButtonItem+SXCreate.m */,
+				A72A728F22321DE000B21995 /* Extension+NSMutableAttributedString.swift */,
 				A72A729D22321DE000B21995 /* Extension+Date.swift */,
 				A72A729E22321DE000B21995 /* Extension+CAGradientLayer.swift */,
 			);
@@ -522,15 +484,6 @@
 			path = WKWebView;
 			sourceTree = "<group>";
 		};
-		A72A72E122321E5200B21995 /* AlipaySDK */ = {
-			isa = PBXGroup;
-			children = (
-				A72A72E222321E5200B21995 /* AlipaySDK.bundle */,
-				A72A72E322321E5200B21995 /* AlipaySDK.framework */,
-			);
-			path = AlipaySDK;
-			sourceTree = "<group>";
-		};
 		A72A730522321F1D00B21995 /* PayManager */ = {
 			isa = PBXGroup;
 			children = (
@@ -568,18 +521,6 @@
 			path = PayManager;
 			sourceTree = "<group>";
 		};
-		A72A733A2232772900B21995 /* WeChatSDK */ = {
-			isa = PBXGroup;
-			children = (
-				A72A733D2232772900B21995 /* README.txt */,
-				A72A733F2232772900B21995 /* libWeChatSDK.a */,
-				A72A733B2232772900B21995 /* WXApi.h */,
-				A72A733C2232772900B21995 /* WXApiObject.h */,
-				A72A733E2232772900B21995 /* WechatAuthSDK.h */,
-			);
-			path = WeChatSDK;
-			sourceTree = "<group>";
-		};
 		A72A73722233966800B21995 /* RootModel */ = {
 			isa = PBXGroup;
 			children = (
@@ -632,6 +573,44 @@
 			path = EmptyView;
 			sourceTree = "<group>";
 		};
+		A7778C8B22438A5200C7C47A /* AlertView */ = {
+			isa = PBXGroup;
+			children = (
+				A7778C8C22438A5200C7C47A /* AlertView.swift */,
+			);
+			name = AlertView;
+			path = "../../../../../../Desktop/彩虹星球/RainbowPlanet/Lib/BaseMoudle/BaseMoudle/Classes/Tools/AlertView";
+			sourceTree = "<group>";
+		};
+		A7778C8E22438F5C00C7C47A /* AlipaySDK */ = {
+			isa = PBXGroup;
+			children = (
+				A7778C8F22438F5C00C7C47A /* AlipaySDK.bundle */,
+				A7778C9022438F5C00C7C47A /* AlipaySDK.framework */,
+			);
+			path = AlipaySDK;
+			sourceTree = "<group>";
+		};
+		A7778C9122438F5D00C7C47A /* WeChatSDK */ = {
+			isa = PBXGroup;
+			children = (
+				A7778C9222438F5D00C7C47A /* WXApi.h */,
+				A7778C9322438F5D00C7C47A /* WXApiObject.h */,
+				A7778C9422438F5D00C7C47A /* README.txt */,
+				A7778C9522438F5D00C7C47A /* WechatAuthSDK.h */,
+				A7778C9622438F5D00C7C47A /* libWeChatSDK.a */,
+			);
+			path = WeChatSDK;
+			sourceTree = "<group>";
+		};
+		A7778CA52243A03400C7C47A /* IQKeyboardManagerSwiftManager */ = {
+			isa = PBXGroup;
+			children = (
+				A7778CA62243A05400C7C47A /* IQKeyboardManagerSwiftManager.swift */,
+			);
+			path = IQKeyboardManagerSwiftManager;
+			sourceTree = "<group>";
+		};
 		A77F2C542231FB49001BD3F6 = {
 			isa = PBXGroup;
 			children = (
@@ -694,8 +673,6 @@
 			children = (
 				A77F2C602231FB49001BD3F6 /* AppDelegate.swift */,
 				A77F2CC2223203BA001BD3F6 /* AppDelegate+Window.swift */,
-				A72A73092232207600B21995 /* AppDelegate+BaiduMap.swift */,
-				A72A730B2232207600B21995 /* AppDelegate+IQKeyboardManagerSwift.swift */,
 				A72A73082232207600B21995 /* AppDelegate+UM.swift */,
 				A72A733422325A4B00B21995 /* AppDelegate+HandleOpen.swift */,
 			);
@@ -860,6 +837,11 @@
 			isa = PBXGroup;
 			children = (
 				A77F2C672231FB4A001BD3F6 /* Assets.xcassets */,
+				A7778C9B2243934A00C7C47A /* MineModule.xcassets */,
+				A7778C9D2243937300C7C47A /* RegisterLoginModule.xcassets */,
+				A7778C9F2243938200C7C47A /* ShoppingCartModule.xcassets */,
+				A7778CA12243939100C7C47A /* ShoppingMallModule.xcassets */,
+				A7778CA3224393A900C7C47A /* CommonModule.xcassets */,
 				A77F2C6C2231FB4A001BD3F6 /* Info.plist */,
 			);
 			path = "Supporting Files";
@@ -868,15 +850,15 @@
 		A77F2CBC2232022A001BD3F6 /* Tools */ = {
 			isa = PBXGroup;
 			children = (
+				A7778C8B22438A5200C7C47A /* AlertView */,
+				A72A727322321DDE00B21995 /* Log */,
+				A72A727D22321DDF00B21995 /* AppInfo */,
+				A72A727B22321DDF00B21995 /* Countdown */,
+				A72A727522321DDE00B21995 /* SwiftProgressHUD */,
 				A775CC0122377AB700EBDCF8 /* EmptyView */,
 				A72A73892233B2DE00B21995 /* RealmUtility */,
-				A72A728422321DE000B21995 /* AlertView */,
-				A72A727D22321DDF00B21995 /* AppInfo */,
 				A72A727F22321DDF00B21995 /* CGView */,
-				A72A727B22321DDF00B21995 /* Countdown */,
 				A72A728B22321DE000B21995 /* Extension */,
-				A72A727322321DDE00B21995 /* Log */,
-				A72A727522321DDE00B21995 /* MBProgressHUD */,
 				A72A728122321DDF00B21995 /* MJRefreshEX */,
 				A72A727122321DDE00B21995 /* NumberKeyboard */,
 				A72A727722321DDF00B21995 /* Regex */,
@@ -945,7 +927,6 @@
 			isa = PBXNativeTarget;
 			buildConfigurationList = A77F2C882231FB4A001BD3F6 /* Build configuration list for PBXNativeTarget "RainbowPlanetTests" */;
 			buildPhases = (
-				8BCC01A4F8AF5F6F3A658797 /* [CP] Check Pods Manifest.lock */,
 				A77F2C6D2231FB4A001BD3F6 /* Sources */,
 				A77F2C6E2231FB4A001BD3F6 /* Frameworks */,
 				A77F2C6F2231FB4A001BD3F6 /* Resources */,
@@ -964,7 +945,6 @@
 			isa = PBXNativeTarget;
 			buildConfigurationList = A77F2C8B2231FB4A001BD3F6 /* Build configuration list for PBXNativeTarget "RainbowPlanetUITests" */;
 			buildPhases = (
-				606DDDCE02918D3494BB0F6D /* [CP] Check Pods Manifest.lock */,
 				A77F2C782231FB4A001BD3F6 /* Sources */,
 				A77F2C792231FB4A001BD3F6 /* Frameworks */,
 				A77F2C7A2231FB4A001BD3F6 /* Resources */,
@@ -1037,10 +1017,15 @@
 			buildActionMask = 2147483647;
 			files = (
 				A77F2CB82232010F001BD3F6 /* ShoppingCartViewController.xib in Resources */,
-				A72A73402232772900B21995 /* README.txt in Resources */,
-				A72A72ED22321E5200B21995 /* AlipaySDK.bundle in Resources */,
+				A7778C9E2243937300C7C47A /* RegisterLoginModule.xcassets in Resources */,
 				A77F2CB62232010F001BD3F6 /* MineViewController.xib in Resources */,
+				A7778C9722438F5D00C7C47A /* AlipaySDK.bundle in Resources */,
+				A7778CA4224393A900C7C47A /* CommonModule.xcassets in Resources */,
 				A77F2C682231FB4A001BD3F6 /* Assets.xcassets in Resources */,
+				A7778C9C2243934A00C7C47A /* MineModule.xcassets in Resources */,
+				A7778C9922438F5D00C7C47A /* README.txt in Resources */,
+				A7778CA22243939100C7C47A /* ShoppingMallModule.xcassets in Resources */,
+				A7778CA02243938200C7C47A /* ShoppingCartModule.xcassets in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1085,28 +1070,6 @@
 			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RainbowPlanet/Pods-RainbowPlanet-resources.sh\"\n";
 			showEnvVarsInLog = 0;
 		};
-		606DDDCE02918D3494BB0F6D /* [CP] Check Pods Manifest.lock */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputFileListPaths = (
-			);
-			inputPaths = (
-				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
-				"${PODS_ROOT}/Manifest.lock",
-			);
-			name = "[CP] Check Pods Manifest.lock";
-			outputFileListPaths = (
-			);
-			outputPaths = (
-				"$(DERIVED_FILE_DIR)/Pods-RainbowPlanetUITests-checkManifestLockResult.txt",
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
-			showEnvVarsInLog = 0;
-		};
 		696EB1DDE9DE019617B4DAD7 /* [CP] Embed Pods Frameworks */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
@@ -1187,28 +1150,6 @@
 			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RainbowPlanet/Pods-RainbowPlanet-frameworks.sh\"\n";
 			showEnvVarsInLog = 0;
 		};
-		8BCC01A4F8AF5F6F3A658797 /* [CP] Check Pods Manifest.lock */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputFileListPaths = (
-			);
-			inputPaths = (
-				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
-				"${PODS_ROOT}/Manifest.lock",
-			);
-			name = "[CP] Check Pods Manifest.lock";
-			outputFileListPaths = (
-			);
-			outputPaths = (
-				"$(DERIVED_FILE_DIR)/Pods-RainbowPlanetTests-checkManifestLockResult.txt",
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
-			showEnvVarsInLog = 0;
-		};
 		D3A9893FB9EA18608E79E053 /* [CP] Check Pods Manifest.lock */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
@@ -1248,10 +1189,10 @@
 				A77F2CC722320627001BD3F6 /* WRNavigationBar.swift in Sources */,
 				A72A72BE22321DE000B21995 /* Extension+RxTimer.swift in Sources */,
 				A72A72C422321DE000B21995 /* Extension+CAGradientLayer.swift in Sources */,
+				A7778CA72243A05400C7C47A /* IQKeyboardManagerSwiftManager.swift in Sources */,
 				A72A72B722321DE000B21995 /* Extension+NSMutableAttributedString.swift in Sources */,
 				A72A73392232688100B21995 /* AlipayOrderModel.swift in Sources */,
 				A72A72A322321DE000B21995 /* LBXScanView.swift in Sources */,
-				A72A730D2232207700B21995 /* AppDelegate+BaiduMap.swift in Sources */,
 				A7A97FDC2238FBAD0070F84D /* VerticalListCellCollectionViewCell.swift in Sources */,
 				A72A7386223396CB00B21995 /* SwiftMoyaNetWorkManager.swift in Sources */,
 				A77F2CCA223209F2001BD3F6 /* BaseTabbarViewController.swift in Sources */,
@@ -1259,7 +1200,6 @@
 				A72A726822321DBD00B21995 /* UMManager.swift in Sources */,
 				A77F2CB92232010F001BD3F6 /* ShoppingCartViewController.swift in Sources */,
 				A72A72B822321DE000B21995 /* Extension+UserDefaults.swift in Sources */,
-				A72A72C222321DE000B21995 /* UIBarButtonItem+SXCreate.m in Sources */,
 				A72A738D2233B2DE00B21995 /* ExtensionMethod.swift in Sources */,
 				A72A72A222321DE000B21995 /* LBXScanNetAnimation.swift in Sources */,
 				A72A72D322321E2700B21995 /* CacheMacro.swift in Sources */,
@@ -1280,7 +1220,6 @@
 				A72A72AF22321DE000B21995 /* AppInfo.swift in Sources */,
 				A72A72D422321E2700B21995 /* EnumMacro.swift in Sources */,
 				A775CC0322377C6500EBDCF8 /* EmptyView.swift in Sources */,
-				A72A72B322321DE000B21995 /* UIAlertController+BAKit.m in Sources */,
 				A72A72A922321DE000B21995 /* NumberKeyboard.swift in Sources */,
 				A72A72AA22321DE000B21995 /* Log.swift in Sources */,
 				A72A72B622321DE000B21995 /* Extension+NSRange.swift in Sources */,
@@ -1296,24 +1235,22 @@
 				A77F2CC822320627001BD3F6 /* WRCustomNavigationBar.swift in Sources */,
 				A72A72BC22321DE000B21995 /* Extension+UIAlertController.swift in Sources */,
 				A72A730C2232207700B21995 /* AppDelegate+UM.swift in Sources */,
-				A72A730F2232207700B21995 /* AppDelegate+IQKeyboardManagerSwift.swift in Sources */,
 				A72A72B122321DE000B21995 /* UIScrollView+MJRefreshEX.m in Sources */,
 				A7A97FDA2238FBAD0070F84D /* VerticalListSectionModel.swift in Sources */,
 				A72A72A522321DE000B21995 /* LBXScanLineAnimation.swift in Sources */,
 				A72A72C322321DE000B21995 /* Extension+Date.swift in Sources */,
-				A72A72B222321DE000B21995 /* NSObject+BARunTime.m in Sources */,
 				A72A73912233B55400B21995 /* Dog.swift in Sources */,
 				A775CBFE2237493600EBDCF8 /* ShoppingMallNavigationBarView.swift in Sources */,
 				A72A72C622321DE000B21995 /* WebView.swift in Sources */,
 				A72A72D122321E2700B21995 /* HTMLURLMacro.swift in Sources */,
 				A72A73162232481600B21995 /* WeChatpayManager.swift in Sources */,
+				A7778C8D22438A5200C7C47A /* AlertView.swift in Sources */,
 				A72A72D022321E2700B21995 /* FontMacro.swift in Sources */,
 				A77F2C982231FD25001BD3F6 /* BaseNavigationViewController.swift in Sources */,
 				A72A72AB22321DE000B21995 /* SwiftProgressHUD.swift in Sources */,
 				A77F2C612231FB49001BD3F6 /* AppDelegate.swift in Sources */,
 				A72A734322327DE300B21995 /* WeChatpayOrderModel.swift in Sources */,
 				A72A726722321DBD00B21995 /* LocationModel.swift in Sources */,
-				A72A72C122321DE000B21995 /* NSMutableAttributedString+BAKit.m in Sources */,
 				A72A72D222321E2700B21995 /* Common.swift in Sources */,
 				A72A72B522321DE000B21995 /* Extension+UITextView.swift in Sources */,
 				A72A733722325EED00B21995 /* AlipayResultModel.swift in Sources */,
@@ -1727,7 +1664,6 @@
 		};
 		A77F2C892231FB4A001BD3F6 /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 9D60C551769808F63D7376A8 /* Pods-RainbowPlanetTests.debug.xcconfig */;
 			buildSettings = {
 				ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
 				BUNDLE_LOADER = "$(TEST_HOST)";
@@ -1748,7 +1684,6 @@
 		};
 		A77F2C8A2231FB4A001BD3F6 /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = B1B8205A06E3602D2CF199C8 /* Pods-RainbowPlanetTests.release.xcconfig */;
 			buildSettings = {
 				ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
 				BUNDLE_LOADER = "$(TEST_HOST)";
@@ -1769,7 +1704,6 @@
 		};
 		A77F2C8C2231FB4A001BD3F6 /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = FD5011AB6141BA86DC737616 /* Pods-RainbowPlanetUITests.debug.xcconfig */;
 			buildSettings = {
 				ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
 				CODE_SIGN_STYLE = Automatic;
@@ -1789,7 +1723,6 @@
 		};
 		A77F2C8D2231FB4A001BD3F6 /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = CC787426207DCFB69B1A7CFE /* Pods-RainbowPlanetUITests.release.xcconfig */;
 			buildSettings = {
 				ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
 				CODE_SIGN_STYLE = Automatic;

+ 0 - 30
RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate+BaiduMap.swift

@@ -1,30 +0,0 @@
-//
-//  AppDelegate+BaiduMapKit.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2018/8/1.
-//  Copyright © 2018年 南鑫林. All rights reserved.
-//
-
-import Foundation
-
-
-extension AppDelegate {
-    func initBaiduMap() -> Void {
-        BMKLocationAuth.sharedInstance()?.checkPermision(withKey: kBaiduMapAppKey, authDelegate: self)
-    }
-}
-
-extension AppDelegate: BMKLocationAuthDelegate {
-
-    func onCheckPermissionState(_ iError: BMKLocationAuthErrorCode) {
-        if (0 == iError.rawValue) {
-            NXLLog("授权成功");
-        } else {
-            NXLLog("授权失败 \(iError)");
-            LocationModel.setLocationModel(locationModel: LocationModel.getLocationModel()!)
-
-        }
-    }
-}
-

+ 0 - 18
RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate+IQKeyboardManagerSwift.swift

@@ -1,18 +0,0 @@
-//
-//  AppDelegate+IQKeyboardManagerSwift.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2018/7/2.
-//  Copyright © 2018年 南鑫林. All rights reserved.
-//
-
-import UIKit
-import IQKeyboardManagerSwift
-
-extension AppDelegate {
-    func initIQKeyboard() {
-        IQKeyboardManager.shared.enable = true
-        IQKeyboardManager.shared.enableAutoToolbar = false
-        IQKeyboardManager.shared.shouldResignOnTouchOutside = true
-    }
-}

+ 3 - 3
RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate+UM.swift

@@ -15,7 +15,7 @@ extension AppDelegate {
     
     /// 友盟初始化
     func initUM(launchOptions:[UIApplication.LaunchOptionsKey: Any]?) -> Void {
-        
+
         //公共
         common()
         //推送
@@ -150,7 +150,7 @@ extension AppDelegate {
     func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
         //关闭友盟自带的弹出框
         UMessage.setAutoAlert(true)
-        if #available(iOS 8.0, *)  {
+        if #available(iOS 9.0, *)  {
             if #available(iOS 10.0, *){
             }else {
                 UMessage.didReceiveRemoteNotification(userInfo)
@@ -162,7 +162,7 @@ extension AppDelegate {
     func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) {
         //关闭友盟自带的弹出框
         UMessage.setAutoAlert(true)
-        if #available(iOS 8.0, *)  {
+        if #available(iOS 9.0, *)  {
             if #available(iOS 10.0, *){
             }else {
                 UMessage.didReceiveRemoteNotification(userInfo)

+ 2 - 2
RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate.swift

@@ -16,13 +16,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
 
     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         //初始化地图
-        initBaiduMap()
+        BaiduMapManager.shared().initBaiduMap()
         //初始化窗口
         initWindow()
         //初始化友盟
         initUM(launchOptions: launchOptions)
         //初始化键盘
-        initIQKeyboard()
+        IQKeyboardManagerSwiftManager.shared().initIQKeyboardManagerSwift()
         return true
     }
 

+ 25 - 8
RainbowPlanet/RainbowPlanet/Manager/BaiduMapManager/BaiduMapManager.swift

@@ -8,19 +8,23 @@
 
 import UIKit
 
-class BaiduMapManager: NSObject {
+public class BaiduMapManager: NSObject {
+
     private static let _sharedInstance = BaiduMapManager()
 
-    var completionBlock : BMKLocatingCompletionBlock?
-    typealias LocationModelBlock = (_ locationModel: LocationModel) -> Void
+    private override init() {} // 私有化init方法
 
-    class func getSharedInstance() -> BaiduMapManager {
+    class func shared() -> BaiduMapManager {
         return _sharedInstance
     }
 
-    private override init() {
+    var completionBlock : BMKLocatingCompletionBlock?
+    typealias LocationModelBlock = (_ locationModel: LocationModel) -> Void
+
 
-    } // 私有化init方法
+    public func initBaiduMap() -> Void {
+        BMKLocationAuth.sharedInstance()?.checkPermision(withKey: kBaiduMapAppKey, authDelegate: self)
+    }
     
     func initLocation(locationModelBlock:@escaping LocationModelBlock) -> Void {
         locationManager.requestLocation(withReGeocode: true, withNetworkState: true) { location, state, error in
@@ -68,13 +72,26 @@ class BaiduMapManager: NSObject {
 extension BaiduMapManager:BMKLocationManagerDelegate {
 
     ///  当定位发生错误时,会调用代理的此方法。
-    func bmkLocationManager(_ manager: BMKLocationManager, didFailWithError error: Error?) {
+    private func bmkLocationManager(_ manager: BMKLocationManager, didFailWithError error: Error?) {
         NXLLog("定位错误");
 
     }
 
     /// 定位权限状态改变时回调函数
-    func bmkLocationManager(_ manager: BMKLocationManager, didChange status: CLAuthorizationStatus) {
+    private func bmkLocationManager(_ manager: BMKLocationManager, didChange status: CLAuthorizationStatus) {
         NXLLog("定位权限改变时候的回调");
     }
 }
+
+extension BaiduMapManager: BMKLocationAuthDelegate {
+
+    private func onCheckPermissionState(_ iError: BMKLocationAuthErrorCode) {
+        if (0 == iError.rawValue) {
+            NXLLog("授权成功");
+        } else {
+            NXLLog("授权失败 \(iError)");
+            LocationModel.setLocationModel(locationModel: LocationModel.getLocationModel()!)
+
+        }
+    }
+}

+ 26 - 0
RainbowPlanet/RainbowPlanet/Manager/IQKeyboardManagerSwiftManager/IQKeyboardManagerSwiftManager.swift

@@ -0,0 +1,26 @@
+//
+//  IQKeyboardManagerSwiftManager.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/3/21.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+import IQKeyboardManagerSwift
+
+public class IQKeyboardManagerSwiftManager: NSObject {
+    private static let _sharedInstance = IQKeyboardManagerSwiftManager()
+
+    private override init() {} // 私有化init方法
+
+    class func shared() -> IQKeyboardManagerSwiftManager {
+        return _sharedInstance
+    }
+
+    func initIQKeyboardManagerSwift() {
+        IQKeyboardManager.shared.enable = true
+        IQKeyboardManager.shared.enableAutoToolbar = false
+        IQKeyboardManager.shared.shouldResignOnTouchOutside = true
+    }
+}

+ 1 - 2
RainbowPlanet/RainbowPlanet/Modules/MineModule/Mine/ViewController/MineViewController.swift

@@ -36,8 +36,7 @@ class MineViewController: BaseViewController {
 
     @IBAction func weixinLogin(_ sender: UIButton) {
 //        UMManager.shared().loginGetUserInfo(platformType: UMSocialPlatformType.sina)
-
-
+        
     }
 
     @IBAction func UMSharedAction(_ sender: UIButton) {

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallNavigationBarView.swift

@@ -121,7 +121,7 @@ class ShoppingMallNavigationBarView: BaseView {
         addressLabel.lineBreakMode = .byTruncatingTail
         addressLabel.numberOfLines = 1
         addressLabel.text = "正在定位"
-        BaiduMapManager.getSharedInstance().initLocation { (locationModel) in
+        BaiduMapManager.shared().initLocation { (locationModel) in
             addressLabel.text = locationModel.toString()
         }
         return addressLabel

+ 3 - 3
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/ApiMacro.swift

@@ -13,7 +13,7 @@ let kTestSever = false
 let kProductSever = false
 
 // MARK: - 数据服务器
-func kApiDataPrefix() -> String {
+public func kApiDataPrefix() -> String {
     if kDevelopSever /** 接口前缀-开发服务器*/ {
         return "" //办公室地址公网IP
     } else if kTestSever /** 接口前缀-测试服务器*/{
@@ -25,7 +25,7 @@ func kApiDataPrefix() -> String {
     }
 }
 // MARK: - 图片服务器
-let kApiPicPrefix = "http://app.jinhuayurun.com"
+public let kApiPicPrefix = "http://app.jinhuayurun.com"
 
 // MARK: - 获取secret值
-let kSecretApi = "/secret.do"
+public let kSecretApi = "/secret.do"

+ 0 - 46
RainbowPlanet/RainbowPlanet/Tools/AlertView/BAAlertController/BAAlertController.h

@@ -1,46 +0,0 @@
-//
-//  BAAlertController.h
-//  BAAlertController
-//
-//  Created by boai on 2017/6/5.
-//  Copyright © 2017年 boai. All rights reserved.
-//
-
-#ifndef BAAlertController_h
-#define BAAlertController_h
-
-#import "UIAlertController+BAKit.h"
-#import "NSObject+BARunTime.h"
-#import "NSMutableAttributedString+BAKit.h"
-
-/*!
- *********************************************************************************
- ************************************ 更新说明 ************************************
- *********************************************************************************
- 
- 欢迎使用 BAHome 系列开源代码 !
- 如有更多需求,请前往:https://github.com/BAHome
- 
- 项目源码地址:
- OC 版 :https://github.com/BAHome/BAAlertController
- 
- 最新更新时间:2017-06-24 【倒叙】<br>
- 最新Version:【Version:1.0.1】<br>
- 更新内容:<br>
- 1.0.0.1、更换方法名,原:ba_alert2ShowInViewController 替换为:ba_alertTextFieldShowInViewController<br>
- 
- 最新更新时间:2017-06-05 【倒叙】
- 最新Version:【Version:1.0.0】
- 更新内容:
- 1.0.0.1、普通的 UIAlertController-alert,可以自由设置按钮数量、按钮颜色
- 1.0.0.2、普通的 UIAlertController-alert,可以自由设置按钮数量、按钮颜色【多按钮样式,颜色数组和title数组个数不等】
- 1.0.0.3、普通的 带 textField 的 UIAlertController-alert,可添加一个或者多个 textField
- 1.0.0.4、NSMutableAttributedString 的UIAlertController-alert,可以自由设置 NSMutableAttributedString(title、message)按钮数量、按钮颜色
- 1.0.0.5、普通的 UIAlertController-actionSheet,可以自由设置按钮数量、按钮颜色
- 1.0.0.6、NSMutableAttributedString 的UIAlertController-actionSheet,可以自由设置 NSMutableAttributedString(title、message)按钮数量、按钮颜色
- 1.0.0.7、完美适配 iPhone 和 iPad 版本
- 1.0.0.8、理论完全兼容现有 iOS 8 以上系统版本
- 
- */
-
-#endif /* BAAlertController_h */

+ 0 - 108
RainbowPlanet/RainbowPlanet/Tools/AlertView/BAAlertController/NSObject+BARunTime.h

@@ -1,108 +0,0 @@
-
-/*!
- *  @header BAKit.h
- *          BABaseProject
- *
- *  @brief  BAKit
- *
- *  @author 博爱
- *  @copyright    Copyright © 2016年 博爱. All rights reserved.
- *  @version    V1.0
- */
-
-//                            _ooOoo_
-//                           o8888888o
-//                           88" . "88
-//                           (| -_- |)
-//                            O\ = /O
-//                        ____/`---'\____
-//                      .   ' \\| |// `.
-//                       / \\||| : |||// \
-//                     / _||||| -:- |||||- \
-//                       | | \\\ - /// | |
-//                     | \_| ''\---/'' | |
-//                      \ .-\__ `-` ___/-. /
-//                   ___`. .' /--.--\ `. . __
-//                ."" '< `.___\_<|>_/___.' >'"".
-//               | | : `- \`.;`\ _ /`;.`/ - ` : | |
-//                 \ \ `-. \_ __\ /__ _/ .-` / /
-//         ======`-.____`-.___\_____/___.-`____.-'======
-//                            `=---='
-//
-//         .............................................
-//                  佛祖镇楼                  BUG辟易
-//          佛曰:
-//                  写字楼里写字间,写字间里程序员;
-//                  程序人员写程序,又拿程序换酒钱。
-//                  酒醒只在网上坐,酒醉还来网下眠;
-//                  酒醉酒醒日复日,网上网下年复年。
-//                  但愿老死电脑间,不愿鞠躬老板前;
-//                  奔驰宝马贵者趣,公交自行程序员。
-//                  别人笑我忒疯癫,我笑自己命太贱;
-//                  不见满街漂亮妹,哪个归得程序员?
-
-/*
- 
- *********************************************************************************
- *
- * 在使用BAKit的过程中如果出现bug请及时以以下任意一种方式联系我,我会及时修复bug
- *
- * QQ     : 可以添加ios开发技术群 479663605 在这里找到我(博爱1616【137361770】)
- * 微博    : 博爱1616
- * Email  : 137361770@qq.com
- * GitHub : https://github.com/boai
- * 博客    : http://boaihome.com
- 
- *********************************************************************************
- 
- */
-
-/**
- *  - 添加运行时分类方法
- *  - 用于运行时动态获取当前类的属性列表、方法列表、成员变量列表、协议列表
- *  - 性能优化
- */
-#import <Foundation/Foundation.h>
-
-@interface NSObject (BARunTime)
-
-/**
- *  将 ‘字典数组‘ 转换成当前模型的对象数组
- *
- *  @param array 字典数组
- *
- *  @return 返回模型对象的数组
- */
-+ (NSArray *)ba_objectsWithArray:(NSArray *)array;
-
-/**
- *  返回当前类的所有属性列表
- *
- *  @return 属性名称
- */
-+ (NSArray *)ba_propertysList;
-
-/**
- *  返回当前类的所有成员变量数组
- *
- *  @return 当前类的所有成员变量! 
- *
- *  Tips:用于调试, 可以尝试查看所有不开源的类的ivar
- */
-+ (NSArray *)ba_ivarList;
-
-/**
- *  返回当前类的所有方法
- *
- *  @return 当前类的所有成员变量!
- */
-+ (NSArray *)ba_methodList;
-
-/**
- *  返回当前类的所有协议
- *
- *  @return 当前类的所有协议!
- */
-+ (NSArray *)ba_protocolList;
-
-@end

+ 0 - 268
RainbowPlanet/RainbowPlanet/Tools/AlertView/BAAlertController/NSObject+BARunTime.m

@@ -1,268 +0,0 @@
-
-/*!
- *  @header BAKit.h
- *          BABaseProject
- *
- *  @brief  BAKit
- *
- *  @author 博爱
- *  @copyright    Copyright © 2016年 博爱. All rights reserved.
- *  @version    V1.0
- */
-
-//                            _ooOoo_
-//                           o8888888o
-//                           88" . "88
-//                           (| -_- |)
-//                            O\ = /O
-//                        ____/`---'\____
-//                      .   ' \\| |// `.
-//                       / \\||| : |||// \
-//                     / _||||| -:- |||||- \
-//                       | | \\\ - /// | |
-//                     | \_| ''\---/'' | |
-//                      \ .-\__ `-` ___/-. /
-//                   ___`. .' /--.--\ `. . __
-//                ."" '< `.___\_<|>_/___.' >'"".
-//               | | : `- \`.;`\ _ /`;.`/ - ` : | |
-//                 \ \ `-. \_ __\ /__ _/ .-` / /
-//         ======`-.____`-.___\_____/___.-`____.-'======
-//                            `=---='
-//
-//         .............................................
-//                  佛祖镇楼                  BUG辟易
-//          佛曰:
-//                  写字楼里写字间,写字间里程序员;
-//                  程序人员写程序,又拿程序换酒钱。
-//                  酒醒只在网上坐,酒醉还来网下眠;
-//                  酒醉酒醒日复日,网上网下年复年。
-//                  但愿老死电脑间,不愿鞠躬老板前;
-//                  奔驰宝马贵者趣,公交自行程序员。
-//                  别人笑我忒疯癫,我笑自己命太贱;
-//                  不见满街漂亮妹,哪个归得程序员?
-
-/*
- 
- *********************************************************************************
- *
- * 在使用BAKit的过程中如果出现bug请及时以以下任意一种方式联系我,我会及时修复bug
- *
- * QQ     : 可以添加ios开发技术群 479663605 在这里找到我(博爱1616【137361770】)
- * 微博    : 博爱1616
- * Email  : 137361770@qq.com
- * GitHub : https://github.com/boai
- * 博客园  : http://www.cnblogs.com/boai/
- * 博客    : http://boai.github.io
- * 简书    : http://www.jianshu.com/users/95c9800fdf47/latest_articles
- * 简书专题 : http://www.jianshu.com/collection/072d578bf782
- 
- *********************************************************************************
- 
- */
-
-
-#import "NSObject+BARunTime.h"
-#import <objc/runtime.h>
-
-@implementation NSObject (BARunTime)
-
-#pragma mark - 根据传递进来的所有字典数组 字典转模型
-+ (NSArray *)ba_objectsWithArray:(NSArray *)array
-{
-    if (array.count == 0)
-    {
-        return nil;
-    }
-    
-    // 判断是否是字典数组
-    NSAssert([array[0] isKindOfClass:[NSDictionary class]], @"必须传入字典数组");
-    
-    // 获取属性列表数组
-    NSArray *propertyList = [self ba_propertysList];
-    
-    NSMutableArray *arrayM = [NSMutableArray array];
-  
-    for (NSDictionary *dict in array)
-    {
-        // 创建模型
-        id model = [self new];
-        
-        // 遍历数组
-        for (NSString *key in dict)
-        {
-            // 判断属性列表数组中是否包含当前key 如果有, 意味着属性存在
-            if ([propertyList containsObject:key]) {
-                // 字典转模型
-                [model setValue:dict[key] forKey:key];
-            }
-        }
-        // 添加到可变数组中
-        [arrayM addObject:model];
-    }
-    return arrayM.copy;
-}
-
-#pragma mark - 获取本类所有 ‘属性‘ 的数组
-/** 程序运行的时候动态的获取当前类的属性列表 
- *  程序运行的时候,类的属性不会变化
- */
-const void *ba_propertyListKey = @"ba_propertyListKey";
-+ (NSArray *)ba_propertysList
-{
-    NSArray *result = objc_getAssociatedObject(self, ba_propertyListKey);
-    
-    if (result != nil)
-    {
-        return result;
-    }
-    
-    NSMutableArray *arrayM = [NSMutableArray array];
-    // 获取当前类的属性数组
-    // count -> 属性的数量
-    unsigned int count = 0;
-   objc_property_t *list = class_copyPropertyList([self class], &count);
-    
-    for (unsigned int i = 0; i < count; i++) {
-        // 根据下标获取属性
-        objc_property_t property = list[i];
-        
-        // 获取属性的名字
-        const char *cName = property_getName(property);
-        
-        // 转换成OC字符串
-        NSString *name = [NSString stringWithUTF8String:cName];
-        [arrayM addObject:name];
-    }
-    
-    /*! ⚠️注意: 一定要释放数组 class_copyPropertyList底层为C语言,所以我们一定要记得释放properties */
-    free(list);
-    
-    // ---保存属性数组对象---
-    objc_setAssociatedObject(self, ba_propertyListKey, arrayM, OBJC_ASSOCIATION_COPY_NONATOMIC);
-    
-    return objc_getAssociatedObject(self, ba_propertyListKey);
-}
-
-#pragma mark - 获取本类所有 ‘方法‘ 的数组
-const void *ba_methodListKey = "ba_methodListKey";
-+ (NSArray *)ba_methodList
-{
-    // 1. 使用运行时动态添加属性
-    NSArray *methodsList = objc_getAssociatedObject(self, ba_methodListKey);
-    
-    // 2. 如果数组中直接返回方法数组
-    if (methodsList != nil)
-    {
-        return methodsList;
-    }
-    
-    // 3. 获取当前类的方法数组
-    unsigned int count = 0;
-    Method *list = class_copyMethodList([self class], &count);
-    
-    NSMutableArray *arrayM = [NSMutableArray array];
-    for (unsigned int i = 0; i < count; i++)
-    {
-        // 根据下标获取方法
-        Method method = list[i];
-        
-       SEL methodName = method_getName(method);
-        
-        NSString *methodName_OC = NSStringFromSelector(methodName);
-        
-//        IMP imp = method_getImplementation(method);
-        const char *name_s =sel_getName(method_getName(method));
-        int arguments = method_getNumberOfArguments(method);
-        const char* encoding =method_getTypeEncoding(method);
-        NSLog(@"方法名:%@,参数个数:%d,编码方式:%@",[NSString stringWithUTF8String:name_s],
-              arguments,
-              [NSString stringWithUTF8String:encoding]);
-        
-        [arrayM addObject:methodName_OC];
-    }
-    
-    // 4. 释放数组
-    free(list);
-    
-    // 5. 保存方法的数组对象
-    objc_setAssociatedObject(self, ba_methodListKey, arrayM, OBJC_ASSOCIATION_COPY_NONATOMIC);
-    
-    return objc_getAssociatedObject(self, ba_methodListKey);
-}
-
-
-#pragma mark - 获取本类所有 ‘成员变量‘ 的数组 <用来调试>
-/** 获取当前类的所有成员变量 */
-const char *ba_ivarListKey = "ba_ivarListKey";
-+ (NSArray *)ba_ivarList
-{
-   
-    // 1. 查询根据key 保存的成员变量数组
-    NSArray *ivarList = objc_getAssociatedObject(self, ba_ivarListKey);
-    
-    // 2. 判断数组中是否有值, 如果有直接返回
-    if (ivarList != nil)
-    {
-        return ivarList;
-    }
-    
-    // 3. 如果数组中没有, 则根据当前类,获取当前类的所有 ‘成员变量‘
-    unsigned int count = 0;
-    Ivar *ivars = class_copyIvarList([self class], &count);
-    
-    // 4. 遍历 成员变量 数组, 获取成员变量的名
-    NSMutableArray *arrayM = [NSMutableArray array];
-    for (unsigned int i = 0; i < count; i++) {
-        Ivar ivar = ivars[i];
-        // - C语言的字符串都是 ‘char *‘ 类型的
-        const char *ivarName_C = ivar_getName(ivar);
-        
-        // - 将 C语言的字符串 转换成 OC字符串
-        NSString *ivarName_OC = [NSString stringWithUTF8String:ivarName_C];
-        // - 将本类 ‘成员变量名‘ 添加到数组
-        [arrayM addObject:ivarName_OC];
-    }
-    
-    // 5. 释放ivars
-    free(ivars);
-    
-    // 6. 根据key 动态获取保存在关联对象中的数组
-    objc_setAssociatedObject(self, ba_ivarListKey, arrayM, OBJC_ASSOCIATION_COPY_NONATOMIC);
-    
-    return objc_getAssociatedObject(self, ba_ivarListKey);
-}
-
-#pragma mark - 获取本类所有 ‘协议‘ 的数组
-/** 用来获取动态保存在关联对象中的协议数组 |运行时的关联对象根据key动态取值| */
-const char *ba_protocolListKey = "ba_protocolListKey";
-
-+ (NSArray *)ba_protocolList {
-    NSArray *protocolList = objc_getAssociatedObject(self, ba_protocolListKey);
-    if (protocolList != nil)
-    {
-        return protocolList;
-    }
-    
-    unsigned int count = 0;
-    Protocol * __unsafe_unretained *protocolLists = class_copyProtocolList([self class], &count);
-    
-    NSMutableArray *arrayM = [NSMutableArray array];
-    for (unsigned int i = 0; i < count; i++) {
-        // 获取 协议名
-        Protocol *protocol = protocolLists[i];
-        const char *protocolName_C = protocol_getName(protocol);
-        NSString *protocolName_OC = [NSString stringWithUTF8String:protocolName_C];
-        
-        // 将 协议名 添加到数组
-        [arrayM addObject:protocolName_OC];
-    }
-    
-    // 释放数组
-    free(protocolLists);
-    // 将保存 协议的数组动态添加到 关联对象
-    objc_setAssociatedObject(self, ba_protocolListKey, arrayM, OBJC_ASSOCIATION_COPY_NONATOMIC);
-    
-    return objc_getAssociatedObject(self, ba_protocolListKey);
-}
-
-@end

+ 0 - 190
RainbowPlanet/RainbowPlanet/Tools/AlertView/BAAlertController/UIAlertController+BAKit.h

@@ -1,190 +0,0 @@
-
-/*!
- *  @header BAKit.h
- *          BABaseProject
- *
- *  @brief  BAKit
- *
- *  @author 博爱
- *  @copyright    Copyright © 2016年 博爱. All rights reserved.
- *  @version    V1.0
- */
-
-//                            _ooOoo_
-//                           o8888888o
-//                           88" . "88
-//                           (| -_- |)
-//                            O\ = /O
-//                        ____/`---'\____
-//                      .   ' \\| |// `.
-//                       / \\||| : |||// \
-//                     / _||||| -:- |||||- \
-//                       | | \\\ - /// | |
-//                     | \_| ''\---/'' | |
-//                      \ .-\__ `-` ___/-. /
-//                   ___`. .' /--.--\ `. . __
-//                ."" '< `.___\_<|>_/___.' >'"".
-//               | | : `- \`.;`\ _ /`;.`/ - ` : | |
-//                 \ \ `-. \_ __\ /__ _/ .-` / /
-//         ======`-.____`-.___\_____/___.-`____.-'======
-//                            `=---='
-//
-//         .............................................
-//                  佛祖镇楼                  BUG辟易
-//          佛曰:
-//                  写字楼里写字间,写字间里程序员;
-//                  程序人员写程序,又拿程序换酒钱。
-//                  酒醒只在网上坐,酒醉还来网下眠;
-//                  酒醉酒醒日复日,网上网下年复年。
-//                  但愿老死电脑间,不愿鞠躬老板前;
-//                  奔驰宝马贵者趣,公交自行程序员。
-//                  别人笑我忒疯癫,我笑自己命太贱;
-//                  不见满街漂亮妹,哪个归得程序员?
-
-/*
- 
- *********************************************************************************
- *
- * 在使用BAKit的过程中如果出现bug请及时以以下任意一种方式联系我,我会及时修复bug
- *
- * QQ     : 可以添加ios开发技术群 479663605 在这里找到我(博爱1616【137361770】)
- * 微博    : 博爱1616
- * Email  : 137361770@qq.com
- * GitHub : https://github.com/boai
- * 博客    : http://boaihome.com
- 
- *********************************************************************************
- 
- */
-
-#import <UIKit/UIKit.h>
-
-#if TARGET_OS_IOS
-typedef void (^UIAlertControllerPopoverPresentationControllerBlock) (UIPopoverPresentationController * __nonnull popover);
-#endif
-
-/**
- 按钮点击事件 block
-
- @param alertController alertController
- @param action UIAlertAction
- @param buttonIndex buttonIndex
- */
-typedef void (^BAKit_AlertControllerButtonActionBlock) (UIAlertController * __nonnull alertController, UIAlertAction * __nonnull action, NSInteger buttonIndex);
-
-/**
- textField 配置信息 block
-
- @param textField textField
- @param index index
- */
-typedef void (^BAKit_AlertControllerTextFieldConfigurationActionBlock)(UITextField * _Nullable textField, NSInteger index);
-
-@interface UIAlertController (BAKit)
-
-/**
- 快速创建一个系统 普通 UIAlertController-Alert
- 
- @param viewController 显示的VC
- @param title title
- @param message message
- @param buttonTitleArray 按钮数组
- @param buttonTitleColorArray 按钮颜色数组,默认:系统蓝色,如果颜色数组个数小于title数组个数,则全部为默认蓝色
- @param block block
- @return UIAlertController-Alert
- */
-+ (nonnull instancetype)ba_alertShowInViewController:(nonnull UIViewController *)viewController
-                                               title:(nullable NSString *)title
-                                             message:(nullable NSString *)message
-                                    buttonTitleArray:(nullable NSArray *)buttonTitleArray
-                               buttonTitleColorArray:(nullable NSArray <UIColor *>*)buttonTitleColorArray
-                                               block:(nullable BAKit_AlertControllerButtonActionBlock)block;
-
-/**
- 快速创建一个系统 普通 带 textField 的 UIAlertController-Alert
- 
- @param viewController 显示的VC
- @param title title
- @param message message
- @param buttonTitleArray 按钮数组
- @param buttonTitleColorArray 按钮颜色数组,默认:系统蓝色,如果颜色数组个数小于title数组个数,则全部为默认蓝色
- @param buttonEnabledNoWithTitleArray 初始化的时候按钮为 EnabledNo 状态 的 title 数组
- @param textFieldPlaceholderArray textFieldPlaceholderArray 需要添加的 textField placeholder 数组
- @param textFieldConfigurationActionBlock textField 配置信息 block
- @param block block
- @return 普通 带 textField 的 UIAlertController-Alert
- */
-+ (nonnull instancetype)ba_alertTextFieldShowInViewController:(nonnull UIViewController *)viewController
-                                                        title:(nullable NSString *)title
-                                                      message:(nullable NSString *)message
-                                             buttonTitleArray:(nullable NSArray *)buttonTitleArray
-                                        buttonTitleColorArray:(nullable NSArray <UIColor *> *)buttonTitleColorArray
-                                buttonEnabledNoWithTitleArray:(NSArray <NSString *> *_Nullable)buttonEnabledNoWithTitleArray
-                                    textFieldPlaceholderArray:(NSArray <NSString *> *_Nullable)textFieldPlaceholderArray
-                            textFieldConfigurationActionBlock:(nullable BAKit_AlertControllerTextFieldConfigurationActionBlock)textFieldConfigurationActionBlock
-                                                        block:(nullable BAKit_AlertControllerButtonActionBlock)block;
-
-/**
- 快速创建一个系统 attributedTitle UIAlertController-Alert
- 
- @param viewController 显示的VC
- @param attributedTitle attributedTitle
- @param attributedMessage attributedMessage
- @param buttonTitleArray 按钮数组
- @param buttonTitleColorArray 按钮颜色数组,默认:系统蓝色,如果颜色数组个数小于title数组个数,则全部为默认蓝色
- @param block block
- @return UIAlertController-Alert
- */
-+ (nonnull instancetype)ba_alertAttributedShowInViewController:(nonnull UIViewController *)viewController
-                                               attributedTitle:(nullable NSMutableAttributedString *)attributedTitle
-                                             attributedMessage:(nullable NSMutableAttributedString *)attributedMessage
-                                              buttonTitleArray:(nullable NSArray *)buttonTitleArray
-                                         buttonTitleColorArray:(nullable NSArray <UIColor *>*)buttonTitleColorArray
-                                                         block:(nullable BAKit_AlertControllerButtonActionBlock)block;
-
-
-/**
- 快速创建一个系统 普通 UIAlertController-ActionSheet
- 
- @param viewController 显示的VC
- @param title title
- @param message message
- @param buttonTitleArray 按钮数组
- @param buttonTitleColorArray 按钮颜色数组,默认:系统蓝色,如果颜色数组个数小于title数组个数,则全部为默认蓝色
- @param popoverPresentationControllerBlock popoverPresentationControllerBlock description
- @param block block
- @return UIAlertController-ActionSheet
- */
-+ (nonnull instancetype)ba_actionSheetShowInViewController:(nonnull UIViewController *)viewController
-                                                                title:(nullable NSString *)title
-                                                                  message:(nullable NSString *)message
-                                                        buttonTitleArray:(nullable NSArray *)buttonTitleArray
-                                                    buttonTitleColorArray:(nullable NSArray <UIColor *>*)buttonTitleColorArray
-#if TARGET_OS_IOS
-                                       popoverPresentationControllerBlock:(nullable UIAlertControllerPopoverPresentationControllerBlock)popoverPresentationControllerBlock
-#endif
-                                                                block:(nullable BAKit_AlertControllerButtonActionBlock)block;
-
-/**
- 快速创建一个系统 attributedTitle UIAlertController-ActionSheet
- 
- @param viewController 显示的VC
- @param attributedTitle attributedTitle
- @param attributedMessage attributedMessage
- @param buttonTitleArray 按钮数组
- @param buttonTitleColorArray 按钮颜色数组,默认:系统蓝色,如果颜色数组个数小于title数组个数,则全部为默认蓝色
- @param popoverPresentationControllerBlock popoverPresentationControllerBlock description
- @param block block
- @return UIAlertController-ActionSheet
- */
-+ (nonnull instancetype)ba_actionSheetAttributedShowInViewController:(nonnull UIViewController *)viewController
-                                                     attributedTitle:(nullable NSMutableAttributedString *)attributedTitle
-                                                   attributedMessage:(nullable NSMutableAttributedString *)attributedMessage
-                                                    buttonTitleArray:(nullable NSArray *)buttonTitleArray
-                                               buttonTitleColorArray:(nullable NSArray <UIColor *>*)buttonTitleColorArray
-#if TARGET_OS_IOS
-                                  popoverPresentationControllerBlock:(nullable UIAlertControllerPopoverPresentationControllerBlock)popoverPresentationControllerBlock
-#endif
-                                                               block:(nullable BAKit_AlertControllerButtonActionBlock)block;
-
-@end

+ 0 - 377
RainbowPlanet/RainbowPlanet/Tools/AlertView/BAAlertController/UIAlertController+BAKit.m

@@ -1,377 +0,0 @@
-
-//
-//  BAAlertController.h
-//  BAAlertController
-//
-//  Created by boai on 2017/6/5.
-//  Copyright © 2017年 boai. All rights reserved.
-//
-
-#import "UIAlertController+BAKit.h"
-#import <Foundation/Foundation.h>
-#import "NSObject+BARunTime.h"
-
-#import "BAAlertController.h"
-
-@interface UIViewController (BAKit)
-
-- (UIViewController *)ba_currentViewController;
-
-@end
-
-@implementation UIAlertController (BAKit)
-
-
-/**
- 快速创建一个系统 普通 UIAlertController-Alert
- 
- @param viewController 显示的VC
- @param title title
- @param message message
- @param buttonTitleArray 按钮数组
- @param buttonTitleColorArray 按钮颜色数组,默认:系统蓝色,如果颜色数组个数小于title数组个数,则全部为默认蓝色
- @param block block
- @return UIAlertController-Alert
- */
-+ (nonnull instancetype)ba_alertShowInViewController:(nonnull UIViewController *)viewController
-                                               title:(nullable NSString *)title
-                                             message:(nullable NSString *)message
-                                    buttonTitleArray:(nullable NSArray *)buttonTitleArray
-                               buttonTitleColorArray:(nullable NSArray <UIColor *>*)buttonTitleColorArray
-                                               block:(nullable BAKit_AlertControllerButtonActionBlock)block
-{
-    return [self ba_alertControllerShowInViewController:viewController
-                                                  title:title
-                                        attributedTitle:nil
-                                                message:message
-                                      attributedMessage:nil
-                                         preferredStyle:UIAlertControllerStyleAlert
-                                       buttonTitleArray:buttonTitleArray
-                                  buttonTitleColorArray:buttonTitleColorArray
-                          buttonEnabledNoWithTitleArray:nil
-                              textFieldPlaceholderArray:nil
-                      textFieldConfigurationActionBlock:nil
-#if TARGET_OS_IOS
-                     popoverPresentationControllerBlock:nil
-#endif
-                                                  block:block];
-}
-
-/**
- 快速创建一个系统 普通 带 textField 的 UIAlertController-Alert
- 
- @param viewController 显示的VC
- @param title title
- @param message message
- @param buttonTitleArray 按钮数组
- @param buttonTitleColorArray 按钮颜色数组,默认:系统蓝色,如果颜色数组个数小于title数组个数,则全部为默认蓝色
- @param buttonEnabledNoWithTitleArray 初始化的时候按钮为 EnabledNo 状态 的 title 数组
- @param textFieldPlaceholderArray textFieldPlaceholderArray 需要添加的 textField placeholder 数组
- @param textFieldConfigurationActionBlock textField 配置信息 block
- @param block block
- @return 普通 带 textField 的 UIAlertController-Alert
- */
-+ (nonnull instancetype)ba_alertTextFieldShowInViewController:(nonnull UIViewController *)viewController
-                                                        title:(nullable NSString *)title
-                                                      message:(nullable NSString *)message
-                                             buttonTitleArray:(nullable NSArray *)buttonTitleArray
-                                        buttonTitleColorArray:(nullable NSArray <UIColor *> *)buttonTitleColorArray
-                                buttonEnabledNoWithTitleArray:(NSArray <NSString *> *_Nullable)buttonEnabledNoWithTitleArray
-                                    textFieldPlaceholderArray:(NSArray <NSString *> *_Nullable)textFieldPlaceholderArray
-                            textFieldConfigurationActionBlock:(nullable BAKit_AlertControllerTextFieldConfigurationActionBlock)textFieldConfigurationActionBlock
-                                                        block:(nullable BAKit_AlertControllerButtonActionBlock)block
-{
-    return [self ba_alertControllerShowInViewController:viewController
-                                                  title:title
-                                        attributedTitle:nil
-                                                message:message
-                                      attributedMessage:nil
-                                         preferredStyle:UIAlertControllerStyleAlert
-                                       buttonTitleArray:buttonTitleArray
-                                  buttonTitleColorArray:buttonTitleColorArray
-                          buttonEnabledNoWithTitleArray:buttonEnabledNoWithTitleArray
-                              textFieldPlaceholderArray:textFieldPlaceholderArray
-                      textFieldConfigurationActionBlock:textFieldConfigurationActionBlock
-#if TARGET_OS_IOS
-                     popoverPresentationControllerBlock:nil
-#endif
-                                                  block:block];
-}
-
-/**
- 快速创建一个系统 attributedTitle UIAlertController-Alert
- 
- @param viewController 显示的VC
- @param attributedTitle attributedTitle
- @param attributedMessage attributedMessage
- @param buttonTitleArray 按钮数组
- @param buttonTitleColorArray 按钮颜色数组,默认:系统蓝色,如果颜色数组个数小于title数组个数,则全部为默认蓝色
- @param block block
- @return UIAlertController-Alert
- */
-+ (nonnull instancetype)ba_alertAttributedShowInViewController:(nonnull UIViewController *)viewController
-                                               attributedTitle:(nullable NSMutableAttributedString *)attributedTitle
-                                             attributedMessage:(nullable NSMutableAttributedString *)attributedMessage
-                                              buttonTitleArray:(nullable NSArray *)buttonTitleArray
-                                         buttonTitleColorArray:(nullable NSArray <UIColor *>*)buttonTitleColorArray
-                                                         block:(nullable BAKit_AlertControllerButtonActionBlock)block
-{
-    return [self ba_alertControllerShowInViewController:viewController
-                                                  title:nil
-                                        attributedTitle:attributedTitle
-                                                message:nil
-                                      attributedMessage:attributedMessage
-                                         preferredStyle:UIAlertControllerStyleAlert
-                                       buttonTitleArray:buttonTitleArray
-                                  buttonTitleColorArray:buttonTitleColorArray
-                          buttonEnabledNoWithTitleArray:nil
-                              textFieldPlaceholderArray:nil
-                      textFieldConfigurationActionBlock:nil
-#if TARGET_OS_IOS
-                     popoverPresentationControllerBlock:nil
-#endif
-                                                  block:block];
-}
-
-
-/**
- 快速创建一个系统 普通 UIAlertController-ActionSheet
- 
- @param viewController 显示的VC
- @param title title
- @param message message
- @param buttonTitleArray 按钮数组
- @param buttonTitleColorArray 按钮颜色数组,默认:系统蓝色,如果颜色数组个数小于title数组个数,则全部为默认蓝色
- @param popoverPresentationControllerBlock popoverPresentationControllerBlock description
- @param block block
- @return UIAlertController-ActionSheet
- */
-+ (nonnull instancetype)ba_actionSheetShowInViewController:(nonnull UIViewController *)viewController
-                                                     title:(nullable NSString *)title
-                                                   message:(nullable NSString *)message
-                                          buttonTitleArray:(nullable NSArray *)buttonTitleArray
-                                     buttonTitleColorArray:(nullable NSArray <UIColor *>*)buttonTitleColorArray
-#if TARGET_OS_IOS
-                        popoverPresentationControllerBlock:(nullable UIAlertControllerPopoverPresentationControllerBlock)popoverPresentationControllerBlock
-#endif
-                                                     block:(nullable BAKit_AlertControllerButtonActionBlock)block
-{
-    return [self ba_alertControllerShowInViewController:viewController
-                                                  title:title
-                                        attributedTitle:nil
-                                                message:message
-                                      attributedMessage:nil
-                                         preferredStyle:UIAlertControllerStyleActionSheet
-                                       buttonTitleArray:buttonTitleArray
-                                  buttonTitleColorArray:buttonTitleColorArray
-                          buttonEnabledNoWithTitleArray:nil
-                              textFieldPlaceholderArray:nil
-                      textFieldConfigurationActionBlock:nil
-#if TARGET_OS_IOS
-                     popoverPresentationControllerBlock:popoverPresentationControllerBlock
-#endif
-                                                  block:block];
-}
-
-/**
- 快速创建一个系统 attributedTitle UIAlertController-ActionSheet
- 
- @param viewController 显示的VC
- @param attributedTitle attributedTitle
- @param attributedMessage attributedMessage
- @param buttonTitleArray 按钮数组
- @param buttonTitleColorArray 按钮颜色数组,默认:系统蓝色,如果颜色数组个数小于title数组个数,则全部为默认蓝色
- @param popoverPresentationControllerBlock popoverPresentationControllerBlock description
- @param block block
- @return UIAlertController-ActionSheet
- */
-+ (nonnull instancetype)ba_actionSheetAttributedShowInViewController:(nonnull UIViewController *)viewController
-                                                     attributedTitle:(nullable NSMutableAttributedString *)attributedTitle
-                                                   attributedMessage:(nullable NSMutableAttributedString *)attributedMessage
-                                                    buttonTitleArray:(nullable NSArray *)buttonTitleArray
-                                               buttonTitleColorArray:(nullable NSArray <UIColor *>*)buttonTitleColorArray
-#if TARGET_OS_IOS
-                                  popoverPresentationControllerBlock:(nullable UIAlertControllerPopoverPresentationControllerBlock)popoverPresentationControllerBlock
-#endif
-                                                               block:(nullable BAKit_AlertControllerButtonActionBlock)block
-{
-    return [self ba_alertControllerShowInViewController:viewController
-                                                  title:nil
-                                        attributedTitle:attributedTitle
-                                                message:nil
-                                      attributedMessage:attributedMessage
-                                         preferredStyle:UIAlertControllerStyleActionSheet
-                                       buttonTitleArray:buttonTitleArray
-                                  buttonTitleColorArray:buttonTitleColorArray
-                          buttonEnabledNoWithTitleArray:nil
-                              textFieldPlaceholderArray:nil
-                      textFieldConfigurationActionBlock:nil
-#if TARGET_OS_IOS
-                     popoverPresentationControllerBlock:popoverPresentationControllerBlock
-#endif
-                                                  block:block];
-}
-
-
-+ (instancetype)ba_alertControllerShowInViewController:(UIViewController *)viewController
-                                                 title:(NSString *)title
-                                       attributedTitle:(nullable NSMutableAttributedString *)attributedTitle
-                                               message:(NSString *)message
-                                     attributedMessage:(nullable NSMutableAttributedString *)attributedMessage
-                                        preferredStyle:(UIAlertControllerStyle)preferredStyle
-                                      buttonTitleArray:(nullable NSArray *)buttonTitleArray
-                                 buttonTitleColorArray:(nullable NSArray <UIColor *>*)buttonTitleColorArray
-                         buttonEnabledNoWithTitleArray:(NSArray <NSString *> *_Nullable)buttonEnabledNoWithTitleArray
-                             textFieldPlaceholderArray:(NSArray <NSString *> *_Nullable)textFieldPlaceholderArray
-                     textFieldConfigurationActionBlock:(nullable BAKit_AlertControllerTextFieldConfigurationActionBlock)textFieldConfigurationActionBlock
-#if TARGET_OS_IOS
-                    popoverPresentationControllerBlock:(void(^)(UIPopoverPresentationController *popover))popoverPresentationControllerBlock
-#endif
-                                                 block:(BAKit_AlertControllerButtonActionBlock)block
-{
-    UIAlertController *strongController = [self alertControllerWithTitle:title
-                                                                 message:message
-                                                          preferredStyle:preferredStyle];
-    
-    __weak UIAlertController *alertController = strongController;
-    
-    if (buttonTitleArray)
-    {
-        for (NSUInteger i = 0; i < buttonTitleArray.count; i++)
-        {
-            NSString *buttonTitle = buttonTitleArray[i];
-            
-            UIAlertAction *action = [UIAlertAction actionWithTitle:buttonTitle
-                                                             style:UIAlertActionStyleDefault
-                                                           handler:^(UIAlertAction *action){
-                                                                    if (block)
-                                                                    {
-                                                                        block(alertController, action, i);
-                                                                    }
-                                                                }];
-            [alertController addAction:action];
-            
-            for (NSInteger j = 0; j < buttonEnabledNoWithTitleArray.count; j ++)
-            {
-                if ([buttonEnabledNoWithTitleArray[j] isEqualToString:buttonTitle])
-                {
-                    action.enabled = NO;
-                }
-            }
-            
-            if (!buttonTitleColorArray || buttonTitleColorArray.count == 0 ||
-                buttonTitleColorArray.count < buttonTitleArray.count)
-            {
-                NSMutableArray *mutArr = [NSMutableArray array];
-                for (NSInteger i = 0; i < buttonTitleArray.count; i ++)
-                {
-                    [mutArr addObject:[UIColor colorWithRed:45.0f/255.0f green:148.0f/255.0f blue:238.0f/255.0f alpha:1.0f]];
-                }
-                buttonTitleColorArray = [mutArr mutableCopy];
-            }
-            if (buttonTitleColorArray)
-            {
-                [strongController setAlertWithAlert:strongController
-                             mutableAttributedTitle:attributedTitle
-                           mutableAttributedMessage:attributedMessage
-                                             Action:action
-                                   buttonTitleColor:buttonTitleColorArray[i]];
-            }
-        }
-    }
-    if (textFieldPlaceholderArray)
-    {
-        for (NSInteger i = 0; i < textFieldPlaceholderArray.count; i++)
-        {
-            [alertController addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {
-                
-                textField.placeholder = textFieldPlaceholderArray[i];
-                if (textFieldConfigurationActionBlock)
-                {
-                    textFieldConfigurationActionBlock(textField, i);
-                }
-            }];
-        }
-    }
-    
-    if (preferredStyle == UIAlertControllerStyleActionSheet)
-    {
-        UIAlertAction *action = [UIAlertAction actionWithTitle:@"取消"
-                                                         style:UIAlertActionStyleCancel
-                                                       handler:nil];
-        //修改按钮
-        [action setValue:[UIColor colorWithRed:51.0f/255.0f green:51.0f/255.0f blue:51.0f/255.0f alpha:1.0f] forKey:@"titleTextColor"];
-        [alertController addAction:action];
-    }
-    
-#if TARGET_OS_IOS
-    if (popoverPresentationControllerBlock)
-    {
-        popoverPresentationControllerBlock(alertController.popoverPresentationController);
-    }
-#endif
-    
-    [viewController.ba_currentViewController presentViewController:alertController animated:YES completion:nil];
-    
-    return alertController;
-}
-
-#pragma mark - setter / getter
-
-- (void)setAlertWithAlert:(UIAlertController * __nonnull )alert
-   mutableAttributedTitle:(NSMutableAttributedString *)mutableAttributedTitle
- mutableAttributedMessage:(nullable NSMutableAttributedString *)mutableAttributedMessage
-                   Action:(UIAlertAction * __nonnull )action
-         buttonTitleColor:(UIColor *)buttonTitleColor
-{
-    /*! 1、首先获得对应的属性 */
-//    NSArray *propertysListArray = [[UIAlertController class] ba_propertysList];
-//    NSLog(@"1、获取【UIAlertController】所有的属性名:%@", propertysListArray);
-    
-    /*! 2、获得成员变量 */
-    NSArray *ivarListArray = [[UIAlertAction class] ba_ivarList];
-//    NSLog(@"2、获取【UIAlertController】所有的成员变量:%@", ivarListArray);
-    
-    for (NSInteger i = 0; i < ivarListArray.count; i++)
-    {
-        NSString *ivarName = ivarListArray[i];
-        if ([ivarName isEqualToString:@"_titleTextColor"])
-        {
-            [action setValue:buttonTitleColor forKey:@"titleTextColor"];
-        }
-    }
-    
-    /*! 3、改变显示提示字体颜色 */
-    NSArray *propertysListArray2 = [[UIAlertController class] ba_ivarList];
-//    NSLog(@"3、获取【UIAlertController】所有的成员变量:%@", propertysListArray2);
-    for (NSInteger i = 0; i < propertysListArray2.count; i++)
-    {
-        NSString *ivarName = propertysListArray2[i];
-        if ([ivarName isEqualToString:@"_attributedTitle"])
-        {
-            [alert setValue:mutableAttributedTitle forKey:@"attributedTitle"];
-        }
-        if ([ivarName isEqualToString:@"_attributedMessage"])
-        {
-            [alert setValue:mutableAttributedMessage forKey:@"attributedMessage"];
-        }
-    }
-}
-
-@end
-
-@implementation UIViewController (BAKit)
-
-- (UIViewController *)ba_currentViewController
-{
-    UIViewController *topVC = self;
-    
-    UIViewController *above;
-    while ((above = topVC.presentedViewController)) {
-        topVC = above;
-    }
-    
-    return topVC;
-}
-
-@end

+ 2 - 3
RainbowPlanet/RainbowPlanet/Tools/AppInfo/AppInfo.swift

@@ -30,15 +30,15 @@ struct  AppInfo {
 
     static let localizedModel = UIDevice.current.localizedModel  //设备区域化型号
 
-
     /// 获取app唯一标识(uuid+keychain 生成设备唯一标识)
     static var uuid :String {
         get {
             let service = Bundle.main.bundleIdentifier! // app名称
             let account = Bundle.main.bundleIdentifier! // 账号
-            let keychain = Keychain(service: service)
 
+            let keychain = Keychain(service: service)
             var uuid = keychain[account]
+
             if uuid == nil {
                 do {
                     try keychain.synchronizable(true).set(String(describing: UIDevice.current.identifierForVendor!) , key: account)
@@ -48,7 +48,6 @@ struct  AppInfo {
                 uuid = keychain[account]
                 return uuid!
             }else {
-                print(uuid!)
                 NXLLog(uuid!)
                 return uuid!
             }

+ 151 - 177
RainbowPlanet/RainbowPlanet/Tools/Extension/Extension+NSMutableAttributedString.swift

@@ -9,201 +9,175 @@
 import UIKit
 
 extension NSMutableAttributedString {
-    
-    /// 选中字体颜色变红
-    ///
-    /// - Parameters:
-    ///   - text: 所有字符串
-    ///   - selectedText: 需要变颜色的字符串
-    ///   - allColor: 字符串本来颜色
-    ///   - selectedColor: 选中字符串颜色
-    ///   - fone: 字符串字体大小
-    /// - Returns: 返回一个NSMutableAttributedString
-    static func attributenStringColor(text:String,
-                                      selectedText: String,
-                                      allColor: UIColor,
-                                      selectedColor: UIColor,
-                                      fone: CGFloat)->NSMutableAttributedString{
-        var rangeArray: [NSRange] = [NSRange]()
-        var lastLength: Int = 0
-        let attStr = NSMutableAttributedString.init(string: text, attributes: [NSAttributedString.Key.font : UIFont.systemFont(ofSize: fone),NSAttributedString.Key.foregroundColor:allColor])
-        var text = text as NSString
-        
-        while text.contains(selectedText) {
-            let rang: NSRange =  text.range(of: selectedText)
-            let rang2 = NSMakeRange(rang.location + lastLength, rang.length)
-            rangeArray.append(rang2)
-            lastLength += (rang.length + rang.location )
-            text = text.substring(from: rang.length + rang.location) as NSString
+    // MARK: 完全自定义样式
+    public func changeAttributeDict(_ dict: [AnyHashable : Any]?, range: NSRange) {
+        if let dict = dict as? [NSAttributedString.Key : Any] {
+            addAttributes(dict, range: range)
         }
-        
-        for range1 in rangeArray {
-            attStr.setAttributes([NSAttributedString.Key.foregroundColor:selectedColor], range: range1)
-        }
-        
-        return attStr
     }
-    /// 设置不同的字体大小不同的颜色
-    ///
-    /// - Parameters:
-    ///   - alltext: 所有的字符串
-    ///   - selectedText: 选中的字符串
-    ///   - allColor: 所有的颜色
-    ///   - selectedColor: 选中的颜色
-    ///   - allfone: 所有的字体
-    ///   - selectedfone: 选择中的字体
-    /// - Returns: 属性
-    static func attributenStringColor(alltext:String,
-                                      selectedText: String,
-                                      allColor: UIColor,
-                                      selectedColor: UIColor,
-                                      allfone: UIFont,
-                                      selectedfone: UIFont)->NSMutableAttributedString{
-        var rangeArray: [NSRange] = [NSRange]()
-        var lastLength: Int = 0
-        let attStr = NSMutableAttributedString.init(string: alltext, attributes: [NSAttributedString.Key.font : allfone,NSAttributedString.Key.foregroundColor:allColor])
-        var text = alltext as NSString
-
-        while text.contains(selectedText) {
-            let rang: NSRange =  text.range(of: selectedText)
-            let rang2 = NSMakeRange(rang.location + lastLength, rang.length)
-            rangeArray.append(rang2)
-            lastLength += (rang.length + rang.location )
-            text = text.substring(from: rang.length + rang.location) as NSString
-        }
 
-        for range1 in rangeArray {
-            attStr.setAttributes([NSAttributedString.Key.font : selectedfone,NSAttributedString.Key.foregroundColor:selectedColor], range: range1)
-        }
+    // MARK: 设置字体颜色,取值为 UIColor,默认为黑色
+    public func changeForegroundColor(_ color: UIColor?, range: NSRange) {
+        addAttribute(.foregroundColor, value: color!, range: range)
+    }
 
-        return attStr
+    // MARK: 设置字体所在区域背景颜色,取值为 UIColor对象,默认值为nil, 透明色
+    //#warning NSForegroundColorAttributeName 和 NSBackgroundColorAttributeName 的低位是相等的,跟前面介绍的 textColor 一样,哪个属性最后一次赋值,就会冲掉前面的效果
+    public func changeBackgroundColor(_ color: UIColor?, range: NSRange) {
+        addAttribute(.backgroundColor, value: color!, range: range)
     }
 
-    
-    /// 指定两个字符中间文字变色
-    ///
-    /// - Parameters:
-    ///   - text: 所有字符串
-    ///   - allColor: 基础颜色
-    ///   - selectedColor: 特殊颜色
-    ///   - firstStr: 其实字符串
-    ///   - lastStr: 结束字符串
-    ///   - fone: 基础字体
-    /// - Returns: NSMutableAttributedString
-    static func attributenStringMutColor(text:String,
-                                         allColor: UIColor,
-                                         selectedColor: UIColor,
-                                         firstStr : String,
-                                         lastStr : String,
-                                         fone: CGFloat)->NSMutableAttributedString{
-        
-        var rangeArray: [NSRange] = [NSRange]()
-        var lastLength: Int = 0
-        let attStr = NSMutableAttributedString.init(string: text, attributes: [NSAttributedString.Key.font : UIFont.systemFont(ofSize: fone),NSAttributedString.Key.foregroundColor:allColor])
-        var text = text as NSString
-        
-        while text.contains(firstStr) {
-            let rang1: NSRange =  text.range(of: firstStr)
-            let range2: NSRange =  text.range(of: lastStr)
-            let orangeRange = NSMakeRange(rang1.location + 1, range2.location - (rang1.location + 1))
-            let range = NSMakeRange(rang1.location + 1 + lastLength , range2.location - (rang1.location + 1) )
-            rangeArray.append(range)
-            lastLength += (orangeRange.length + orangeRange.location + 1)
-            text = text.substring(from: orangeRange.length + orangeRange.location + 1) as NSString
-        }
-        
-        for range1 in rangeArray {
-            attStr.setAttributes([NSAttributedString.Key.foregroundColor:UIColor.red], range: range1)
-        }
-        
-        return attStr
+    // MARK: 改变某位置 设置字体属性,默认值:字体:Helvetica(Neue) 字号:12
+    public func changeSystemFont(_ font: UIFont?, range: NSRange) {
+        addAttribute(.font, value: font!, range: range)
+    }
+
+    // MARK: 设置字形倾斜度,取值为 NSNumber(float),正值右倾,负值左倾
+    public func changeObliquenessValue(_ value: NSNumber?, range: NSRange) {
+        addAttribute(.obliqueness, value: value!, range: range)
+    }
+
+    // MARK: NSVerticalGlyphFormAttributeName  设置文字排版方向,取值为 NSNumber 对象(整数),0 表示横排文本,1 表示竖排文本 在 iOS 中,总是使用横排文本,0 以外的值都未定义
+    public func changeVerticalGlyphFormValue(_ value: NSNumber?, range: NSRange) {
+        addAttribute(.verticalGlyphForm, value: value!, range: range)
+    }
+
+    // MARK: NSWritingDirectionAttributeName 设置文字书写方向,从左向右书写或者从右向左书写
+    public func changeWritingDirectionStyle(_ style: NSWritingDirection) {
+        addAttribute(.writingDirection, value: [NSWritingDirection.rightToLeft], range: NSRange(location: 0, length: length))
+    }
+
+    // MARK: 改变某位置的行距
+    public func changeLineSpacing(_ spacing: CGFloat, from loc: Int, length: Int) {
+        let range = NSRange(location: loc, length: length)
+        let style = NSMutableParagraphStyle()
+        // 行距
+        style.lineSpacing = spacing
+        addAttribute(.paragraphStyle, value: style, range: range)
     }
-    
-    
-    /// 行间距
+
+    // MARK: 改变某位置的段落距离
+    public func changeParagraphSpacing(_ spacing: CGFloat, from loc: Int, length: Int) {
+        let range = NSRange(location: loc, length: length)
+        let style = NSMutableParagraphStyle()
+        // 段落距离
+        style.paragraphSpacing = spacing
+        addAttribute(.paragraphStyle, value: style, range: range)
+    }
+
+    // MARK: 改变段落的顶部和文本内容的开头之间的距离
+    public func change(beforeLparagraphSpacing spacing: CGFloat, from loc: Int, length: Int) {
+        let range = NSRange(location: loc, length: length)
+        let style = NSMutableParagraphStyle()
+        // 段落的顶部和文本内容的开头之间的距离
+        style.paragraphSpacingBefore = spacing
+        addAttribute(.paragraphStyle, value: style, range: range)
+    }
+
+    // MARK: 设置下划线样式:根据枚举选择
+    public func change(_ style: NSUnderlineStyle, color: UIColor?, range: NSRange) {
+        addAttribute(.underlineStyle, value: style, range: range)
+        addAttribute(.underlineColor, value: color ?? "", range: range)
+    }
+
+    // MARK: 全部加下划线 设置下划线样式:根据枚举选择
+    public func changeUnderline(atAllStyle style: NSUnderlineStyle, color: UIColor?) {
+        let range = NSRange(location: 0, length: length)
+        change(style, color: color, range: range)
+    }
+
+    // MARK: 设置删除线样式:根据枚举选择
+    public func changeStrikethroughStyle(_ style: NSUnderlineStyle, color: UIColor?, range: NSRange) {
+        addAttribute(.strikethroughStyle, value: style, range: range)
+        addAttribute(.strikethroughColor, value: color ?? "", range: range)
+    }
+
+    // MARK: 全部添加删除线 设置删除线样式:根据枚举选择
+    public func changeStrikethrough(atAllStyle style: NSUnderlineStyle, color: UIColor?) {
+        let range = NSRange(location: 0, length: length)
+        changeStrikethroughStyle(style, color: color, range: range)
+    }
+
+    // MARK: 设定字符间距,取值为 NSNumber 对象(整数),正值间距加宽,负值间距变窄
+    public func changeKern(withValue value: NSNumber?, range: NSRange) {
+        addAttribute(.kern, value: value ?? "", range: range)
+    }
+
+    // MARK: 根据位置设置文本横向拉伸属性,取值为 NSNumber (float),正值横向拉伸文本,负值横向压缩文本
+    public func changeExpansion(withValue value: NSNumber?, range: NSRange) {
+        addAttribute(.expansion, value: value ?? "", range: range)
+    }
+
+    // MARK: 根据位置添加阴影效果
+    public func changeShadow(with shadow: NSShadow?, range: NSRange) {
+        addAttribute(.shadow, value: shadow ?? "", range: range)
+        // 排版
+        addAttribute(.verticalGlyphForm, value: NSNumber(value: 0), range: range)
+    }
+
+    // MARK: 根据位置修改描边颜色 垂直标志符号形式
+    public func changeStrokeColor(with strokeColor: UIColor?, strokeWidth: NSNumber?, range: NSRange) {
+        addAttribute(.strokeColor, value: strokeColor ?? "", range: range)
+        addAttribute(.strokeWidth, value: strokeWidth ?? "", range: range)
+    }
+
+
+    /// 实例化 NSMutableAttributedString 字符串
     ///
     /// - Parameters:
-    ///   - text: 整体字符串
-    ///   - lineSpace: 行间距
-    ///   - fone: 字图
+    ///   - texts: 用于存储所需设置字符串的数组(根据所需自定义类型分组)
+    ///   - attrsArray: 富文本属性样式的集合(数组元素是texts的相应文本的属性--字典)
+    ///   - space: texts文本之间的间距数组 1 代表一个空格的距离
     /// - Returns: NSMutableAttributedString
-    static func lineSpace(text: String,lineSpace: CGFloat,fone: UIFont)->NSMutableAttributedString{
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.lineSpacing = lineSpace
-        let attStr = NSMutableAttributedString.init(string: text, attributes: [NSAttributedString.Key.font : fone])
-        attStr.addAttributes([NSAttributedString.Key.paragraphStyle : paragraphStyle], range: NSMakeRange(0, text.count))
-        
-        return attStr
-    }
-    
-    
-    /// 可变字体
+    public convenience init(strings texts: [String]?, attributesArray attrsArray: [[String : Any?]]?, space: [NSNumber]?)  {
+        self.init()
+        go(texts, attributesArray: attrsArray, space: space)
+    }
+
+
+    /// 实例化 NSMutableAttributedString 字符串
     ///
     /// - Parameters:
-    ///   - text: 整体字符串
-    ///   - selectedText: 选中字符串
-    ///   - allFont: 基础字体
-    ///   - selectedFont: 变化字体
-    ///   - textColor: 字符串颜色
+    ///   - texts: 用于存储所需设置字符串的数组(根据所需自定义类型分组)
+    ///   - attrsArray: 富文本属性样式的集合(数组元素是texts的相应文本的属性--字典)
+    ///   - space: texts文本之间的间距数组 1 代表一个空格的距离
     /// - Returns: NSMutableAttributedString
-    static func attributenStringFont(text:String,
-                                     selectedText: String,
-                                     allFont: CGFloat,
-                                     selectedFont: CGFloat,
-                                     textColor: UIColor)->NSMutableAttributedString{
-        var rangeArray: [NSRange] = [NSRange]()
-        var lastLength: Int = 0
-        let attStr = NSMutableAttributedString.init(string: text, attributes: [NSAttributedString.Key.font : UIFont.systemFont(ofSize: allFont),NSAttributedString.Key.foregroundColor:textColor])
-        var text = text as NSString
-        
-        while text.contains(selectedText) {
-            let rang: NSRange =  text.range(of: selectedText)
-            let rang2 = NSMakeRange(rang.location + lastLength, rang.length)
-            rangeArray.append(rang2)
-            lastLength += (rang.length + rang.location )
-            text = text.substring(from: rang.length + rang.location) as NSString
-        }
-        
-        for range1 in rangeArray {
-            //NSForegroundColorAttributeName:UIColor.red 去掉后就没特殊颜色了
-            attStr.setAttributes([NSAttributedString.Key.font : UIFont.systemFont(ofSize: selectedFont)], range: range1)
-        }
-        
-        return attStr
+    public func go(_ textArray: [Any]?, attributesArray attrsArray: [Any]?, space: [NSNumber]?) {
+
+        (textArray as NSArray?)?.enumerateObjects({[weak self] obj, idx, stop in
+            let attrsCount: Int? = attrsArray?.count
+            if idx <= ((attrsCount ?? 0) - 1) {
+                self?.append(NSAttributedString(string: obj as? String ?? "", attributes: attrsArray?[(attrsCount ?? 0) - 1] as? [NSAttributedString.Key : Any]))
+            } else {
+                self?.append(NSAttributedString(string: obj as? String ?? "", attributes: attrsArray?[(attrsCount ?? 0) - 1] as? [NSAttributedString.Key : Any]))
+            }
+
+            if idx != (textArray?.count ?? 0) - 1 && idx <= (space?.count ?? 0) - 1 {
+                if let space = self?.spaceWidth(withNumberBlackSpace: space?[idx]) {
+                    self?.append(space)
+                }
+            } else {
+                if let space = self?.spaceWidth(withNumberBlackSpace: nil) {
+                    self?.append(space)
+                }
+            }
+        })
     }
 
-    /// 可变字体
+
+    /// 字间距
     ///
-    /// - Parameters:
-    ///   - text: 整体字符串
-    ///   - selectedText: 选中字符串
-    ///   - allFont: 基础字体
-    ///   - selectedFont: 变化字体
-    ///   - textColor: 字符串颜色
+    /// - Parameter number: 空格
     /// - Returns: NSMutableAttributedString
-    static func attributenStringFont(text:String,
-                                     selectedText: String,
-                                     allFont: UIFont,
-                                     selectedFont: UIFont,
-                                     textColor: UIColor)->NSMutableAttributedString{
-        var rangeArray: [NSRange] = [NSRange]()
-        var lastLength: Int = 0
-        let attStr = NSMutableAttributedString.init(string: text, attributes: [NSAttributedString.Key.font : allFont,NSAttributedString.Key.foregroundColor:textColor])
-        var text = text as NSString
-
-        while text.contains(selectedText) {
-            let rang: NSRange =  text.range(of: selectedText)
-            let rang2 = NSMakeRange(rang.location + lastLength, rang.length)
-            rangeArray.append(rang2)
-            lastLength += (rang.length + rang.location )
-            text = text.substring(from: rang.length + rang.location) as NSString
+    public func spaceWidth(withNumberBlackSpace number: NSNumber?) -> NSMutableAttributedString? {
+        var string = ""
+        let count: Int = number?.intValue ?? 0
+        for _ in 0..<count {
+            string = string + (" ")
         }
+        let attributedString = NSMutableAttributedString(string: string)
+        return attributedString
+    }
 
-        for range1 in rangeArray {
-            //NSForegroundColorAttributeName:UIColor.red 去掉后就没特殊颜色了
-            attStr.setAttributes([NSAttributedString.Key.font : selectedFont], range: range1)
-        }
 
-        return attStr
-    }
 }

+ 0 - 145
RainbowPlanet/RainbowPlanet/Tools/Extension/NSMutableAttributedString+BAKit.h

@@ -1,145 +0,0 @@
-
-/*!
- *  @header BAKit.h
- *          BABaseProject
- *
- *  @brief  BAKit
- *
- *  @author 博爱
- *  @copyright    Copyright © 2016年 博爱. All rights reserved.
- *  @version    V1.0
- */
-
-//                            _ooOoo_
-//                           o8888888o
-//                           88" . "88
-//                           (| -_- |)
-//                            O\ = /O
-//                        ____/`---'\____
-//                      .   ' \\| |// `.
-//                       / \\||| : |||// \
-//                     / _||||| -:- |||||- \
-//                       | | \\\ - /// | |
-//                     | \_| ''\---/'' | |
-//                      \ .-\__ `-` ___/-. /
-//                   ___`. .' /--.--\ `. . __
-//                ."" '< `.___\_<|>_/___.' >'"".
-//               | | : `- \`.;`\ _ /`;.`/ - ` : | |
-//                 \ \ `-. \_ __\ /__ _/ .-` / /
-//         ======`-.____`-.___\_____/___.-`____.-'======
-//                            `=---='
-//
-//         .............................................
-//                  佛祖镇楼                  BUG辟易
-//          佛曰:
-//                  写字楼里写字间,写字间里程序员;
-//                  程序人员写程序,又拿程序换酒钱。
-//                  酒醒只在网上坐,酒醉还来网下眠;
-//                  酒醉酒醒日复日,网上网下年复年。
-//                  但愿老死电脑间,不愿鞠躬老板前;
-//                  奔驰宝马贵者趣,公交自行程序员。
-//                  别人笑我忒疯癫,我笑自己命太贱;
-//                  不见满街漂亮妹,哪个归得程序员?
-
-/*
- 
- *********************************************************************************
- *
- * 在使用BAKit的过程中如果出现bug请及时以以下任意一种方式联系我,我会及时修复bug
- *
- * QQ     : 可以添加ios开发技术群 479663605 在这里找到我(博爱1616【137361770】)
- * 微博    : 博爱1616
- * Email  : 137361770@qq.com
- * GitHub : https://github.com/boai
- * 博客    : http://boaihome.com
- 
- *********************************************************************************
- 
- */
-
-
-#import <Foundation/Foundation.h>
-#import <UIKit/UIKit.h>
-
-@interface NSMutableAttributedString (BAKit)
-#pragma mark - *****  富文本处理 类
-
-/*! 完全自定义样式 */
-- (void)ba_changeAttributeDict:(NSDictionary *)dict range:(NSRange)range;
-
-/*! 改变某位置的颜色 */
-- (void)ba_changeColor:(UIColor *)color range:(NSRange)range;
-
-/*! 设置字体所在区域背景颜色,取值为 UIColor对象,默认值为nil, 透明色 */
-- (void)ba_changeBackgroundColor:(UIColor *)color range:(NSRange)range;
-
-///*! 设置连体属性,取值为NSNumber 对象(整数),0 表示没有连体字符,1 表示使用默认的连体字符,  //  2 表示使用所有连体符号,默认值为 1(iOS 不支持 2) */
-//- (void)ba_changeLigatureWithValue:(int)value range:(NSRange)range;
-
-/*! 改变某位置的普通字号 */
-- (void)ba_changeSystemFont:(UIFont *)font range:(NSRange)range;
-
-/*! 设置字形倾斜度,取值为 NSNumber(float),正值右倾,负值左倾   */
-- (void)ba_changeObliquenessValue:(NSNumber *)value range:(NSRange)range;
-
-/*! 设置文字排版方向,取值为 NSNumber 对象(整数),0 表示横排文本,1 表示竖排文本 */
-- (void)ba_changeVerticalGlyphFormValue:(NSNumber *)value range:(NSRange)range;
-
-/*! 设置文字书写方向,从左向右书写或者从右向左书写 */
-- (void)ba_changeWritingDirectionStyle:(NSWritingDirection)style;
-
-/*! 改变某位置的行距 */
-- (void)ba_changeLineSpacing:(CGFloat)spacing
-                        from:(NSInteger)loc
-                       length:(NSInteger)length;
-
-/*! 改变某位置的段落距离 */
-- (void)ba_changeParagraphSpacing:(CGFloat)spacing
-                              from:(NSInteger)loc
-                             length:(NSInteger)length;
-
-/*! 改变段的顶部和文本内容的开头之间的距离 */
-- (void)ba_changeBeforeLparagraphSpacing:(CGFloat)spacing
-                                   from:(NSInteger)loc
-                                  length:(NSInteger)length;
-
-/*! 设置下划线样式:根据枚举选择 */
-- (void)ba_changeUnderlineStyle:(NSUnderlineStyle)style color:(UIColor *)color Range:(NSRange)range;
-/*! 全部加下划线 设置下划线样式:根据枚举选择 */
-- (void)ba_changeUnderlineAtAllStyle:(NSUnderlineStyle)style color:(UIColor *)color;
-
-/*! 设置删除线样式:根据枚举选择 */
-- (void)ba_changeStrikethroughStyle:(NSUnderlineStyle)style color:(UIColor *)color Range:(NSRange)range;
-/*! 全部添加删除线 设置删除线样式:根据枚举选择 */
-- (void)ba_changeStrikethroughAtAllStyle:(NSUnderlineStyle)style color:(UIColor *)color;
-
-/*! 设定字符间距,取值为 NSNumber 对象(整数),正值间距加宽,负值间距变窄  */
-- (void)ba_changeKernWithValue:(NSNumber *)value Range:(NSRange)range;
-
-/*! 根据位置设置文本横向拉伸属性,取值为 NSNumber (float),正值横向拉伸文本,负值横向压缩文本 */
-- (void)ba_changeExpansionWithValue:(NSNumber *)value Range:(NSRange)range;
-#pragma mark
-
-/*! 根据位置添加阴影效果 */
-- (void)ba_changeShadowWithShadow:(NSShadow *)shadow Range:(NSRange)range;
-
-/*! 根据位置修改描边颜色 */
-- (void)ba_changeStrokeColorWithColor:(UIColor *)strokeColor
-                             strokeWidth:(NSNumber *)strokeWidth
-                                   Range:(NSRange)range;
-
-/*!
- *
- *   实例化 NSMutableAttributedString 字符串
- *
- *  @param texts      用于存储所需设置字符串的数组(根据所需自定义类型分组)
- *  @param attrsArray 富文本属性样式的集合(数组元素是texts的相应文本的属性--字典)
- *  @param space      texts文本之间的间距数组 1 代表一个空格的距离
- *
- *  @return NSMutableAttributedString实例
- */
-- (instancetype)initWithStrings:(NSArray <NSString *>*)texts
-                attributesArray:(NSArray <NSDictionary<NSString *,id>*>*)attrsArray
-                      space:(NSArray <NSNumber *>*)space;
-
-@end

+ 0 - 264
RainbowPlanet/RainbowPlanet/Tools/Extension/NSMutableAttributedString+BAKit.m

@@ -1,264 +0,0 @@
-
-/*!
- *  @header BAKit.h
- *          BABaseProject
- *
- *  @brief  BAKit
- *
- *  @author 博爱
- *  @copyright    Copyright © 2016年 博爱. All rights reserved.
- *  @version    V1.0
- */
-
-//                            _ooOoo_
-//                           o8888888o
-//                           88" . "88
-//                           (| -_- |)
-//                            O\ = /O
-//                        ____/`---'\____
-//                      .   ' \\| |// `.
-//                       / \\||| : |||// \
-//                     / _||||| -:- |||||- \
-//                       | | \\\ - /// | |
-//                     | \_| ''\---/'' | |
-//                      \ .-\__ `-` ___/-. /
-//                   ___`. .' /--.--\ `. . __
-//                ."" '< `.___\_<|>_/___.' >'"".
-//               | | : `- \`.;`\ _ /`;.`/ - ` : | |
-//                 \ \ `-. \_ __\ /__ _/ .-` / /
-//         ======`-.____`-.___\_____/___.-`____.-'======
-//                            `=---='
-//
-//         .............................................
-//                  佛祖镇楼                  BUG辟易
-//          佛曰:
-//                  写字楼里写字间,写字间里程序员;
-//                  程序人员写程序,又拿程序换酒钱。
-//                  酒醒只在网上坐,酒醉还来网下眠;
-//                  酒醉酒醒日复日,网上网下年复年。
-//                  但愿老死电脑间,不愿鞠躬老板前;
-//                  奔驰宝马贵者趣,公交自行程序员。
-//                  别人笑我忒疯癫,我笑自己命太贱;
-//                  不见满街漂亮妹,哪个归得程序员?
-
-/*
- 
- *********************************************************************************
- *
- * 在使用BAKit的过程中如果出现bug请及时以以下任意一种方式联系我,我会及时修复bug
- *
- * QQ     : 可以添加ios开发技术群 479663605 在这里找到我(博爱1616【137361770】)
- * 微博    : 博爱1616
- * Email  : 137361770@qq.com
- * GitHub : https://github.com/boai
- * 博客园  : http://www.cnblogs.com/boai/
- * 博客    : http://boaihome.com
- * 简书    : http://www.jianshu.com/users/95c9800fdf47/latest_articles
- * 简书专题 : http://www.jianshu.com/collection/072d578bf782
- 
- *********************************************************************************
- 
- */
-
-
-#import "NSMutableAttributedString+BAKit.h"
-
-@implementation NSMutableAttributedString (BAKit)
-
-#pragma mark 完全自定义样式
-- (void)ba_changeAttributeDict:(NSDictionary *)dict range:(NSRange)range
-{
-    [self addAttributes:dict range:range];
-}
-
-#pragma mark 设置字体颜色,取值为 UIColor,默认为黑色
-- (void)ba_changeColor:(UIColor *)color range:(NSRange)range
-{
-    [self addAttribute:NSForegroundColorAttributeName value:color range:range];
-}
-
-#pragma mark 设置字体所在区域背景颜色,取值为 UIColor对象,默认值为nil, 透明色
-//#warning NSForegroundColorAttributeName 和 NSBackgroundColorAttributeName 的低位是相等的,跟前面介绍的 textColor 一样,哪个属性最后一次赋值,就会冲掉前面的效果
-- (void)ba_changeBackgroundColor:(UIColor *)color range:(NSRange)range
-{
-    [self addAttribute:NSBackgroundColorAttributeName value:color range:range];
-}
-
-//#pragma mark 设置连体属性,取值为NSNumber 对象(整数),0 表示没有连体字符,1 表示使用默认的连体字符,  //  2 表示使用所有连体符号,默认值为 1(iOS 不支持 2)
-//- (void)ba_changeLigatureWithValue:(int)value range:(NSRange)range
-//{
-//    [self addAttribute:NSLigatureAttributeName value:[NSNumber numberWithInt: value] range:range];
-//    // return range;
-//}
-
-#pragma mark 改变某位置 设置字体属性,默认值:字体:Helvetica(Neue) 字号:12
-- (void)ba_changeSystemFont:(UIFont *)font range:(NSRange)range
-{
-    [self addAttribute:NSFontAttributeName value:font range:range];
-}
-
-#pragma mark 设置字形倾斜度,取值为 NSNumber(float),正值右倾,负值左倾
-- (void)ba_changeObliquenessValue:(NSNumber *)value range:(NSRange)range
-{
-    [self addAttribute:NSObliquenessAttributeName value:value range:range];
-}
-
-#pragma mark NSVerticalGlyphFormAttributeName  设置文字排版方向,取值为 NSNumber 对象(整数),0 表示横排文本,1 表示竖排文本 在 iOS 中,总是使用横排文本,0 以外的值都未定义
-- (void)ba_changeVerticalGlyphFormValue:(NSNumber *)value range:(NSRange)range
-{
-    [self addAttribute:NSVerticalGlyphFormAttributeName value:value range:range];
-}
-
-#pragma mark NSWritingDirectionAttributeName 设置文字书写方向,从左向右书写或者从右向左书写
-- (void)ba_changeWritingDirectionStyle:(NSWritingDirection)style
-{
-    [self addAttribute:NSWritingDirectionAttributeName value:@[@(NSWritingDirectionRightToLeft)] range:NSMakeRange(0, self.length)];
-}
-
-#pragma mark 改变某位置的行距
-- (void)ba_changeLineSpacing:(CGFloat)spacing
-                           from:(NSInteger)loc
-                          length:(NSInteger)length
-{
-    NSRange range = NSMakeRange(loc, length);
-    NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
-    /*! 行距 */
-    style.lineSpacing = spacing;
-    [self addAttribute:NSParagraphStyleAttributeName value:style range:range];
-}
-
-/*! 改变某位置的段落距离 */
-- (void)ba_changeParagraphSpacing:(CGFloat)spacing
-                                 from:(NSInteger)loc
-                                length:(NSInteger)length
-{
-    NSRange range = NSMakeRange(loc, length);
-    NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
-    /*! 段落距离 */
-    style.paragraphSpacing = spacing;
-    [self addAttribute:NSParagraphStyleAttributeName value:style range:range];
-}
-
-#pragma mark 改变段落的顶部和文本内容的开头之间的距离
-- (void)ba_changeBeforeLparagraphSpacing:(CGFloat)spacing
-                                      from:(NSInteger)loc
-                                     length:(NSInteger)length
-{
-    NSRange range = NSMakeRange(loc, length);
-    NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
-    /*! 段落的顶部和文本内容的开头之间的距离 */
-    style.paragraphSpacingBefore = spacing;
-    [self addAttribute:NSParagraphStyleAttributeName value:style range:range];
-}
-
-#pragma mark 设置下划线样式:根据枚举选择
-- (void)ba_changeUnderlineStyle:(NSUnderlineStyle)style color:(UIColor *)color Range:(NSRange)range
-{
-    [self addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:style] range:range];
-    [self addAttribute:NSUnderlineColorAttributeName value:color range:range];
-}
-
-#pragma mark 全部加下划线 设置下划线样式:根据枚举选择
-- (void)ba_changeUnderlineAtAllStyle:(NSUnderlineStyle)style color:(UIColor *)color
-{
-    NSRange range = NSMakeRange(0, self.length);
-    [self ba_changeUnderlineStyle:style color:color Range:range];
-}
-
-#pragma mark 设置删除线样式:根据枚举选择
-- (void)ba_changeStrikethroughStyle:(NSUnderlineStyle)style color:(UIColor *)color Range:(NSRange)range
-{
-    [self addAttribute:NSStrikethroughStyleAttributeName value:[NSNumber numberWithInteger:style] range:range];
-    [self addAttribute:NSStrikethroughColorAttributeName value:color range:range];
-}
-
-#pragma mark 全部添加删除线 设置删除线样式:根据枚举选择
-- (void)ba_changeStrikethroughAtAllStyle:(NSUnderlineStyle)style color:(UIColor *)color
-{
-    NSRange range = NSMakeRange(0, self.length);
-    [self ba_changeStrikethroughStyle:style color:color Range:range];
-}
-
-#pragma mark 设定字符间距,取值为 NSNumber 对象(整数),正值间距加宽,负值间距变窄 
-- (void)ba_changeKernWithValue:(NSNumber *)value Range:(NSRange)range
-{
-    [self addAttribute:NSKernAttributeName value:value range:range];
-}
-
-#pragma mark 根据位置设置文本横向拉伸属性,取值为 NSNumber (float),正值横向拉伸文本,负值横向压缩文本
-- (void)ba_changeExpansionWithValue:(NSNumber *)value Range:(NSRange)range
-{
-    [self addAttribute:NSExpansionAttributeName value:value range:range];
-}
-
-#pragma mark 根据位置添加阴影效果
-- (void)ba_changeShadowWithShadow:(NSShadow *)shadow Range:(NSRange)range
-{
-    [self addAttribute:NSShadowAttributeName value:shadow range:range];
-    /*! 排版 */
-    [self addAttribute:NSVerticalGlyphFormAttributeName value:@(0) range:range];
-}
-
-#pragma mark 根据位置修改描边颜色 垂直标志符号形式
-- (void)ba_changeStrokeColorWithColor:(UIColor *)strokeColor
-                             strokeWidth:(NSNumber *)strokeWidth
-                                   Range:(NSRange)range
-{
-    [self addAttribute:NSStrokeColorAttributeName value:strokeColor range:range];
-    [self addAttribute:NSStrokeWidthAttributeName value:strokeWidth range:range];
-}
-
-- (instancetype)initWithStrings:(NSArray <NSString *>*)texts
-                attributesArray:(NSArray <NSDictionary<NSString *,id>*>*)attrsArray
-                          space:(NSArray <NSNumber *>*)space
-{
-    if (self = [super init])
-    {
-        
-    }
-    return [self go:texts andAttributesArray:attrsArray space:space];
-}
-
-- (instancetype)go:(NSArray *)textArray andAttributesArray:(NSArray *)attrsArray space:(NSArray<NSNumber *> *)space
-{
-    __block NSMutableAttributedString *string = [[NSMutableAttributedString alloc]init];
-    
-    __weak typeof(self)weakSelf = self;
-    [textArray enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
-        __strong typeof(weakSelf) strongSelf = weakSelf;
-        NSUInteger attrsCount = attrsArray.count;
-        if (idx <= (attrsCount-1) )
-        {
-            [string appendAttributedString:[strongSelf initWithString:obj attributes:attrsArray[idx]]];
-        }
-        else
-        {
-            [string appendAttributedString:[strongSelf initWithString:obj attributes:attrsArray[attrsCount-1]]];
-        }
-        
-        if (idx != textArray.count-1 && idx <= space.count-1)
-        {
-            [string appendAttributedString:[self spaceWidthWithNumberBlackSpace:space[idx]]];
-        }
-        else
-        {
-            [string appendAttributedString:[self spaceWidthWithNumberBlackSpace:0]];
-        }
-    }];
-    
-    return string;
-}
-
-- (NSMutableAttributedString *)spaceWidthWithNumberBlackSpace:(NSNumber *)number
-{
-    NSString *string = @"";
-    NSUInteger count = [number integerValue];
-    for (NSUInteger i = 0;i < count ; i++)
-    {
-        string = [string stringByAppendingFormat:@" "];
-    }
-    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc]initWithString:string];
-    return attributedString;
-}
-
-@end

+ 0 - 99
RainbowPlanet/RainbowPlanet/Tools/Extension/UIBarButtonItem+SXCreate.h

@@ -1,99 +0,0 @@
-//
-//  UIBarButtonItem+SXCreate.h
-//  UINavigation-SXFixSpace
-//
-//  Created by charles on 2017/9/8.
-//  Copyright © 2017年 None. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@interface UIBarButtonItem (SXCreate)
-
-/**
- 根据图片生成UIBarButtonItem
- 
- @param target target对象
- @param action 响应方法
- @param image image
- @return 生成的UIBarButtonItem
- */
-+(UIBarButtonItem *)itemWithTarget:(id)target action:(SEL)action image:(UIImage *)image;
-/**
- 根据图片生成UIBarButtonItem
- 
- @param target target对象
- @param action 响应方法
- @param image image
- @param imageEdgeInsets 图片偏移
- @return 生成的UIBarButtonItem
- */
-+(UIBarButtonItem *)itemWithTarget:(id)target action:(SEL)action image:(UIImage *)image imageEdgeInsets:(UIEdgeInsets)imageEdgeInsets;
-
-/**
- 根据图片生成UIBarButtonItem
-
- @param target target对象
- @param action 响应方法
- @param nomalImage nomalImage
- @param higeLightedImage higeLightedImage
- @param imageEdgeInsets 图片偏移
- @return 生成的UIBarButtonItem
- */
-+(UIBarButtonItem *)itemWithTarget:(id)target
-                            action:(SEL)action
-                        nomalImage:(UIImage *)nomalImage
-                  higeLightedImage:(UIImage *)higeLightedImage
-                   imageEdgeInsets:(UIEdgeInsets)imageEdgeInsets;
-
-
-/**
- 根据文字生成UIBarButtonItem
-
- @param target target对象
- @param action 响应方法
- @param title title
- */
-+(UIBarButtonItem *)itemWithTarget:(id)target action:(SEL)action title:(NSString *)title;
-
-/**
- 根据文字生成UIBarButtonItem
- 
- @param target target对象
- @param action 响应方法
- @param title title
- @param titleEdgeInsets 文字偏移
- @return 生成的UIBarButtonItem
- */
-+(UIBarButtonItem *)itemWithTarget:(id)target action:(SEL)action title:(NSString *)title titleEdgeInsets:(UIEdgeInsets)titleEdgeInsets;
-
-/**
- 根据文字生成UIBarButtonItem
-
- @param target target对象
- @param action 响应方法
- @param title title
- @param font font
- @param titleColor 字体颜色
- @param highlightedColor 高亮颜色
- @param titleEdgeInsets 文字偏移
- @return 生成的UIBarButtonItem
- */
-+(UIBarButtonItem *)itemWithTarget:(id)target
-                            action:(SEL)action
-                             title:(NSString *)title
-                              font:(UIFont *)font
-                        titleColor:(UIColor *)titleColor
-                  highlightedColor:(UIColor *)highlightedColor
-                   titleEdgeInsets:(UIEdgeInsets)titleEdgeInsets;
-
-
-/**
- 用作修正位置的UIBarButtonItem
-
- @param width 修正宽度
- @return 修正位置的UIBarButtonItem
- */
-+(UIBarButtonItem *)fixedSpaceWithWidth:(CGFloat)width;
-
-@end

+ 0 - 92
RainbowPlanet/RainbowPlanet/Tools/Extension/UIBarButtonItem+SXCreate.m

@@ -1,92 +0,0 @@
-//
-//  UIBarButtonItem+SXCreate.m
-//  UINavigation-SXFixSpace
-//
-//  Created by charles on 2017/9/8.
-//  Copyright © 2017年 None. All rights reserved.
-//
-
-#import "UIBarButtonItem+SXCreate.h"
-
-@implementation UIBarButtonItem (SXCreate)
-
-+(UIBarButtonItem *)itemWithTarget:(id)target action:(SEL)action image:(UIImage *)image {
-    return [self itemWithTarget:target action:action nomalImage:image higeLightedImage:nil imageEdgeInsets:UIEdgeInsetsZero];
-}
-
-+(UIBarButtonItem *)itemWithTarget:(id)target action:(SEL)action image:(UIImage *)image imageEdgeInsets:(UIEdgeInsets)imageEdgeInsets {
-    return [self itemWithTarget:target action:action nomalImage:image higeLightedImage:nil imageEdgeInsets:imageEdgeInsets];
-}
-
-+(UIBarButtonItem *)itemWithTarget:(id)target
-                            action:(SEL)action
-                        nomalImage:(UIImage *)nomalImage
-                  higeLightedImage:(UIImage *)higeLightedImage
-                   imageEdgeInsets:(UIEdgeInsets)imageEdgeInsets {
-    
-    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
-    [button addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
-    
-    [button setImage:[nomalImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
-    if (higeLightedImage) {
-        [button setImage:higeLightedImage forState:UIControlStateHighlighted];
-    }
-    [button sizeToFit];
-    if (button.bounds.size.width < 40) {
-        CGFloat width = 40 / button.bounds.size.height * button.bounds.size.width;
-        button.bounds = CGRectMake(0, 0, width, 40);
-    }
-    if (button.bounds.size.height > 40) {
-        CGFloat height = 40 / button.bounds.size.width * button.bounds.size.height;
-        button.bounds = CGRectMake(0, 0, 40, height);
-    }
-    button.imageEdgeInsets = imageEdgeInsets;
-    return [[UIBarButtonItem alloc] initWithCustomView:button];
-    
-}
-
-+(UIBarButtonItem *)itemWithTarget:(id)target action:(SEL)action title:(NSString *)title {
-    return [self itemWithTarget:target action:action title:title font:nil titleColor:nil highlightedColor:nil titleEdgeInsets:UIEdgeInsetsZero];
-}
-
-+(UIBarButtonItem *)itemWithTarget:(id)target action:(SEL)action title:(NSString *)title titleEdgeInsets:(UIEdgeInsets)titleEdgeInsets {
-    return [self itemWithTarget:target action:action title:title font:nil titleColor:nil highlightedColor:nil titleEdgeInsets:titleEdgeInsets];
-}
-
-+(UIBarButtonItem *)itemWithTarget:(id)target
-                            action:(SEL)action
-                             title:(NSString *)title
-                              font:(UIFont *)font
-                        titleColor:(UIColor *)titleColor
-                  highlightedColor:(UIColor *)highlightedColor
-                   titleEdgeInsets:(UIEdgeInsets)titleEdgeInsets {
-    
-    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
-    [button addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
-    
-    [button setTitle:title forState:UIControlStateNormal];
-    button.titleLabel.font = font?font:nil;
-    [button setTitleColor:titleColor?titleColor:[UIColor blackColor] forState:UIControlStateNormal];
-    [button setTitleColor:highlightedColor?highlightedColor:nil forState:UIControlStateHighlighted];
-    
-    [button sizeToFit];
-    if (button.bounds.size.width < 40) {
-        CGFloat width = 40 / button.bounds.size.height * button.bounds.size.width;
-        button.bounds = CGRectMake(0, 0, width, 40);
-    }
-    if (button.bounds.size.height > 40) {
-        CGFloat height = 40 / button.bounds.size.width * button.bounds.size.height;
-        button.bounds = CGRectMake(0, 0, 40, height);
-    }
-    button.titleEdgeInsets = titleEdgeInsets;
-    return [[UIBarButtonItem alloc] initWithCustomView:button];
-}
-
-+(UIBarButtonItem *)fixedSpaceWithWidth:(CGFloat)width {
-    
-    UIBarButtonItem *fixedSpace = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
-    fixedSpace.width = width;
-    return fixedSpace;
-}
-
-@end

RainbowPlanet/RainbowPlanet/Tools/MBProgressHUD/SwiftProgressHUD.swift → RainbowPlanet/RainbowPlanet/Tools/SwiftProgressHUD/SwiftProgressHUD.swift