Browse Source

一建登录完成

南鑫林 5 years ago
parent
commit
107996de1c
83 changed files with 1035 additions and 241 deletions
  1. 65 15
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.bundle/icon_check@2x.png
  3. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.bundle/icon_check@3x.png
  4. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.bundle/icon_nav_back_gray@2x.png
  5. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.bundle/icon_nav_back_gray@3x.png
  6. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.bundle/icon_nav_back_light@2x.png
  7. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.bundle/icon_nav_back_light@3x.png
  8. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.bundle/icon_uncheck@2x.png
  9. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.bundle/icon_uncheck@3x.png
  10. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK
  11. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK.bundle/icon_check@2x.png
  12. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK.bundle/icon_check@3x.png
  13. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK.bundle/icon_nav_back_gray@2x.png
  14. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK.bundle/icon_nav_back_gray@3x.png
  15. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK.bundle/icon_nav_back_light@2x.png
  16. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK.bundle/icon_nav_back_light@3x.png
  17. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK.bundle/icon_uncheck@2x.png
  18. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK.bundle/icon_uncheck@3x.png
  19. 19 0
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/Headers/ATAuthSDK.h
  20. 99 0
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/Headers/TXCommonHandler.h
  21. 53 0
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/Headers/TXCommonUtils.h
  22. 69 0
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/Headers/TXCustomModel.h
  23. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/Info.plist
  24. 6 0
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/Modules/module.modulemap
  25. 21 0
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/PrivateHeaders/TXSecurityUtils.h
  26. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/checkBox_selected@3x.png
  27. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/checkBox_unSelected@3x.png
  28. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/close@3x.png
  29. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/loginBtn_Dis@3x.png
  30. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/loginBtn_Nor@3x.png
  31. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/logo@3x.png
  32. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/phoneTextfield@3x.png
  33. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/smsCodeBtn_Dis@3x.png
  34. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/smsCodeBtn_Nor@3x.png
  35. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/toast@3x.png
  36. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/checkBox_selected@3x.png
  37. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/checkBox_unSelected@3x.png
  38. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/close@3x.png
  39. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/loginBtn_Dis@3x.png
  40. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/loginBtn_Nor@3x.png
  41. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/logo@3x.png
  42. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/phoneTextfield@3x.png
  43. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/smsCodeBtn_Dis@3x.png
  44. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/smsCodeBtn_Nor@3x.png
  45. BIN
      RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/toast@3x.png
  46. 3 0
      RainbowPlanet/RainbowPlanet/Macro/RainbowPlanet-Bridging-Header.h
  47. 87 0
      RainbowPlanet/RainbowPlanet/Manager/ATAuthSDKManager/ATAuthSDKManager.swift
  48. 60 0
      RainbowPlanet/RainbowPlanet/Manager/ATAuthSDKManager/ATAuthSDKModel.swift
  49. 37 0
      RainbowPlanet/RainbowPlanet/Manager/RegisterLoginManager/RegisterLoginManager.swift
  50. 37 0
      RainbowPlanet/RainbowPlanet/Modules/MineModule/AccountSecurity/View/AccountSecurityTableViewCell.swift
  51. 2 2
      RainbowPlanet/RainbowPlanet/Modules/MineModule/AccountSecurity/View/AccountSecurityView.swift
  52. 35 13
      RainbowPlanet/RainbowPlanet/Modules/MineModule/AccountSecurity/ViewController/AccountSecurityViewController.swift
  53. 2 20
      RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/BindPhoneNumber/ViewController/BindPhoneNumberViewController.swift
  54. 1 21
      RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/MobileLogin/ViewController/MobileLoginViewController.swift
  55. 0 85
      RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/RegisterLogin/View/RegisterLoginView.swift
  56. 185 40
      RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/RegisterLogin/ViewController/RegisterLoginViewController.swift
  57. 25 7
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceUser/SwiftMoyaNetWorkServiceUser.swift
  58. 16 4
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceUser/SwiftMoyaServiceUserApi.swift
  59. 0 0
      RainbowPlanet/RainbowPlanet/Src/Gif/loading.gif
  60. BIN
      RainbowPlanet/RainbowPlanet/Src/Video/login_video.mp4
  61. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_close_white.imageset/Contents.json
  62. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_close_white.imageset/nav_close_white@2x.png
  63. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_close_white.imageset/nav_close_white@3x.png
  64. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/MineModule.xcassets/my_set_qq.imageset/Contents.json
  65. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/MineModule.xcassets/my_set_qq.imageset/my_set_qq@2x.png
  66. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/MineModule.xcassets/my_set_qq.imageset/my_set_qq@3x.png
  67. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_iphone.imageset/Contents.json
  68. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_iphone.imageset/login_ico_iphone@2x.png
  69. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_iphone.imageset/login_ico_iphone@3x.png
  70. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_password.imageset/Contents.json
  71. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_password.imageset/login_ico_password@2x.png
  72. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_password.imageset/login_ico_password@3x.png
  73. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_qq.imageset/Contents.json
  74. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_qq.imageset/login_ico_qq@2x.png
  75. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_qq.imageset/login_ico_qq@3x.png
  76. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_wehcat.imageset/Contents.json
  77. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_wehcat.imageset/login_ico_wehcat@2x.png
  78. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_wehcat.imageset/login_ico_wehcat@3x.png
  79. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/logo_slogan.imageset/Contents.json
  80. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/logo_slogan.imageset/logo_slogan@2x.png
  81. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/logo_slogan.imageset/logo_slogan@3x.png
  82. 30 0
      RainbowPlanet/RainbowPlanet/Tools/Extension/Extension+UIImage.swift
  83. 29 34
      RainbowPlanet/RainbowPlanet/Tools/SwiftProgressHUD/SwiftProgressHUD.swift

+ 65 - 15
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -82,7 +82,6 @@
 		A71CAB4122CB32C700D908A8 /* VirusViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A71CAB4022CB32C700D908A8 /* VirusViewModel.swift */; };
 		A71CAB4522CB36EC00D908A8 /* CommunityFollowUserViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A71CAB4422CB36EC00D908A8 /* CommunityFollowUserViewModel.swift */; };
 		A71CAB4722CB39EE00D908A8 /* CommunityFollowTopicViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A71CAB4622CB39EE00D908A8 /* CommunityFollowTopicViewModel.swift */; };
-		A71D2A602265673A00A55D16 /* RegisterLoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A71D2A5F2265673A00A55D16 /* RegisterLoginView.swift */; };
 		A72623D322C1FFD100AEF875 /* CommunityPostMyModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72623D222C1FFD100AEF875 /* CommunityPostMyModel.swift */; };
 		A72623D522C2646200AEF875 /* MessageIndexModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72623D422C2646200AEF875 /* MessageIndexModel.swift */; };
 		A72623D722C26A2A00AEF875 /* MessageListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72623D622C26A2A00AEF875 /* MessageListModel.swift */; };
@@ -165,6 +164,11 @@
 		A72A7388223396CB00B21995 /* ApiMacro.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A7384223396CB00B21995 /* ApiMacro.swift */; };
 		A72C01222275404A0065E0C3 /* ProvinceCityAreaModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72C01202275404A0065E0C3 /* ProvinceCityAreaModel.swift */; };
 		A72C01232275404A0065E0C3 /* province_city_area.json in Resources */ = {isa = PBXBuildFile; fileRef = A72C01212275404A0065E0C3 /* province_city_area.json */; };
+		A72E684F22F2BBB30063D967 /* login_video.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = A72E684E22F2BBB30063D967 /* login_video.mp4 */; };
+		A72E685422F2D7580063D967 /* ATAuthSDKManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72E685322F2D7580063D967 /* ATAuthSDKManager.swift */; };
+		A72E685622F2D80F0063D967 /* ATAuthSDKModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72E685522F2D80F0063D967 /* ATAuthSDKModel.swift */; };
+		A72E685922F2DB110063D967 /* RegisterLoginManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72E685822F2DB110063D967 /* RegisterLoginManager.swift */; };
+		A72E685B22F2E2090063D967 /* ATAuthSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A72E685A22F2E2090063D967 /* ATAuthSDK.framework */; };
 		A738D202225AD6AD00EEE860 /* Extension+UICollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A738D201225AD6AD00EEE860 /* Extension+UICollectionView.swift */; };
 		A738D205225AF90D00EEE860 /* WeChatpayOrderModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A738D204225AF90D00EEE860 /* WeChatpayOrderModel.swift */; };
 		A738D66F225D9BD900EEE860 /* UMLoginModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A738D66E225D9BD900EEE860 /* UMLoginModel.swift */; };
@@ -224,6 +228,8 @@
 		A76390EB2248E27A0067EEE0 /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A76390EA2248E27A0067EEE0 /* UserNotifications.framework */; };
 		A763BE6C22F173A0000CE594 /* LoginNowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A763BE6B22F173A0000CE594 /* LoginNowView.swift */; };
 		A763BE6E22F1953D000CE594 /* CommunityFollowLoginTableHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A763BE6D22F1953D000CE594 /* CommunityFollowLoginTableHeaderView.swift */; };
+		A763BE7722F1B6C7000CE594 /* TYRZResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = A763BE7622F1B6C7000CE594 /* TYRZResource.bundle */; };
+		A763BE7922F1B6EB000CE594 /* ATAuthSDK.bundle in Resources */ = {isa = PBXBuildFile; fileRef = A763BE7822F1B6EB000CE594 /* ATAuthSDK.bundle */; };
 		A7649B6922977A4300BCE9D1 /* ShopSectionHeaderModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7649B6822977A4300BCE9D1 /* ShopSectionHeaderModel.swift */; };
 		A76B786922CE04940047EC1B /* CommunityRecommendDetailHTMLTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A76B786822CE04940047EC1B /* CommunityRecommendDetailHTMLTableViewCell.swift */; };
 		A770E5DB22CED8C600CBD0A4 /* RouterManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A770E5DA22CED8C600CBD0A4 /* RouterManager.swift */; };
@@ -785,7 +791,6 @@
 		A71CAB4022CB32C700D908A8 /* VirusViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VirusViewModel.swift; sourceTree = "<group>"; };
 		A71CAB4422CB36EC00D908A8 /* CommunityFollowUserViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityFollowUserViewModel.swift; sourceTree = "<group>"; };
 		A71CAB4622CB39EE00D908A8 /* CommunityFollowTopicViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityFollowTopicViewModel.swift; sourceTree = "<group>"; };
-		A71D2A5F2265673A00A55D16 /* RegisterLoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterLoginView.swift; sourceTree = "<group>"; };
 		A72623D222C1FFD100AEF875 /* CommunityPostMyModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommunityPostMyModel.swift; sourceTree = "<group>"; };
 		A72623D422C2646200AEF875 /* MessageIndexModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageIndexModel.swift; sourceTree = "<group>"; };
 		A72623D622C26A2A00AEF875 /* MessageListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageListModel.swift; sourceTree = "<group>"; };
@@ -872,6 +877,11 @@
 		A72A7384223396CB00B21995 /* ApiMacro.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApiMacro.swift; sourceTree = "<group>"; };
 		A72C01202275404A0065E0C3 /* ProvinceCityAreaModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProvinceCityAreaModel.swift; sourceTree = "<group>"; };
 		A72C01212275404A0065E0C3 /* province_city_area.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = province_city_area.json; sourceTree = "<group>"; };
+		A72E684E22F2BBB30063D967 /* login_video.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = login_video.mp4; sourceTree = "<group>"; };
+		A72E685322F2D7580063D967 /* ATAuthSDKManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ATAuthSDKManager.swift; sourceTree = "<group>"; };
+		A72E685522F2D80F0063D967 /* ATAuthSDKModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ATAuthSDKModel.swift; sourceTree = "<group>"; };
+		A72E685822F2DB110063D967 /* RegisterLoginManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterLoginManager.swift; sourceTree = "<group>"; };
+		A72E685A22F2E2090063D967 /* ATAuthSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = ATAuthSDK.framework; sourceTree = "<group>"; };
 		A738D201225AD6AD00EEE860 /* Extension+UICollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Extension+UICollectionView.swift"; sourceTree = "<group>"; };
 		A738D204225AF90D00EEE860 /* WeChatpayOrderModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WeChatpayOrderModel.swift; sourceTree = "<group>"; };
 		A738D66E225D9BD900EEE860 /* UMLoginModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UMLoginModel.swift; sourceTree = "<group>"; };
@@ -933,6 +943,8 @@
 		A76390EA2248E27A0067EEE0 /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; };
 		A763BE6B22F173A0000CE594 /* LoginNowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginNowView.swift; sourceTree = "<group>"; };
 		A763BE6D22F1953D000CE594 /* CommunityFollowLoginTableHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityFollowLoginTableHeaderView.swift; sourceTree = "<group>"; };
+		A763BE7622F1B6C7000CE594 /* TYRZResource.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = TYRZResource.bundle; sourceTree = "<group>"; };
+		A763BE7822F1B6EB000CE594 /* ATAuthSDK.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = ATAuthSDK.bundle; sourceTree = "<group>"; };
 		A7649B6822977A4300BCE9D1 /* ShopSectionHeaderModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShopSectionHeaderModel.swift; sourceTree = "<group>"; };
 		A76B786822CE04940047EC1B /* CommunityRecommendDetailHTMLTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityRecommendDetailHTMLTableViewCell.swift; sourceTree = "<group>"; };
 		A770E5DA22CED8C600CBD0A4 /* RouterManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RouterManager.swift; sourceTree = "<group>"; };
@@ -1481,6 +1493,7 @@
 				A72A72FE22321EE200B21995 /* QuartzCore.framework in Frameworks */,
 				A72A72FC22321ECE00B21995 /* CoreTelephony.framework in Frameworks */,
 				A72A72FA22321EBF00B21995 /* CoreText.framework in Frameworks */,
+				A72E685B22F2E2090063D967 /* ATAuthSDK.framework in Frameworks */,
 				A72A72F822321EB600B21995 /* CoreGraphics.framework in Frameworks */,
 				A72A72F622321EA000B21995 /* UIKit.framework in Frameworks */,
 				A72A72F422321E9A00B21995 /* Foundation.framework in Frameworks */,
@@ -2081,14 +2094,6 @@
 			path = Community;
 			sourceTree = "<group>";
 		};
-		A71D2A5E2265671100A55D16 /* View */ = {
-			isa = PBXGroup;
-			children = (
-				A71D2A5F2265673A00A55D16 /* RegisterLoginView.swift */,
-			);
-			path = View;
-			sourceTree = "<group>";
-		};
 		A71D2A612265756E00A55D16 /* SwiftMoyaServiceApi */ = {
 			isa = PBXGroup;
 			children = (
@@ -2299,6 +2304,7 @@
 		A72A725322321A6900B21995 /* Lib */ = {
 			isa = PBXGroup;
 			children = (
+				A763BE6F22F1B3D3000CE594 /* ATAuthSDK */,
 				A7778C8E22438F5C00C7C47A /* AlipaySDK */,
 				A7778C9122438F5D00C7C47A /* WeChatSDK */,
 			);
@@ -2308,6 +2314,8 @@
 		A72A725422321B9400B21995 /* Manager */ = {
 			isa = PBXGroup;
 			children = (
+				A72E685722F2DAF40063D967 /* RegisterLoginManager */,
+				A72E685222F2D7460063D967 /* ATAuthSDKManager */,
 				A74DF74B22EAEF43007FB505 /* MJRefreshManager */,
 				A7F3069522E1AE7D00DC7917 /* MessageModuleManager */,
 				A743229922B8C1440017C367 /* AppStoreManager */,
@@ -2511,7 +2519,8 @@
 		A72C011E227539800065E0C3 /* Src */ = {
 			isa = PBXGroup;
 			children = (
-				A76068EE22E4AE65008DF18F /* gif */,
+				A763BE7A22F28376000CE594 /* Video */,
+				A76068EE22E4AE65008DF18F /* Gif */,
 				A75B787522E079BC007B986A /* AnimationJSON */,
 				A75B783422DFFDFE007B986A /* json */,
 			);
@@ -2526,6 +2535,23 @@
 			path = ProvinceCityAreaModules;
 			sourceTree = "<group>";
 		};
+		A72E685222F2D7460063D967 /* ATAuthSDKManager */ = {
+			isa = PBXGroup;
+			children = (
+				A72E685322F2D7580063D967 /* ATAuthSDKManager.swift */,
+				A72E685522F2D80F0063D967 /* ATAuthSDKModel.swift */,
+			);
+			path = ATAuthSDKManager;
+			sourceTree = "<group>";
+		};
+		A72E685722F2DAF40063D967 /* RegisterLoginManager */ = {
+			isa = PBXGroup;
+			children = (
+				A72E685822F2DB110063D967 /* RegisterLoginManager.swift */,
+			);
+			path = RegisterLoginManager;
+			sourceTree = "<group>";
+		};
 		A738D203225AEAD000EEE860 /* Model */ = {
 			isa = PBXGroup;
 			children = (
@@ -2755,12 +2781,12 @@
 			path = AnimationJSON;
 			sourceTree = "<group>";
 		};
-		A76068EE22E4AE65008DF18F /* gif */ = {
+		A76068EE22E4AE65008DF18F /* Gif */ = {
 			isa = PBXGroup;
 			children = (
 				A76068EF22E4AE91008DF18F /* loading.gif */,
 			);
-			path = gif;
+			path = Gif;
 			sourceTree = "<group>";
 		};
 		A76068F122E4B0ED008DF18F /* UImage+Gif */ = {
@@ -2814,6 +2840,24 @@
 			path = LoginNow;
 			sourceTree = "<group>";
 		};
+		A763BE6F22F1B3D3000CE594 /* ATAuthSDK */ = {
+			isa = PBXGroup;
+			children = (
+				A72E685A22F2E2090063D967 /* ATAuthSDK.framework */,
+				A763BE7822F1B6EB000CE594 /* ATAuthSDK.bundle */,
+				A763BE7622F1B6C7000CE594 /* TYRZResource.bundle */,
+			);
+			path = ATAuthSDK;
+			sourceTree = "<group>";
+		};
+		A763BE7A22F28376000CE594 /* Video */ = {
+			isa = PBXGroup;
+			children = (
+				A72E684E22F2BBB30063D967 /* login_video.mp4 */,
+			);
+			path = Video;
+			sourceTree = "<group>";
+		};
 		A76B786722CE04730047EC1B /* HTMLCell */ = {
 			isa = PBXGroup;
 			children = (
@@ -3014,7 +3058,6 @@
 		A7778CAC2244BC2600C7C47A /* RegisterLogin */ = {
 			isa = PBXGroup;
 			children = (
-				A71D2A5E2265671100A55D16 /* View */,
 				A7778CAD2244BEFF00C7C47A /* ViewController */,
 			);
 			path = RegisterLogin;
@@ -5845,11 +5888,14 @@
 				BDD54A2622C31D60005BBE19 /* watermark.png in Resources */,
 				BD108C9B22A60C3300837DAB /* HGImage.storyboard in Resources */,
 				A7FF1577228C824300A85748 /* OrderModule.xcassets in Resources */,
+				A72E684F22F2BBB30063D967 /* login_video.mp4 in Resources */,
 				BD4B50AC22BC7DEA0073B516 /* FilterResource.bundle in Resources */,
+				A763BE7922F1B6EB000CE594 /* ATAuthSDK.bundle in Resources */,
 				A76068EB22E49BC1008DF18F /* collect.json in Resources */,
 				A7778C9922438F5D00C7C47A /* README.txt in Resources */,
 				BDD54A2922C31D60005BBE19 /* LocalMV.json in Resources */,
 				A7BF202722B3930100396DB3 /* MessageModule.xcassets in Resources */,
+				A763BE7722F1B6C7000CE594 /* TYRZResource.bundle in Resources */,
 				BDD54A2B22C31D78005BBE19 /* filter in Resources */,
 				BD108C9A22A60C3300837DAB /* HGImage.xcassets in Resources */,
 				A7F3069922E1C72D00DC7917 /* json_Image_1.png in Resources */,
@@ -5968,6 +6014,7 @@
 				A77F2CC722320627001BD3F6 /* WRNavigationBar.swift in Sources */,
 				A7274C5E228EE636000E3A07 /* LBXPermissions.swift in Sources */,
 				A7D46092227619CD00A5A54E /* BaiduToCityFactory.swift in Sources */,
+				A72E685922F2DB110063D967 /* RegisterLoginManager.swift in Sources */,
 				BD11D64222E02520008FFA58 /* MusicPlayManager.swift in Sources */,
 				A71AA51C227219EF008FF1A5 /* EditExpressAddressView.swift in Sources */,
 				BDAA40FB228E9CC300CF841D /* OrderApplyRefundNoteInfoCell.swift in Sources */,
@@ -6030,7 +6077,6 @@
 				A7284404224DBFBD00F82F30 /* UserModel.swift in Sources */,
 				A7931E1122AF989B00297D0A /* TopicSelectionViewController.swift in Sources */,
 				BD10FC0822C748DA0096A34E /* AlivcAlertView.m in Sources */,
-				A71D2A602265673A00A55D16 /* RegisterLoginView.swift in Sources */,
 				BD12B6AC22B502C200AEB10B /* KSVideoPlayerBaseView.m in Sources */,
 				BD2FCBE422B244250006D974 /* RecommendDetailContentCell.swift in Sources */,
 				A73D7C682268A032002A4CE3 /* SwiftyStarRatingView.swift in Sources */,
@@ -6240,6 +6286,8 @@
 				A74322A222B8D5A90017C367 /* SearchUserLitTableViewCell.swift in Sources */,
 				A72623E522C39C7000AEF875 /* FMLinkLabel.m in Sources */,
 				A7CC75432271E038003C4F38 /* SelfMentionContactsListViewController.swift in Sources */,
+				A72E685622F2D80F0063D967 /* ATAuthSDKModel.swift in Sources */,
+				A72E685422F2D7580063D967 /* ATAuthSDKManager.swift in Sources */,
 				BDF47D872282C92200941AB9 /* ShoppingCartListTableViewHeader.swift in Sources */,
 				A7D5F26322C0CF8600F8E9AF /* UserFansModel.swift in Sources */,
 				BD13B6E122BA03BC008BB323 /* PublishSelTopicCollectionCell.swift in Sources */,
@@ -6738,6 +6786,7 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/RainbowPlanet/Lib/AlipaySDK",
 					"$(PROJECT_DIR)/RainbowPlanet/Lib",
+					"$(PROJECT_DIR)/RainbowPlanet/Lib/ATAuthSDK",
 				);
 				GCC_ENABLE_CPP_EXCEPTIONS = NO;
 				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
@@ -6987,6 +7036,7 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/RainbowPlanet/Lib/AlipaySDK",
 					"$(PROJECT_DIR)/RainbowPlanet/Lib",
+					"$(PROJECT_DIR)/RainbowPlanet/Lib/ATAuthSDK",
 				);
 				GCC_ENABLE_CPP_EXCEPTIONS = NO;
 				GCC_ENABLE_OBJC_EXCEPTIONS = YES;

BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.bundle/icon_check@2x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.bundle/icon_check@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.bundle/icon_nav_back_gray@2x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.bundle/icon_nav_back_gray@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.bundle/icon_nav_back_light@2x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.bundle/icon_nav_back_light@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.bundle/icon_uncheck@2x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.bundle/icon_uncheck@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK.bundle/icon_check@2x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK.bundle/icon_check@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK.bundle/icon_nav_back_gray@2x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK.bundle/icon_nav_back_gray@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK.bundle/icon_nav_back_light@2x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK.bundle/icon_nav_back_light@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK.bundle/icon_uncheck@2x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/ATAuthSDK.bundle/icon_uncheck@3x.png


+ 19 - 0
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/Headers/ATAuthSDK.h

@@ -0,0 +1,19 @@
+//
+//  ATAuthSDK.h
+//  ATAuthSDK
+//
+//  Created by yangli on 14/03/2018.
+
+#import <UIKit/UIKit.h>
+
+//! Project version number for ATAuthSDK.
+FOUNDATION_EXPORT double ATAuthSDKVersionNumber;
+
+//! Project version string for ATAuthSDK.
+FOUNDATION_EXPORT const unsigned char ATAuthSDKVersionString[];
+
+// In this header, you should import all the public headers of your framework using statements like #import <ATAuthSDK/PublicHeader.h>
+
+#import "TXCommonHandler.h"
+#import "TXCommonUtils.h"
+#import "TXCustomModel.h"

+ 99 - 0
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/Headers/TXCommonHandler.h

@@ -0,0 +1,99 @@
+//
+//  TXCommonHandler.h
+//  ATAuthSDK
+//
+//  Created by yangli on 15/03/2018.
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+#import "TXCustomModel.h"
+
+@interface TXCommonHandler : NSObject
+
+/*
+ * 函数名:sharedInstance
+ * 参数:无
+ * 返回:单例
+ */
++ (instancetype _Nonnull )sharedInstance;
+
+/*
+ * 函数名:getVersion
+ * 参数:无
+ * 返回:字符串,sdk版本号
+ */
+- (NSString *_Nonnull)getVersion;
+
+/**
+ * @brief   同步验证网关认证所需的蜂窝数据网络是否开启(注意:会阻塞当前线程),同原checkGatewayVerifyEnable
+ * @param   phoneNumber 手机号码,非必传,号码认证且双sim卡时必须传入待验证的手机号码!!,一键登录时设置为nil即可
+ * @return  BOOL值,YES表示网关认证所需的蜂窝数据网络已开启,且SDK初始化完成,NO表示未开启,只有YES才能保障后续服务
+ */
+- (BOOL)checkSyncGatewayVerifyEnable:(NSString *_Nullable)phoneNumber;
+
+/**
+ * @brief  异步验证网关认证所需的蜂窝数据网络是否开启(注意:不会阻塞当前线程,但是结果会异步回调)
+ * @param  phoneNumber   手机号码,非必传,号码认证且双sim卡时必须传入待验证的手机号码!!,一键登录时设置为nil即可
+ * @param  complete 结果回调(注意:回调线程非调用线程)
+ */
+- (void)checkAsyncGatewayVerifyEnable:(NSString *_Nullable)phoneNumber complete:(void(^_Nullable)(BOOL enable))complete;
+
+
+/*
+ * 函数名:getAuthTokenWithComplete,默认超时时间3.0s
+ * 参数:无
+ * 返回:字典形式
+ *      resultCode:6666-成功,5555-超时,4444-失败,3344-参数异常,2222-无网络,1111-无SIM卡
+ *      token:号码认证token
+ *      msg:文案或错误提示
+ */
+
+- (void)getAuthTokenWithComplete:(void (^_Nullable)(NSDictionary * _Nonnull resultDic))complete;
+
+/*
+ * 函数名:getAuthTokenWithTimeout
+ * 参数:timeout:接口超时时间,单位s,默认3.0s,值为0.0时采用默认超时时间
+ * 返回:字典形式
+ *      resultCode:6666-成功,5555-超时,4444-失败,3344-参数异常,2222-无网络,1111-无SIM卡
+ *      token:号码认证token
+ *      msg:文案或错误提示
+ */
+
+- (void)getAuthTokenWithTimeout:(NSTimeInterval )timeout complete:(void (^_Nullable)(NSDictionary * _Nonnull resultDic))complete;
+
+/*
+ * 函数名:getLoginNumberWithTimeout,一键登录预取号
+ * 参数:
+ timeout:接口超时时间,单位s,默认3.0s,值为0.0时采用默认超时时间
+ * 返回:字典形式
+ *      resultCode:6666-成功,5555-超时,4444-失败,3344-参数异常,2222-无网络,1111-无SIM卡
+ *      msg:文案或错误提示
+ */
+
+- (void)getLoginNumberWithTimeout:(NSTimeInterval )timeout complete:(void (^_Nullable)(NSDictionary * _Nonnull resultDic))complete;
+
+/*
+ * 函数名:getLoginTokenWithController,一键登录token
+ * 参数:
+ vc:当前vc容器,用于一键登录授权页面切换
+ model:自定义授权页面选项,可为nil,采用默认的授权页面,具体请参考TXCustomModel.h文件
+ timeout:接口超时时间,单位s,默认3.0s,值为0.0时采用默认超时时间
+ * 返回:字典形式
+ *      resultCode:6666-成功,5555-超时,4444-失败,3344-参数异常,2222-无网络,1111-无SIM卡,6668-登录按钮事件,6669-切换到其他方式按钮事件
+ *      token:一键登录token
+ *      msg:文案或错误提示
+ */
+
+- (void)getLoginTokenWithController:(UIViewController *_Nonnull)vc model:(TXCustomModel *_Nullable)model timeout:(NSTimeInterval )timeout complete:(void (^_Nullable)(NSDictionary * _Nonnull resultDic))complete;
+
+/**
+ 注销授权页,只有在客户自定义的按钮事件中调用!!
+ 
+ @param flag 是否添加动画
+ @param complete 成功返回
+ */
+- (void)cancelLoginVCAnimated:(BOOL)flag complete:(void (^_Nullable)(void))complete;
+
+
+@end

+ 53 - 0
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/Headers/TXCommonUtils.h

@@ -0,0 +1,53 @@
+//
+//  TXCommonUtils.h
+//  authsdk
+//
+//  Created by yangli on 12/03/2018.
+
+#import <Foundation/Foundation.h>
+
+#define TX_Auth_Result_Success      @"6666"
+#define TX_Auth_Result_TimeOut      @"5555"
+#define TX_Auth_Result_Fail         @"4444"
+#define TX_Auth_Result_No_SIM_Card  @"1111"
+#define TX_Auth_Result_No_Network   @"2222"
+#define TX_Auth_Result_Other_Err    @"3333"
+#define TX_Auth_Result_Param_Err    @"3344"
+
+#define TX_Login_Return_Action      @"6667" // 点击了返回按钮
+#define TX_Login_SSO_Action         @"6668" // 点击了登录按钮并成功获取了token
+#define TX_Login_Change_Action      @"6669" // 点击了切换按钮
+
+@interface TXCommonUtils : NSObject
+
++ (BOOL)isChinaUnicom;
+
++ (BOOL)isChinaMobile;
+
++ (BOOL)isChinaTelecom;
+
++ (NSString *)getCurrentMobileNetworkName;
+
++ (NSString *)getCurrentCarrierName;
+
++ (NSString *)getNetworktype;
++ (BOOL)simSupportedIsOK;
+
+/**
+ 判断wwan是否开着(通过p0网卡判断,无wifi或有wifi情况下都能检测到)
+ @return 结果
+ */
++ (BOOL)isWWANOpen;
+
+/**
+ 判断wwan是否开着(仅无wifi情况下)
+ @return 结果
+ */
++ (BOOL)reachableViaWWAN;
+
+/**
+ 获取设备当前网络私网IP地址
+ */
++ (NSString *)getMobilePrivateIPAddress:(BOOL)preferIPv4;
+
+@end

+ 69 - 0
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/Headers/TXCustomModel.h

@@ -0,0 +1,69 @@
+//
+//  TXCustomModel.h
+//  ATAuthSDK
+//
+//  Created by yangli on 2019/4/4.
+//  Copyright © 2019 alicom. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface TXCustomModel : NSObject
+
+/**
+ * 说明,可设置的Y轴距离
+ * 全屏模式:默认是以375x667pt为基准,其他屏幕尺寸可以根据(ratio = 屏幕高度/667)比率来适配,比如 Y*ratio
+ **/
+
+// 导航栏
+@property (nonatomic, strong) UIColor *navColor; // 导航栏主题色
+@property (nonatomic, copy) NSAttributedString *navTitle; // 导航栏标题,内容、字体、大小、颜色
+@property (nonatomic, strong) UIImage *navBackImage; // 导航栏返回图片
+@property (nonatomic, strong) UIBarButtonItem *navMoreControl; // 导航栏右侧自定义控件,UIBarButtonItem
+
+// logo图片
+@property (nonatomic, strong) UIImage *logoImage; // logo图片
+@property (nonatomic, assign) CGFloat logoWidth; // logo宽
+@property (nonatomic, assign) CGFloat logoHeight; // logo高
+@property (nonatomic, assign) BOOL logoIsHidden; // logo是否隐藏
+@property (nonatomic, assign) CGFloat logoTopOffetY; // logo相对导航栏底部的Y轴距离
+
+// slogan
+@property (nonatomic, copy) NSAttributedString *sloganText; // slogan文案,内容、字体、大小、颜色
+@property (nonatomic, assign) BOOL sloganIsHidden; // slogan是否隐藏
+@property (nonatomic, assign) CGFloat sloganTopOffetY; // slogan相对导航栏底部的Y轴距离
+
+// 号码
+@property (nonatomic, strong) UIColor *numberColor;
+@property (nonatomic, assign) CGFloat numberSize;
+@property (nonatomic, assign) CGFloat numberTopOffetY; // number相对导航栏底部的Y轴距离
+
+// 登录
+@property (nonatomic, strong) NSString *loginBtnTitle;  // loginBtn标题
+@property (nonatomic, strong) UIColor *loginBtnTitleColor;  // loginBtn文本颜色
+@property (nonatomic,strong) NSArray *loginBtnBgImgs; //loginBtn背景图片组,高度45.0pt,@[激活状态的图片,失效状态的图片,高亮状态的图片]
+@property (nonatomic, assign) CGFloat loginBtnTopOffetY; // loginBtn相对导航栏底部的Y轴距离
+
+// 协议
+@property (nonatomic, copy) NSArray *checkBoxImages; // checkBox图片组,[uncheckedImg,checkedImg]
+@property (nonatomic, assign) BOOL checkBoxIsChecked; // checkBox是否勾选,默认YES
+@property (nonatomic, copy) NSArray *privacyOne; // 协议1,[协议名称,协议Url]
+@property (nonatomic, copy) NSArray *privacyTwo; // 协议2,[协议名称,协议Url]
+@property (nonatomic, copy) NSArray *privacyColors; // 协议内容颜色,[非点击文案颜色,协议颜色]
+@property (nonatomic, assign) CGFloat privacyBottomOffetY; // 协议相对全屏底部的Y轴距离!!!与其他有区别
+
+
+// 切换到其他方式
+@property (nonatomic, copy) NSAttributedString *changeBtnTitle; // changeBtn标题,内容、字体、大小、颜色
+@property (nonatomic, assign) BOOL changeBtnIsHidden; // changeBtn是否隐藏
+@property (nonatomic, assign) CGFloat changeBtnTopOffetY; // changeBtn相对导航栏底部的Y轴距离
+
+// 其他控件自定义block
+@property (nonatomic,copy) void(^customViewBlock)(UIView *superCustomView);
+
+@end
+
+NS_ASSUME_NONNULL_END

BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/Info.plist


+ 6 - 0
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/Modules/module.modulemap

@@ -0,0 +1,6 @@
+framework module ATAuthSDK {
+  umbrella header "ATAuthSDK.h"
+
+  export *
+  module * { export * }
+}

+ 21 - 0
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/PrivateHeaders/TXSecurityUtils.h

@@ -0,0 +1,21 @@
+//
+//  TXSecurityUtils.h
+//  ATAuthSDK
+//
+//  Created by yangli on 2018/12/6.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface TXSecurityUtils : NSObject
+
++ (NSString *)encryptAES:(NSString *)content key:(NSString *)key;
++ (NSString *)decryptAES:(NSString *)content key:(NSString *)key;
+
++ (NSString *)encryptMD5:(NSString *)content;
+
+@end
+
+NS_ASSUME_NONNULL_END

BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/checkBox_selected@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/checkBox_unSelected@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/close@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/loginBtn_Dis@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/loginBtn_Nor@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/logo@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/phoneTextfield@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/smsCodeBtn_Dis@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/smsCodeBtn_Nor@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/ATAuthSDK.framework/TYRZResource.bundle/toast@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/checkBox_selected@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/checkBox_unSelected@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/close@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/loginBtn_Dis@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/loginBtn_Nor@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/logo@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/phoneTextfield@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/smsCodeBtn_Dis@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/smsCodeBtn_Nor@3x.png


BIN
RainbowPlanet/RainbowPlanet/Lib/ATAuthSDK/TYRZResource.bundle/toast@3x.png


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

@@ -76,5 +76,8 @@
 #import "AVAsset+VideoInfo.h"
 #import "AliyunPathManager.h"
 
+// 阿里云一建登录
+#import "ATAuthSDK/ATAuthSDK.h"
+
 
 #endif /* RainbowPlanet_Bridging_Header_h */

+ 87 - 0
RainbowPlanet/RainbowPlanet/Manager/ATAuthSDKManager/ATAuthSDKManager.swift

@@ -0,0 +1,87 @@
+//
+//  ATAuthSDKManager.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/8/1.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import SwiftyJSON
+
+class ATAuthSDKManager: NSObject {
+
+    /// 手机一键登录
+    class func oneBuiltLogin(vc:UIViewController) {
+        TXCommonHandler.sharedInstance().checkAsyncGatewayVerifyEnable(nil) { (enable) in
+            DispatchQueue.main.async {
+                if !enable {//先获取authortoken并认证
+                    SwiftProgressHUD.shared().showText("设备无移动数据网络 或 获取供应商信息失败")
+                    return
+                }
+                let modelNew = TXCustomModel()
+                
+                /// navigationbara
+                modelNew.navColor = kffffffColor
+                modelNew.navBackImage = kImage(name: "navbar_back_black")!
+                
+                //Moblie
+                modelNew.numberSize = 36
+                modelNew.numberColor = UIColor.black
+                modelNew.numberTopOffetY = 120 * kScaleWidth
+                
+                // slogan
+                modelNew.sloganIsHidden = false
+                modelNew.sloganText = NSAttributedString(string: "阿里云提供认证服务", attributes: [
+                    NSAttributedString.Key.foregroundColor: k333333Color,
+                    NSAttributedString.Key.font: UIFont.systemFont(ofSize: 14.0)
+                    ])
+                modelNew.sloganTopOffetY = 175 * kScaleWidth
+                
+                //changeBtn
+                modelNew.changeBtnIsHidden = true
+                
+                
+                //协议
+                //                modelNew.checkBoxImages = [UIImage(),UIImage()]
+                modelNew.privacyOne = ["服务和隐私条款",kH5ContentId6Url];
+                modelNew.checkBoxIsChecked = true
+                modelNew.privacyBottomOffetY = 46.5 - kSafeTabBarHeight
+                modelNew.privacyColors = [kbbbbbbColor,k333333Color];
+                
+                
+                //loginBtn
+                let normalImage = UIImage.image(with: kThemeColor, size: CGSize(width: 295, height: 48.0), isRoundedCorner: true)
+                
+                let disableImage = UIImage.image(with: kThemeColor, size: CGSize(width: 295, height: 48.0), isRoundedCorner: true)
+                let lightedImage = UIImage.image(with: kThemeColor, size: CGSize(width: 295, height: 48.0), isRoundedCorner: true)
+                modelNew.loginBtnBgImgs = [normalImage as Any,disableImage as Any,lightedImage as Any]
+                modelNew.loginBtnTitle = "一键登录"
+                modelNew.loginBtnTitleColor = UIColor.white
+                modelNew.loginBtnTopOffetY =  245 * kScaleWidth
+                
+                TXCommonHandler.sharedInstance().getLoginToken(with: vc, model: modelNew, timeout: 10, complete: { (resultDic) in
+                    let resultDic  = resultDic as NSDictionary
+                    let atAuthSDKModel = ATAuthSDKModel(JSON: resultDic as! [String : Any])
+                    
+                    switch atAuthSDKModel?.resultCode {
+                    case TX_Login_SSO_Action:
+                        SwiftMoyaNetWorkServiceUser.shared().userMobileAuthorizationLoginApi(token: atAuthSDKModel?.token ?? "", completion: {
+                            [weak vc] (userModel) -> (Void) in
+                            RegisterLoginManager.registerLoginSuccessApi(vc: vc!)
+                        })
+                        break
+                    case TX_Auth_Result_Success,TX_Login_Return_Action,TX_Login_Change_Action:
+                        break
+                    default:
+                        SwiftProgressHUD.shared().showText(atAuthSDKModel?.msg ?? "数据有误")
+                        break
+                    }
+                    
+                })
+                
+            }
+        }
+    }
+    
+}

+ 60 - 0
RainbowPlanet/RainbowPlanet/Manager/ATAuthSDKManager/ATAuthSDKModel.swift

@@ -0,0 +1,60 @@
+//
+//	ATAuthSDKModel.swift
+//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
+
+import Foundation 
+import ObjectMapper
+
+
+class ATAuthSDKModel : NSObject, NSCoding, Mappable{
+
+	var msg : String?
+	var resultCode : String?
+	var token : String?
+
+
+	class func newInstance(map: Map) -> Mappable?{
+		return ATAuthSDKModel()
+	}
+	required init?(map: Map){}
+	private override init(){}
+
+	func mapping(map: Map)
+	{
+		msg <- map["msg"]
+		resultCode <- map["resultCode"]
+		token <- map["token"]
+		
+	}
+
+    /**
+    * NSCoding required initializer.
+    * Fills the data from the passed decoder
+    */
+    @objc required init(coder aDecoder: NSCoder)
+	{
+         msg = aDecoder.decodeObject(forKey: "msg") as? String
+         resultCode = aDecoder.decodeObject(forKey: "resultCode") as? String
+         token = aDecoder.decodeObject(forKey: "token") as? String
+
+	}
+
+    /**
+    * NSCoding required method.
+    * Encodes mode properties into the decoder
+    */
+    @objc func encode(with aCoder: NSCoder)
+	{
+		if msg != nil{
+			aCoder.encode(msg, forKey: "msg")
+		}
+		if resultCode != nil{
+			aCoder.encode(resultCode, forKey: "resultCode")
+		}
+		if token != nil{
+			aCoder.encode(token, forKey: "token")
+		}
+
+	}
+
+}

+ 37 - 0
RainbowPlanet/RainbowPlanet/Manager/RegisterLoginManager/RegisterLoginManager.swift

@@ -0,0 +1,37 @@
+//
+//  RegisterLoginManager.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/8/1.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class RegisterLoginManager: NSObject {
+
+    class func registerLoginSuccessApi(vc:UIViewController) {
+        // 设置友盟别名
+        UMManager.shared.addAlias()
+        if UserModel.shared().getModel()?.isNewMember == 1 {
+            VirusViewModel.shared.registeredVirueRecordAddApi(completion: {
+                [weak vc] in
+                //设置性别话题
+                vc?.present(GenderSelectionViewController(), animated: true, completion: {
+                    
+                })
+            })
+        }else if(UserModel.shared().getModel()?.gender == nil || UserModel.shared().getModel()?.gender == 0) {//设置性别话题
+            vc.present(GenderSelectionViewController(), animated: true, completion: {
+                
+            })
+        }else if UserModel.shared().getModel()?.isFollowSuggestTopic == 0  { //设置话题
+            vc.present(TopicSelectionViewController(), animated: true, completion: {
+                
+            })
+        }else {// 设置首页
+            kAppDelegate.setTabbarController()
+            vc.navigationController?.popToRootViewController(animated: false)
+        }
+    }
+}

+ 37 - 0
RainbowPlanet/RainbowPlanet/Modules/MineModule/AccountSecurity/View/AccountSecurityTableViewCell.swift

@@ -124,13 +124,50 @@ class AccountSecurityTableViewCell: UITableViewCell {
                         make.left.equalTo(iconImageView.snp.right).offset(10)
                     }
                 }
+                detailsLabel.snp.remakeConstraints { (make) in
+                    make.centerY.equalToSuperview()
+                    make.right.equalToSuperview()
+                }
+                accessoryType = .disclosureIndicator
+
                 break
             case 1:
                 accountSecurityLabel.isHidden = true
                 if userModel?.bindWeixinUserModel?.unionId == nil || userModel?.bindWeixinUserModel?.unionId == "" {
                     detailsLabel.text = "未绑定"
+                    accessoryType = .disclosureIndicator
+                    detailsLabel.snp.remakeConstraints { (make) in
+                        make.centerY.equalToSuperview()
+                        make.right.equalToSuperview()
+                    }
+
                 }else {
                     detailsLabel.text = "已绑定"
+                    accessoryType = .none
+                    detailsLabel.snp.remakeConstraints { (make) in
+                        make.centerY.equalToSuperview()
+                        make.right.equalToSuperview().offset(-14)
+                    }
+
+                }
+                break
+            case 2:
+                accountSecurityLabel.isHidden = true
+                if userModel?.bindQQUserModel?.unionId == nil || userModel?.bindQQUserModel?.unionId == "" {
+                    detailsLabel.text = "未绑定"
+                    accessoryType = .disclosureIndicator
+                    detailsLabel.snp.remakeConstraints { (make) in
+                        make.centerY.equalToSuperview()
+                        make.right.equalToSuperview()
+                    }
+
+                }else {
+                    detailsLabel.text = "已绑定"
+                    accessoryType = .none
+                    detailsLabel.snp.remakeConstraints { (make) in
+                        make.centerY.equalToSuperview()
+                        make.right.equalToSuperview().offset(-14)
+                    }
                 }
                 break
             default:

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/MineModule/AccountSecurity/View/AccountSecurityView.swift

@@ -13,8 +13,8 @@ class AccountSecurityView: BaseView {
     typealias DidSelectRowClosure = (_ indexPath: IndexPath) -> Void
     var didSelectRowClosure : DidSelectRowClosure?
     
-    let sectionTitles = [["手机号码","微信号"],["设置密码"]]
-    let sectionIcons = [["my_set_phonenumber","my_set_wechat"]]
+    let sectionTitles = [["手机号码","微信号","QQ号"],["设置密码"]]
+    let sectionIcons = [["my_set_phonenumber","my_set_wechat","my_set_qq"]]
     
     override func setupViews() {
         addSubview(tableView)

+ 35 - 13
RainbowPlanet/RainbowPlanet/Modules/MineModule/AccountSecurity/ViewController/AccountSecurityViewController.swift

@@ -48,7 +48,11 @@ class AccountSecurityViewController: BaseViewController {
                     break
                 //设置微信
                 case 1:
-                    self?.setWeiXin(userModel: userModel)
+                    self?.setTripartite(userModel: userModel,loginType: .weixin)
+                    break
+                //设置QQ
+                case 2:
+                    self?.setTripartite(userModel: userModel,loginType: .qq)
                     break
                 default:
                     break
@@ -87,21 +91,39 @@ class AccountSecurityViewController: BaseViewController {
     }
     
     
-    /// 设置微信
+    /// 设置三方绑定
     ///
     /// - Parameter userModel: 用户
-    func setWeiXin(userModel:UserModel?) {
-        if userModel?.bindWeixinUserModel?.unionId == nil ||  userModel?.bindWeixinUserModel?.unionId == "" { //绑定微信
-            UMManager.shared.loginGetUserInfo(platformType: UMSocialPlatformType.wechatSession) { (wxLoginModel) -> (Void) in
-                SwiftMoyaNetWorkServiceUser.shared().userIsBindWeixinBindApi(loginType:.weixin,umLoginModel: wxLoginModel, completion: { [weak self] (data) -> (Void) in
-                    self?.accountSecurityView.tableView.reloadData()
-                    
-                })
+    func setTripartite(userModel:UserModel?,loginType:LoginType) {
+        
+        if loginType == .weixin {
+            if userModel?.bindWeixinUserModel?.unionId == nil ||  userModel?.bindWeixinUserModel?.unionId == "" { //绑定微信
+                UMManager.shared.loginGetUserInfo(platformType: UMSocialPlatformType.wechatSession) { (wxLoginModel) -> (Void) in
+                    SwiftMoyaNetWorkServiceUser.shared().userIsBindTripartiteBindApi(loginType:loginType,umLoginModel: wxLoginModel, completion: { [weak self] (data) -> (Void) in
+                        self?.accountSecurityView.tableView.reloadData()
+                        
+                    })
+                }
+            }
+            else { //解绑微信
+                //            SwiftMoyaNetWorkServiceUser.shared().userUnbindWeixinApi(completion: { [weak self] (data) -> (Void) in
+                //                self?.accountSecurityView.tableView.reloadData()
+                //            })
+            }
+        }else if loginType == .qq {
+            if userModel?.bindQQUserModel?.unionId == nil ||  userModel?.bindQQUserModel?.unionId == "" { //绑定QQ
+                UMManager.shared.loginGetUserInfo(platformType: UMSocialPlatformType.QQ) { (wxLoginModel) -> (Void) in
+                    SwiftMoyaNetWorkServiceUser.shared().userIsBindTripartiteBindApi(loginType:loginType,umLoginModel: wxLoginModel, completion: { [weak self] (data) -> (Void) in
+                        self?.accountSecurityView.tableView.reloadData()
+                        
+                    })
+                }
+            }
+            else { //解绑QQ
+                //            SwiftMoyaNetWorkServiceUser.shared().userUnbindWeixinApi(completion: { [weak self] (data) -> (Void) in
+                //                self?.accountSecurityView.tableView.reloadData()
+                //            })
             }
-        }else { //解绑微信
-//            SwiftMoyaNetWorkServiceUser.shared().userUnbindWeixinApi(completion: { [weak self] (data) -> (Void) in
-//                self?.accountSecurityView.tableView.reloadData()
-//            })
         }
     }
     

+ 2 - 20
RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/BindPhoneNumber/ViewController/BindPhoneNumberViewController.swift

@@ -31,6 +31,7 @@ class BindPhoneNumberViewController: BaseViewController {
     }
 
     override  func setupViews() {
+        navigationBar.wr_setBottomLineHidden(hidden: true)
         view.addSubview(bindPhoneNumberView)
     }
 
@@ -53,26 +54,7 @@ class BindPhoneNumberViewController: BaseViewController {
             [weak self] (phoneNumber,sms,invitationCode) in
             SwiftMoyaNetWorkServiceUser.shared().userBindMobileApi(mobile: phoneNumber, smsCode: sms, unionId: self?.userModel?.bindWeixinUserModel?.unionId ?? "", openId: self?.userModel?.bindWeixinUserModel?.unionId ?? "", invitationCode: invitationCode, completion: { [weak self] (data) -> (Void) in
                 if self?.bindPhoneNumberVCType == .weixinlogin { //跳转性别
-                    // 设置友盟别名
-                    UMManager.shared.addAlias()
-                    if UserModel.shared().getModel()?.isNewMember == 1 {
-                        VirusViewModel.shared.registeredVirueRecordAddApi(completion: {
-                            self?.present(GenderSelectionViewController(), animated: true, completion: {
-                                
-                            })
-                        })
-                    }else if(UserModel.shared().getModel()?.gender == nil || UserModel.shared().getModel()?.gender == 0) {//设置性别话题
-                        self?.present(GenderSelectionViewController(), animated: true, completion: {
-                            
-                        })
-                    }else if UserModel.shared().getModel()?.isFollowSuggestTopic == 0  { //设置话题
-                        self?.present(TopicSelectionViewController(), animated: true, completion: {
-                            
-                        })
-                    }else {// 设置首页
-                        kAppDelegate.setTabbarController()
-                        self?.navigationController?.popToRootViewController(animated: false)
-                    }
+                    RegisterLoginManager.registerLoginSuccessApi(vc: self!)
                 }else if self?.bindPhoneNumberVCType == .accountSecuritySet  { //设置密码
                         let vc = SetPasswordViewController()
                         self?.navigationController?.pushViewController(vc, animated: true)

+ 1 - 21
RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/MobileLogin/ViewController/MobileLoginViewController.swift

@@ -42,27 +42,7 @@ class MobileLoginViewController: BaseViewController {
         mobileLoginView.loginBlock = {
             (phoneNumber,sms,invitationCode) in
             SwiftMoyaNetWorkServiceUser.shared().userMobileRegisterApi(mobile: phoneNumber, sms_code: sms,invitationCode:invitationCode, completion: { [weak self] (data) -> (Void) in
-                // 设置友盟别名
-                UMManager.shared.addAlias()
-                if UserModel.shared().getModel()?.isNewMember == 1 {
-                    VirusViewModel.shared.registeredVirueRecordAddApi(completion: {
-                        //设置性别话题
-                        self?.present(GenderSelectionViewController(), animated: true, completion: {
-                            
-                        })
-                    })
-                }else if(UserModel.shared().getModel()?.gender == nil || UserModel.shared().getModel()?.gender == 0) {//设置性别话题
-                    self?.present(GenderSelectionViewController(), animated: true, completion: {
-                        
-                    })
-                }else if UserModel.shared().getModel()?.isFollowSuggestTopic == 0  { //设置话题
-                    self?.present(TopicSelectionViewController(), animated: true, completion: {
-                        
-                    })
-                }else {// 设置首页
-                    kAppDelegate.setTabbarController()
-                    self?.navigationController?.popToRootViewController(animated: false)
-                }
+                RegisterLoginManager.registerLoginSuccessApi(vc: self!)
             })
             
         }

+ 0 - 85
RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/RegisterLogin/View/RegisterLoginView.swift

@@ -1,85 +0,0 @@
-//
-//  RegisterLoginView.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2019/4/16.
-//  Copyright © 2019 南鑫林. All rights reserved.
-//
-
-import UIKit
-
-class RegisterLoginView: BaseView {
-
-    typealias WeiXinLoginBlock = () -> Void
-    var weiXinLoginBlock : WeiXinLoginBlock?
-
-    typealias MobileLoginBlock = () -> Void
-    var mobileLoginBlock : MobileLoginBlock?
-
-    override func setupViews() {
-        addSubview(iconImageView)
-        addSubview(weiXinLoginButton)
-        addSubview(mobileLoginButton)
-    }
-
-    override func setupLayouts() {
-        iconImageView.snp.makeConstraints { (make) in
-            make.top.equalToSuperview().offset(kScaleValue(value: 96) + kNavBarTotalHeight)
-            make.height.equalTo(kScaleValue(value: 100))
-            make.width.equalTo(kScaleValue(value: 110))
-            make.centerX.equalToSuperview()
-        }
-        weiXinLoginButton.snp.makeConstraints { (make) in
-            make.top.equalTo(iconImageView.snp.bottom).offset(kScaleValue(value: 74))
-            make.left.equalToSuperview().offset(kScaleValue(value: 38))
-            make.right.equalToSuperview().offset(kScaleValue(value: -38))
-            make.height.equalTo(kScaleValue(value: 44))
-        }
-        mobileLoginButton.snp.makeConstraints { (make) in
-            make.top.equalTo(weiXinLoginButton.snp.bottom).offset(17)
-            make.left.right.height.equalTo(weiXinLoginButton)
-        }
-    }
-
-
-    private lazy var iconImageView: UIImageView = {
-        let iconImageView = UIImageView()
-        iconImageView.image = kImage(name: "logo")
-        return iconImageView
-    }()
-
-    private lazy var weiXinLoginButton: UIButton = {
-        let weiXinLoginButton = UIButton(type: UIButton.ButtonType.custom)
-        weiXinLoginButton.setTitle("微信登录", for: UIControl.State.normal)
-        weiXinLoginButton.titleLabel?.font = kScaleRegularFont18
-        weiXinLoginButton.setBackgroundImage(UIImage.imageWithColor(color: kEnabledButtonColor), for: UIControl.State.normal)
-        weiXinLoginButton.setTitleColor(kEnabledTitleColor, for: UIControl.State.normal)
-        weiXinLoginButton.layer.cornerRadius = kScaleValue(value: 22)
-        weiXinLoginButton.layer.masksToBounds = true
-        weiXinLoginButton.rx.tap.subscribe(onNext: { [weak self] in
-            if let weiXinLoginBlock = self?.weiXinLoginBlock {
-                weiXinLoginBlock()
-            }
-        }).disposed(by: disposeBag)
-        return weiXinLoginButton
-    }()
-
-    private lazy var mobileLoginButton: UIButton = {
-        let mobileLoginButton = UIButton(type: UIButton.ButtonType.custom)
-        mobileLoginButton.setTitle("手机登录", for: UIControl.State.normal)
-        mobileLoginButton.titleLabel?.font = kScaleRegularFont18
-        mobileLoginButton.setTitleColor(k333333Color, for: UIControl.State.normal)
-        mobileLoginButton.layer.borderColor = ke6e6e6Color.cgColor
-        mobileLoginButton.layer.borderWidth = 0.5
-        mobileLoginButton.setBackgroundImage(UIImage.imageWithColor(color: kffffffColor), for: UIControl.State.normal)
-        mobileLoginButton.cornerRadius = kScaleValue(value: 22)
-        mobileLoginButton.masksToBounds = true
-        mobileLoginButton.rx.tap.subscribe(onNext: { [weak self] in
-            if let mobileLoginBlock = self?.mobileLoginBlock {
-                mobileLoginBlock()
-            }
-        }).disposed(by: disposeBag)
-        return mobileLoginButton
-    }()
-
-}

+ 185 - 40
RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/RegisterLogin/ViewController/RegisterLoginViewController.swift

@@ -8,7 +8,25 @@
 
 import UIKit
 import SwiftyMediator
+import SwiftyJSON
+
 class RegisterLoginViewController: BaseViewController {
+    
+    deinit {
+        NotificationCenter.default.removeObserver(self)
+    }
+    
+    override func viewWillDisappear(_ animated: Bool) {
+        super.viewDidDisappear(animated)
+        player.pause()
+    }
+    
+    
+    
+    override func viewWillAppear(_ animated: Bool) {
+        super.viewDidDisappear(animated)
+        player.play()
+    }
 
     override func viewDidLoad() {
         super.viewDidLoad()
@@ -18,62 +36,189 @@ class RegisterLoginViewController: BaseViewController {
     }
 
     override func setupViews() {
+        navigationBar.wr_setBackgroundAlpha(alpha: 0)
         navigationBar.wr_setBottomLineHidden(hidden: true)
-        navigationBar.wr_setRightButton(image: kImage(name: "common_order_close")!)
-        navigationBar.leftButton.isHidden = true
-        view.backgroundColor = UIColor.white
-        view.addSubview(registerLoginView)
-        view.insertSubview(navigationBar, aboveSubview:registerLoginView)
+        navigationBar.wr_setLeftButton(image: kImage(name: "nav_close_white")!)
+        statusBarStyle = .lightContent
+        view.addSubview(playerView)
+        view.addSubview(bgView)
+        view.addSubview(iconImageView)
+        view.addSubview(oneBuiltLoginButton)
+        view.addSubview(mobileLoginButton)
+        view.addSubview(weixinLoginButton)
+        view.addSubview(QQLoginButton)
+        view.insertSubview(navigationBar, aboveSubview: playerView)
+        view.insertSubview(navigationBar, aboveSubview: bgView)
 
     }
 
     override func setupLayouts() {
-        registerLoginView.snp.makeConstraints { (make) in
+        playerView.snp.makeConstraints { (make) in
             make.edges.equalToSuperview()
         }
+        bgView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+        iconImageView.snp.makeConstraints { (make) in
+            make.centerX.equalToSuperview()
+            make.top.equalTo(56 + kNavBarTotalHeight)
+        }
+        oneBuiltLoginButton.snp.makeConstraints { (make) in
+            make.bottom.equalTo(mobileLoginButton.snp.top).offset(-15)
+            make.left.equalTo(30)
+            make.right.equalTo(-30)
+            make.height.equalTo(48)
+        }
+        oneBuiltLoginButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 5)
+
+        
+        mobileLoginButton.snp.makeConstraints { (make) in
+            make.bottom.equalTo(weixinLoginButton.snp.top).offset(-20)
+            make.left.equalTo(30)
+            make.right.equalTo(-30)
+            make.height.equalTo(48)
+        }
+        mobileLoginButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 5)
+        
+        weixinLoginButton.snp.makeConstraints { (make) in
+            make.bottom.equalTo(-40)
+            make.centerX.equalToSuperview().offset(-30)
+        }
+        QQLoginButton.snp.makeConstraints { (make) in
+            make.bottom.equalTo(-40)
+            make.centerX.equalToSuperview().offset(30)
+        }
+        
+        
     }
     
     override func setupData() {
-        navigationBar.onClickRightButton = {
+        navigationBar.onClickLeftButton = {
             [weak self] in
             self?.navigationController?.dismiss(animated: true, completion: nil)
         }
-        // 微信注册登录
-        registerLoginView.weiXinLoginBlock = { [weak self] in
-            UMManager.shared.loginGetUserInfo(platformType: UMSocialPlatformType.wechatSession) { (userModel) -> (Void) in
-                let wxLoginModel = userModel
-
-                SwiftMoyaNetWorkServiceUser.shared().userWeiXinRegisterApi(loginType:.weixin,open_id: wxLoginModel.open_id, union_id: wxLoginModel.union_id, avatar: wxLoginModel.avatar, username: wxLoginModel.username, gender: wxLoginModel.gender, completion: { (userModel) -> (Void) in
-                    let userModel =  userModel as! UserModel
-                    if (userModel.mobile != nil && userModel.mobile != "" ) {
-
-                        UserModel.shared().setModel(model: userModel)
-
-                        if(userModel.gender == nil || userModel.gender == 0) {//设置性别话题
-                            self?.present(GenderSelectionViewController(), animated: true, completion: {
-                            })
-                        } else if(userModel.isFollowSuggestTopic == nil || userModel.isFollowSuggestTopic == 0) {
-                            self?.present(TopicSelectionViewController(), animated: true, completion: {
-                            })
-                        }else {// 设置首页
-                            kAppDelegate.setTabbarController()
-                        }
-                    }else {
-                        Mediator.push(RegisterLoginRouterModuleType.pushBindPhoneNumber(bindPhoneNumberVCType: .weixinlogin, userModel: userModel))
-                    }
+        
+        //一键登录
+        oneBuiltLoginButton.rx.tap.subscribe(onNext: { [weak self] in
+            
+            ATAuthSDKManager.oneBuiltLogin(vc:self!)
+            
+        }).disposed(by: disposeBag)
+        
+        // 手机验证码或密码登录
+        mobileLoginButton.rx.tap.subscribe(onNext: { [weak self] in
+            self?.navigationController?.pushViewController(MobileLoginViewController(), animated: true)
+        }).disposed(by: disposeBag)
+        
+        //微信登录
+        weixinLoginButton.rx.tap.subscribe(onNext: { [weak self] in
+            self?.tripartiteLogin(platformType: UMSocialPlatformType.wechatSession, loginType: LoginType.weixin)
+        }).disposed(by: disposeBag)
+        
+        //QQ登录
+        QQLoginButton.rx.tap.subscribe(onNext: { [weak self] in
+            self?.tripartiteLogin(platformType: UMSocialPlatformType.QQ, loginType: LoginType.qq)
+        }).disposed(by: disposeBag)
 
-                })
-            }
+    }
+    
+    private lazy var bgView: UIView = {
+        let bgView = UIView()
+        bgView.backgroundColor = UIColor(white: 0, alpha: 0.68)
+        return bgView
+    }()
+    
+    private lazy var iconImageView: UIImageView = {
+        let iconImageView = UIImageView()
+        iconImageView.image = kImage(name: "logo_slogan")
+        return iconImageView
+    }()
+    
+    private lazy var oneBuiltLoginButton: UIButton = {
+        let oneBuiltLoginButton = UIButton(type: UIButton.ButtonType.custom)
+        oneBuiltLoginButton.setTitle("手机号码一键登录", for: UIControl.State.normal)
+        oneBuiltLoginButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+        oneBuiltLoginButton.titleLabel?.font = kMediumFont16
+        oneBuiltLoginButton.setImage(kImage(name: "login_ico_iphone"), for: UIControl.State.normal)
+        oneBuiltLoginButton.setBackgroundImage(UIImage.imageWithColor(color: kffffffColor), for: UIControl.State.normal)
+        oneBuiltLoginButton.layer.cornerRadius = 24
+        oneBuiltLoginButton.layer.masksToBounds = true
+        return oneBuiltLoginButton
+    }()
+    
+    private lazy var mobileLoginButton: UIButton = {
+        let mobileLoginButton = UIButton(type: UIButton.ButtonType.custom)
+        mobileLoginButton.setTitle("手机验证码或密码登录", for: UIControl.State.normal)
+        mobileLoginButton.setTitleColor(kffffffColor, for: UIControl.State.normal)
+        mobileLoginButton.titleLabel?.font = kMediumFont16
+        mobileLoginButton.setImage(kImage(name: "login_ico_password"), for: UIControl.State.normal)
+        mobileLoginButton.setBackgroundImage(UIImage.imageWithColor(color: kffffffColor.withAlphaComponent(0.52)), for: UIControl.State.normal)
+        mobileLoginButton.cornerRadius = 24
+        mobileLoginButton.masksToBounds = true
+        return mobileLoginButton
+    }()
+    
+    private lazy var weixinLoginButton: UIButton = {
+        let weixinLoginButton = UIButton(type: UIButton.ButtonType.custom)
+        weixinLoginButton.setImage(kImage(name: "login_ico_wehcat"), for: UIControl.State.normal)
+        return weixinLoginButton
+    }()
+    
+    private lazy var QQLoginButton: UIButton = {
+        let QQLoginButton = UIButton(type: UIButton.ButtonType.custom)
+        QQLoginButton.setImage(kImage(name: "login_ico_qq"), for: UIControl.State.normal)
+        return QQLoginButton
+    }()
+    
+    private lazy var playerView: UIView = {
+        let playerView = UIView()
+        return playerView
+    }()
+    
+    private lazy var player: AVPlayer = {
+        //定义一个视频文件路径
+        let filePath = Bundle.main.path(forResource: "login_video", ofType: "mp4")
+        let videoURL = URL(fileURLWithPath: filePath!)
+        //定义一个playerItem,并监听相关的通知
+        let playerItem = AVPlayerItem(url: videoURL)
+        NotificationCenter.default.addObserver(self,
+                                               selector: #selector(playerDidFinishPlaying),
+                                               name: NSNotification.Name.AVPlayerItemDidPlayToEndTime,
+                                               object: playerItem)
+        let player = AVPlayer(playerItem: playerItem)
+        //设置大小和位置(全屏)
+        let playerLayer = AVPlayerLayer(player: player)
+        playerLayer.frame = self.view.bounds
+        playerLayer.videoGravity = .resizeAspectFill
+        //添加到界面上
+        playerView.layer.addSublayer(playerLayer)
+        return player
+    }()
+    
+    @objc func playerDidFinishPlaying(notification:Notification) {
+        
+        player.seek(to: .zero, toleranceBefore: .zero, toleranceAfter: .zero) {[weak self] (finished) in
+            self?.player.play()
         }
-        registerLoginView.mobileLoginBlock = {
-            [weak self] in
-            self?.navigationController?.pushViewController(MobileLoginViewController(), animated: true)
+    }
+    
+    //第三方登录
+    func tripartiteLogin(platformType:UMSocialPlatformType,loginType:LoginType) {
+        
+        UMManager.shared.loginGetUserInfo(platformType: platformType) { (userModel) -> (Void) in
+            let wxLoginModel = userModel
+            
+            SwiftMoyaNetWorkServiceUser.shared().userTripartiteRegisterTLoginApi(loginType:loginType,open_id: wxLoginModel.open_id, union_id: wxLoginModel.union_id, avatar: wxLoginModel.avatar, username: wxLoginModel.username, gender: wxLoginModel.gender, completion: {
+                [weak self] (userModel) -> (Void) in
+                let userModel =  userModel as! UserModel
+                if (userModel.mobile != nil && userModel.mobile != "" ) {
+                    UserModel.shared().setModel(model: userModel)
+                    RegisterLoginManager.registerLoginSuccessApi(vc: self!)
+                }else {
+                    Mediator.push(RegisterLoginRouterModuleType.pushBindPhoneNumber(bindPhoneNumberVCType: .weixinlogin, userModel: userModel))
+                }
+            })
         }
     }
 
-    private lazy var registerLoginView: RegisterLoginView = {
-        let registerLoginView = RegisterLoginView()
-        return registerLoginView
-    }()
-
 }

+ 25 - 7
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceUser/SwiftMoyaNetWorkServiceUser.swift

@@ -21,17 +21,19 @@ public class SwiftMoyaNetWorkServiceUser: NSObject {
         return sharedInstance
     }
 
-    // MARK: - 微信注册/登录
-    /// 微信注册/登录
+    // MARK: - 第三方注册/登录
+    /// 第三方注册/登录
     ///
     /// - Parameters:
+    ///   - loginType: 登录类型
     ///   - open_id: 微信 open_id
     ///   - union_id: 微信 string
     ///   - avatar: 头像
     ///   - username: 昵称
     ///   - gender: 性别 1男 2女
     ///   - completion: 回调
-    func userWeiXinRegisterApi(loginType:LoginType = .weixin,open_id:String,union_id:String,avatar:String,username:String,gender:Int,completion: @escaping successCallBack) {
+    
+    func userTripartiteRegisterTLoginApi(loginType:LoginType = .weixin,open_id:String,union_id:String,avatar:String,username:String,gender:Int,completion: @escaping successCallBack) {
         var parameters = Dictionary<String,Any>()
         parameters.updateValue(open_id, forKey: "open_id")
         parameters.updateValue(union_id, forKey: "union_id")
@@ -170,7 +172,7 @@ public class SwiftMoyaNetWorkServiceUser: NSObject {
     /// - Parameters:
     ///   - umLoginModel: UMLoginModel
     ///   - completion: 回调
-    func userIsBindWeixinBindApi(loginType:LoginType = .weixin,umLoginModel:UMLoginModel,completion: @escaping successCallBack) {
+    func userIsBindTripartiteBindApi(loginType:LoginType = .weixin,umLoginModel:UMLoginModel,completion: @escaping successCallBack) {
         var parameters = Dictionary<String,Any>()
         parameters.updateValue(umLoginModel.union_id, forKey: "union_id")
         parameters.updateValue(umLoginModel.open_id, forKey: "open_id")
@@ -181,7 +183,7 @@ public class SwiftMoyaNetWorkServiceUser: NSObject {
             if rootModel.code == 0 {
                 
 
-                self?.userBindWeixinApi(loginType:loginType, mobile: UserModel.shared().getModel()?.mobile ?? "", umLoginModel: umLoginModel, completion: completion)
+                self?.userBindTripartiteApi(loginType:loginType, mobile: UserModel.shared().getModel()?.mobile ?? "", umLoginModel: umLoginModel, completion: completion)
 
             }else if rootModel.code == 1 {
 
@@ -199,7 +201,7 @@ public class SwiftMoyaNetWorkServiceUser: NSObject {
                         
                     }, confirmBlock: {
                         [weak self] (popupView, index, string) in
-                        self?.userBindWeixinApi(loginType:loginType,mobile: UserModel.shared().getModel()?.mobile ?? "", umLoginModel: umLoginModel, completion: completion)
+                        self?.userBindTripartiteApi(loginType:loginType,mobile: UserModel.shared().getModel()?.mobile ?? "", umLoginModel: umLoginModel, completion: completion)
 
                     })
                 })
@@ -219,7 +221,7 @@ public class SwiftMoyaNetWorkServiceUser: NSObject {
     ///   - mobile: 手机号
     ///   - umLoginModel: 微信模型
     ///   - completion: 回调
-    func userBindWeixinApi(loginType:LoginType = .weixin,mobile:String,umLoginModel:UMLoginModel,completion: @escaping successCallBack) {
+    func userBindTripartiteApi(loginType:LoginType = .weixin,mobile:String,umLoginModel:UMLoginModel,completion: @escaping successCallBack) {
         
         if isMobileVerification(mobile: mobile) {
             var parameters = Dictionary<String,Any>()
@@ -842,5 +844,21 @@ public class SwiftMoyaNetWorkServiceUser: NSObject {
             (loadingStatus) in
         }
     }
+    
+    // MARK: - 手机号码一键登录
+    /// 手机号码一键登录
+    ///
+    /// - Parameter completion: 回调
+    func userMobileAuthorizationLoginApi(token:String,completion: @escaping successCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(token, forKey: "AccessToken")
+        SwiftMoyaNetWorkManager.shared.requestObject(UserModel.self,target: MultiTarget(SwiftMoyaServiceUserApi.userMobileAuthorizationLogin(parameters: parameters))) { (userModel) in
+            UserModel.shared().setModel(model: userModel as! UserModel)
+            completion(userModel)
+        }
+        SwiftMoyaNetWorkManager.shared.failCallback = {
+            (loadingStatus) in
+        }
+    }
 
 }

+ 16 - 4
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceUser/SwiftMoyaServiceUserApi.swift

@@ -149,6 +149,10 @@ public let kUserMemberSearchMemberApi = "/user/v2/member/searchMember"
 /// 获取用户彩虹豆总额
 public let kUserMemberGetTotalBeanApi = "/user/v2/member/getTotalBean"
 
+// MARK: - 手机号码一键登录
+/// 手机号码一键登录
+public let kUserMobileAuthorizationLoginApi = "/user/mobileAuthorizationLogin"
+
 
 
 /// 用户
@@ -188,6 +192,7 @@ public let kUserMemberGetTotalBeanApi = "/user/v2/member/getTotalBean"
 /// - userMemberReadMessage: 用户消息阅读
 /// - userMemberSearchMember: 用户搜索列表
 /// - userMemberGetTotalBean: 获取用户彩虹豆总额
+/// - userMobileAuthorizationLogin: 手机号码一键登录
 public enum SwiftMoyaServiceUserApi {
     case userLogout(parameters:Dictionary<String, Any>)
     case userRefresh(parameters:Dictionary<String, Any>)
@@ -224,6 +229,7 @@ public enum SwiftMoyaServiceUserApi {
     case userMemberReadMessage(parameters:Dictionary<String, Any>)
     case userMemberSearchMember(parameters:Dictionary<String, Any>)
     case userMemberGetTotalBean(parameters:Dictionary<String, Any>)
+    case userMobileAuthorizationLogin(parameters:Dictionary<String, Any>)
     
 }
 
@@ -265,7 +271,8 @@ extension SwiftMoyaServiceUserApi: TargetType {
              .userMemberMessageList,
              .userMemberReadMessage,
              .userMemberSearchMember,
-             .userMemberGetTotalBean
+             .userMemberGetTotalBean,
+             .userMobileAuthorizationLogin
             :
             return URL(string: kApiDataPrefix())!
         }
@@ -343,6 +350,8 @@ extension SwiftMoyaServiceUserApi: TargetType {
             return kUserMemberSearchMemberApi
         case .userMemberGetTotalBean:
             return kUserMemberGetTotalBeanApi
+        case .userMobileAuthorizationLogin:
+            return kUserMobileAuthorizationLoginApi
         }
     }
 
@@ -361,7 +370,8 @@ extension SwiftMoyaServiceUserApi: TargetType {
              .userAddExpressAddress,
              .userSaveExpreesContacts,
              .userAddSelfAddress,
-             .userFollow
+             .userFollow,
+             .userMobileAuthorizationLogin
             :
             return .post
         case .userAddressIsDefault,
@@ -399,7 +409,8 @@ extension SwiftMoyaServiceUserApi: TargetType {
         switch self {
         case .userWeiXinRegister(let parameters),
              .userMobileRegister(let parameters),
-             .userMobileLogin(let parameters)
+             .userMobileLogin(let parameters),
+             .userMobileAuthorizationLogin(let parameters)
              :
             return .requestParameters(parameters: parameters, encoding: URLEncoding.default)
         case .userLogout(var parameters),
@@ -458,7 +469,8 @@ extension SwiftMoyaServiceUserApi: TargetType {
         switch self {
         case .userWeiXinRegister,
              .userMobileRegister,
-             .userMobileLogin
+             .userMobileLogin,
+             .userMobileAuthorizationLogin
             :
             return (headerParameters(headerType: .moreHeader) as! [String : String])
         case .userBindWeixin,

RainbowPlanet/RainbowPlanet/Src/gif/loading.gif → RainbowPlanet/RainbowPlanet/Src/Gif/loading.gif


BIN
RainbowPlanet/RainbowPlanet/Src/Video/login_video.mp4


+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_close_white.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_close_white.imageset/nav_close_white@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_close_white.imageset/nav_close_white@3x.png


+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/MineModule.xcassets/my_set_qq.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/MineModule.xcassets/my_set_qq.imageset/my_set_qq@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/MineModule.xcassets/my_set_qq.imageset/my_set_qq@3x.png


+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_iphone.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_iphone.imageset/login_ico_iphone@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_iphone.imageset/login_ico_iphone@3x.png


+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_password.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_password.imageset/login_ico_password@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_password.imageset/login_ico_password@3x.png


+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_qq.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_qq.imageset/login_ico_qq@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_qq.imageset/login_ico_qq@3x.png


+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_wehcat.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_wehcat.imageset/login_ico_wehcat@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/login_ico_wehcat.imageset/login_ico_wehcat@3x.png


+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/logo_slogan.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/logo_slogan.imageset/logo_slogan@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/logo_slogan.imageset/logo_slogan@3x.png


+ 30 - 0
RainbowPlanet/RainbowPlanet/Tools/Extension/Extension+UIImage.swift

@@ -177,6 +177,36 @@ extension UIImage {
         return image!
     }
     
+    class func image(with color: UIColor?, size: CGSize, isRoundedCorner isRounded: Bool) -> UIImage? {
+        let rect = CGRect(x: 0, y: 0, width: size.width, height: size.height)
+        UIGraphicsBeginImageContextWithOptions(size, _: false, _: UIScreen.main.scale)
+        let context = UIGraphicsGetCurrentContext()
+        context?.setFillColor(color!.cgColor)
+        context?.fill(rect)
+        
+        var image = UIGraphicsGetImageFromCurrentImageContext()
+        UIGraphicsEndImageContext()
+        
+        if isRounded {
+            let radius: CGFloat = size.width/2
+            
+            let rect = CGRect(x: 0, y: 0, width: size.width, height: size.height)
+            UIGraphicsBeginImageContextWithOptions(size, _: false, _: UIScreen.main.scale)
+            let context = UIGraphicsGetCurrentContext()
+            let path = UIBezierPath(roundedRect: rect, byRoundingCorners: .allCorners, cornerRadii: CGSize(width: radius, height: radius))
+            context?.addPath(path.cgPath)
+            context?.clip()
+            image?.draw(in: rect)
+            context?.drawPath(using: .fillStroke)
+            
+            image = UIGraphicsGetImageFromCurrentImageContext()
+            UIGraphicsEndImageContext()
+        }
+        
+        return image
+    }
+
+    
     class func getImageSize(_ url: String?) -> CGSize {
         guard let urlStr = url else {
             return CGSize.zero

+ 29 - 34
RainbowPlanet/RainbowPlanet/Tools/SwiftProgressHUD/SwiftProgressHUD.swift

@@ -40,42 +40,41 @@ class SwiftProgressHUD: NSObject {
         return _sharedInstance
     }
 
-    /// 显示等待消息
-    ///
-    /// - Parameter title: 加载提示语
-    func showWait(_ title: String = "") {
-        hide()
-        let hud = MBProgressHUD.showAdded(to: viewToShow(), animated: true)
-        hud.show(animated: true)
-        hud.detailsLabel.text = title
-        hud.bezelView.style = .solidColor
-        hud.bezelView.backgroundColor = UIColor.clear
-        hud.mode = MBProgressHUDMode.indeterminate
-        hud.removeFromSuperViewOnHide = true
-        self.hud = hud
-    }
-    
-    /// 显示等待消息 view
-    ///
-    /// - Parameter title: 加载提示语
-    func showWait(_ title: String = "",view:UIView) {
-        hide()
-        let hud = MBProgressHUD.showAdded(to: view, animated: true)
-        hud.show(animated: true)
-        hud.detailsLabel.text = title
-        hud.bezelView.style = .solidColor
-        hud.bezelView.backgroundColor = UIColor.clear
-        hud.mode = MBProgressHUDMode.indeterminate
-        hud.removeFromSuperViewOnHide = true
-        self.hud = hud
-    }
+//    /// 显示等待消息
+//    ///
+//    /// - Parameter title: 加载提示语
+//    func showWait(_ title: String = "") {
+//        hide()
+//        let hud = MBProgressHUD.showAdded(to: viewToShow(), animated: true)
+//        hud.show(animated: true)
+//        hud.detailsLabel.text = title
+//        hud.bezelView.style = .solidColor
+//        hud.bezelView.backgroundColor = UIColor.clear
+//        hud.mode = MBProgressHUDMode.indeterminate
+//        hud.removeFromSuperViewOnHide = true
+//        self.hud = hud
+//    }
+//
+//    /// 显示等待消息 view
+//    ///
+//    /// - Parameter title: 加载提示语
+//    func showWait(_ title: String = "",view:UIView) {
+//        hide()
+//        let hud = MBProgressHUD.showAdded(to: view, animated: true)
+//        hud.show(animated: true)
+//        hud.detailsLabel.text = title
+//        hud.bezelView.style = .solidColor
+//        hud.bezelView.backgroundColor = UIColor.clear
+//        hud.mode = MBProgressHUDMode.indeterminate
+//        hud.removeFromSuperViewOnHide = true
+//        self.hud = hud
+//    }
 
 
     /// 只显示文本
     ///
     /// - Parameter title: 显示的标题
     func showText(_ title: String = "",textAlignment :NSTextAlignment = .center) {
-        hide()
         let hud = MBProgressHUD.showAdded(to: viewToShow(), animated: true)
         hud.mode = .text
         hud.detailsLabel.text = title
@@ -96,7 +95,6 @@ class SwiftProgressHUD: NSObject {
     ///
     /// - Parameter title: 显示的标题
     func showText(_ title: String = "",view:UIView,textAlignment :NSTextAlignment = .center) {
-        hide()
         let hud = MBProgressHUD.showAdded(to: view, animated: true)
         hud.mode = .text
         hud.detailsLabel.text = title
@@ -118,7 +116,6 @@ class SwiftProgressHUD: NSObject {
     ///
     /// - Parameter title: 成功的提示语
     func showSuccess(_ title: String = "",_ imageName: String = "success") {
-        hide()
         let hud = MBProgressHUD.showAdded(to: viewToShow(), animated: true)
         hud.mode = .customView //模式设置为自定义视图
         hud.customView = UIImageView(image: UIImage(named: imageName)) //自定义视图显示图片
@@ -132,7 +129,6 @@ class SwiftProgressHUD: NSObject {
     ///
     /// - Parameter title: 警告的提示语
     func showWarning(_ title: String = "",_ imageName: String = "warning") {
-        hide()
         let hud = MBProgressHUD.showAdded(to: viewToShow(), animated: true)
         hud.mode = .customView //模式设置为自定义视图
         hud.customView = UIImageView(image: UIImage(named: imageName)) //自定义视图显示图片
@@ -147,7 +143,6 @@ class SwiftProgressHUD: NSObject {
     ///
     /// - Parameter title: 加载提示语
     func showError(_ title: String = "", _ imageName: String = "error") {
-        hide()
         let hud = MBProgressHUD.showAdded(to: viewToShow(), animated: true)
         hud.mode = .customView //模式设置为自定义视图
         hud.customView = UIImageView(image: UIImage(named: imageName)) //自定义视图显示图片