Commit 1de38b03 authored by “Icebear”'s avatar “Icebear”

添加注册页逻辑,调通登录页逻辑

parent 79a7632d
...@@ -9,15 +9,24 @@ ...@@ -9,15 +9,24 @@
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
1669D09F86E4ECF0C01BD71C /* Pods_NetrainFrame.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AFAD26382CE323D58F08BF66 /* Pods_NetrainFrame.framework */; }; 1669D09F86E4ECF0C01BD71C /* Pods_NetrainFrame.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AFAD26382CE323D58F08BF66 /* Pods_NetrainFrame.framework */; };
331B5525251AEF7300FFFC5C /* MainCoordinator.m in Sources */ = {isa = PBXBuildFile; fileRef = 331B5524251AEF7300FFFC5C /* MainCoordinator.m */; }; 331B5525251AEF7300FFFC5C /* MainCoordinator.m in Sources */ = {isa = PBXBuildFile; fileRef = 331B5524251AEF7300FFFC5C /* MainCoordinator.m */; };
334824B22534722700EB3141 /* NRCommonNavigationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 334824B12534722700EB3141 /* NRCommonNavigationViewController.m */; };
334824C425356ED600EB3141 /* NRRegisterLogic.m in Sources */ = {isa = PBXBuildFile; fileRef = 334824C325356ED600EB3141 /* NRRegisterLogic.m */; };
334824CE25357FB900EB3141 /* NRNetworkManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 334824CD25357FB900EB3141 /* NRNetworkManager.m */; };
334824D22535802900EB3141 /* NRReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 334824D02535802900EB3141 /* NRReachability.m */; };
334824D72535856900EB3141 /* NRRegisterCheckVerifyCodeRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 334824D62535856900EB3141 /* NRRegisterCheckVerifyCodeRequest.m */; };
334824DB2535A22300EB3141 /* NRCountDownButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 334824DA2535A22300EB3141 /* NRCountDownButton.m */; };
334824E92535AC5B00EB3141 /* NRHomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 334824E72535AC5B00EB3141 /* NRHomeViewController.m */; };
334824EA2535AC5B00EB3141 /* NRHomeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 334824E82535AC5B00EB3141 /* NRHomeViewController.xib */; };
334824F42535AF3300EB3141 /* Target_HomeCoordinator.m in Sources */ = {isa = PBXBuildFile; fileRef = 334824F32535AF3300EB3141 /* Target_HomeCoordinator.m */; };
334824F92535AFB300EB3141 /* CTMediator+HomeCoordinatorActions.m in Sources */ = {isa = PBXBuildFile; fileRef = 334824F82535AFB300EB3141 /* CTMediator+HomeCoordinatorActions.m */; };
335609B7251B23E500628080 /* Target_LoginCoordinator.m in Sources */ = {isa = PBXBuildFile; fileRef = 335609B6251B23E500628080 /* Target_LoginCoordinator.m */; }; 335609B7251B23E500628080 /* Target_LoginCoordinator.m in Sources */ = {isa = PBXBuildFile; fileRef = 335609B6251B23E500628080 /* Target_LoginCoordinator.m */; };
335609EA251B4D9900628080 /* CTMediator+MainCoordinatorActions.m in Sources */ = {isa = PBXBuildFile; fileRef = 335609E9251B4D9900628080 /* CTMediator+MainCoordinatorActions.m */; }; 335609EA251B4D9900628080 /* CTMediator+LoginCoordinatorActions.m in Sources */ = {isa = PBXBuildFile; fileRef = 335609E9251B4D9900628080 /* CTMediator+LoginCoordinatorActions.m */; };
33560A01251B5AAF00628080 /* NRPasswordLoginRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 33560A00251B5AAF00628080 /* NRPasswordLoginRequest.m */; }; 33560A01251B5AAF00628080 /* NRPasswordLoginRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 33560A00251B5AAF00628080 /* NRPasswordLoginRequest.m */; };
33560A05251B5C3500628080 /* NRBaseRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 33560A04251B5C3500628080 /* NRBaseRequest.m */; }; 33560A05251B5C3500628080 /* NRBaseRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 33560A04251B5C3500628080 /* NRBaseRequest.m */; };
335F6A5E25184A5D0083A571 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 335F6A5D25184A5D0083A571 /* AppDelegate.m */; }; 335F6A5E25184A5D0083A571 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 335F6A5D25184A5D0083A571 /* AppDelegate.m */; };
335F6A6925184A5E0083A571 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 335F6A6825184A5E0083A571 /* Assets.xcassets */; }; 335F6A6925184A5E0083A571 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 335F6A6825184A5E0083A571 /* Assets.xcassets */; };
335F6A6C25184A5E0083A571 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 335F6A6A25184A5E0083A571 /* LaunchScreen.storyboard */; }; 335F6A6C25184A5E0083A571 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 335F6A6A25184A5E0083A571 /* LaunchScreen.storyboard */; };
335F6A6F25184A5E0083A571 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 335F6A6E25184A5E0083A571 /* main.m */; }; 335F6A6F25184A5E0083A571 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 335F6A6E25184A5E0083A571 /* main.m */; };
335F6AC8251895660083A571 /* Placeholder3 in Resources */ = {isa = PBXBuildFile; fileRef = 335F6ABD251895660083A571 /* Placeholder3 */; };
335F6ACA251895660083A571 /* Placeholder5 in Resources */ = {isa = PBXBuildFile; fileRef = 335F6AC1251895660083A571 /* Placeholder5 */; }; 335F6ACA251895660083A571 /* Placeholder5 in Resources */ = {isa = PBXBuildFile; fileRef = 335F6AC1251895660083A571 /* Placeholder5 */; };
335F6ACB251895660083A571 /* Placeholder6 in Resources */ = {isa = PBXBuildFile; fileRef = 335F6AC3251895660083A571 /* Placeholder6 */; }; 335F6ACB251895660083A571 /* Placeholder6 in Resources */ = {isa = PBXBuildFile; fileRef = 335F6AC3251895660083A571 /* Placeholder6 */; };
335F6AD125189B130083A571 /* AppDelegate+AppService.m in Sources */ = {isa = PBXBuildFile; fileRef = 335F6AD025189B130083A571 /* AppDelegate+AppService.m */; }; 335F6AD125189B130083A571 /* AppDelegate+AppService.m in Sources */ = {isa = PBXBuildFile; fileRef = 335F6AD025189B130083A571 /* AppDelegate+AppService.m */; };
...@@ -25,7 +34,6 @@ ...@@ -25,7 +34,6 @@
335F6B1E2518ADA10083A571 /* Placeholder12 in Resources */ = {isa = PBXBuildFile; fileRef = 335F6B162518ADA10083A571 /* Placeholder12 */; }; 335F6B1E2518ADA10083A571 /* Placeholder12 in Resources */ = {isa = PBXBuildFile; fileRef = 335F6B162518ADA10083A571 /* Placeholder12 */; };
335F6B1F2518ADA10083A571 /* Placeholder13 in Resources */ = {isa = PBXBuildFile; fileRef = 335F6B182518ADA10083A571 /* Placeholder13 */; }; 335F6B1F2518ADA10083A571 /* Placeholder13 in Resources */ = {isa = PBXBuildFile; fileRef = 335F6B182518ADA10083A571 /* Placeholder13 */; };
335F6B202518ADA10083A571 /* Placeholder10 in Resources */ = {isa = PBXBuildFile; fileRef = 335F6B1A2518ADA10083A571 /* Placeholder10 */; }; 335F6B202518ADA10083A571 /* Placeholder10 in Resources */ = {isa = PBXBuildFile; fileRef = 335F6B1A2518ADA10083A571 /* Placeholder10 */; };
335F6B212518ADA10083A571 /* Placeholder9 in Resources */ = {isa = PBXBuildFile; fileRef = 335F6B1C2518ADA10083A571 /* Placeholder9 */; };
33A1D2802519D8D100824CB8 /* NRLoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 33A1D27F2519D8D100824CB8 /* NRLoginViewController.m */; }; 33A1D2802519D8D100824CB8 /* NRLoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 33A1D27F2519D8D100824CB8 /* NRLoginViewController.m */; };
33A1D2832519D8EB00824CB8 /* NRLogin.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 33A1D2822519D8EB00824CB8 /* NRLogin.storyboard */; }; 33A1D2832519D8EB00824CB8 /* NRLogin.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 33A1D2822519D8EB00824CB8 /* NRLogin.storyboard */; };
33A1D28A2519E50C00824CB8 /* QMUIConfigurationTemplate.m in Sources */ = {isa = PBXBuildFile; fileRef = 33A1D2892519E50C00824CB8 /* QMUIConfigurationTemplate.m */; }; 33A1D28A2519E50C00824CB8 /* QMUIConfigurationTemplate.m in Sources */ = {isa = PBXBuildFile; fileRef = 33A1D2892519E50C00824CB8 /* QMUIConfigurationTemplate.m */; };
...@@ -43,19 +51,38 @@ ...@@ -43,19 +51,38 @@
33E979A6251C659800437015 /* NSMutableArray+Safe.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E979A5251C659800437015 /* NSMutableArray+Safe.m */; }; 33E979A6251C659800437015 /* NSMutableArray+Safe.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E979A5251C659800437015 /* NSMutableArray+Safe.m */; };
33E979BB251C757A00437015 /* BaseHttpModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E979B9251C757A00437015 /* BaseHttpModel.m */; }; 33E979BB251C757A00437015 /* BaseHttpModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E979B9251C757A00437015 /* BaseHttpModel.m */; };
33E979C1251CA2E100437015 /* NRLoginPublicKeyRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E979C0251CA2E100437015 /* NRLoginPublicKeyRequest.m */; }; 33E979C1251CA2E100437015 /* NRLoginPublicKeyRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E979C0251CA2E100437015 /* NRLoginPublicKeyRequest.m */; };
33E979D3251CAAC800437015 /* UIDevice+NRDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E979D2251CAAC800437015 /* UIDevice+NRDevice.m */; }; 33E979D3251CAAC800437015 /* UIDevice+NRAdd.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E979D2251CAAC800437015 /* UIDevice+NRAdd.m */; };
33E97ACE251CAFBA00437015 /* SFHFKeychainUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E97ACD251CAFBA00437015 /* SFHFKeychainUtils.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 33E97ACE251CAFBA00437015 /* SFHFKeychainUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E97ACD251CAFBA00437015 /* SFHFKeychainUtils.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
33E97AED251CB37200437015 /* NSString+NRRSA.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E97AEC251CB37200437015 /* NSString+NRRSA.m */; }; 33E97AED251CB37200437015 /* NSString+NRAdd.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E97AEC251CB37200437015 /* NSString+NRAdd.m */; };
33E97AF7251D8A3B00437015 /* NRUserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E97AF6251D8A3B00437015 /* NRUserModel.m */; }; 33E97AF7251D8A3B00437015 /* NRUserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E97AF6251D8A3B00437015 /* NRUserModel.m */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
331B5523251AEF7300FFFC5C /* MainCoordinator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MainCoordinator.h; sourceTree = "<group>"; }; 331B5523251AEF7300FFFC5C /* MainCoordinator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MainCoordinator.h; sourceTree = "<group>"; };
331B5524251AEF7300FFFC5C /* MainCoordinator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MainCoordinator.m; sourceTree = "<group>"; }; 331B5524251AEF7300FFFC5C /* MainCoordinator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MainCoordinator.m; sourceTree = "<group>"; };
334824B02534722700EB3141 /* NRCommonNavigationViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NRCommonNavigationViewController.h; sourceTree = "<group>"; };
334824B12534722700EB3141 /* NRCommonNavigationViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NRCommonNavigationViewController.m; sourceTree = "<group>"; };
334824C225356ED600EB3141 /* NRRegisterLogic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NRRegisterLogic.h; sourceTree = "<group>"; };
334824C325356ED600EB3141 /* NRRegisterLogic.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NRRegisterLogic.m; sourceTree = "<group>"; };
334824CC25357FB900EB3141 /* NRNetworkManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NRNetworkManager.h; sourceTree = "<group>"; };
334824CD25357FB900EB3141 /* NRNetworkManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NRNetworkManager.m; sourceTree = "<group>"; };
334824D02535802900EB3141 /* NRReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NRReachability.m; sourceTree = "<group>"; };
334824D12535802900EB3141 /* NRReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NRReachability.h; sourceTree = "<group>"; };
334824D52535856900EB3141 /* NRRegisterCheckVerifyCodeRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NRRegisterCheckVerifyCodeRequest.h; sourceTree = "<group>"; };
334824D62535856900EB3141 /* NRRegisterCheckVerifyCodeRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NRRegisterCheckVerifyCodeRequest.m; sourceTree = "<group>"; };
334824D92535A22300EB3141 /* NRCountDownButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NRCountDownButton.h; sourceTree = "<group>"; };
334824DA2535A22300EB3141 /* NRCountDownButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NRCountDownButton.m; sourceTree = "<group>"; };
334824E62535AC5B00EB3141 /* NRHomeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NRHomeViewController.h; sourceTree = "<group>"; };
334824E72535AC5B00EB3141 /* NRHomeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NRHomeViewController.m; sourceTree = "<group>"; };
334824E82535AC5B00EB3141 /* NRHomeViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NRHomeViewController.xib; sourceTree = "<group>"; };
334824F22535AF3300EB3141 /* Target_HomeCoordinator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Target_HomeCoordinator.h; sourceTree = "<group>"; };
334824F32535AF3300EB3141 /* Target_HomeCoordinator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Target_HomeCoordinator.m; sourceTree = "<group>"; };
334824F72535AFB300EB3141 /* CTMediator+HomeCoordinatorActions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CTMediator+HomeCoordinatorActions.h"; sourceTree = "<group>"; };
334824F82535AFB300EB3141 /* CTMediator+HomeCoordinatorActions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "CTMediator+HomeCoordinatorActions.m"; sourceTree = "<group>"; };
335609B5251B23E500628080 /* Target_LoginCoordinator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Target_LoginCoordinator.h; sourceTree = "<group>"; }; 335609B5251B23E500628080 /* Target_LoginCoordinator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Target_LoginCoordinator.h; sourceTree = "<group>"; };
335609B6251B23E500628080 /* Target_LoginCoordinator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Target_LoginCoordinator.m; sourceTree = "<group>"; }; 335609B6251B23E500628080 /* Target_LoginCoordinator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Target_LoginCoordinator.m; sourceTree = "<group>"; };
335609E8251B4D9900628080 /* CTMediator+MainCoordinatorActions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CTMediator+MainCoordinatorActions.h"; sourceTree = "<group>"; }; 335609E8251B4D9900628080 /* CTMediator+LoginCoordinatorActions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CTMediator+LoginCoordinatorActions.h"; sourceTree = "<group>"; };
335609E9251B4D9900628080 /* CTMediator+MainCoordinatorActions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "CTMediator+MainCoordinatorActions.m"; sourceTree = "<group>"; }; 335609E9251B4D9900628080 /* CTMediator+LoginCoordinatorActions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "CTMediator+LoginCoordinatorActions.m"; sourceTree = "<group>"; };
335609FF251B5AAF00628080 /* NRPasswordLoginRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NRPasswordLoginRequest.h; sourceTree = "<group>"; }; 335609FF251B5AAF00628080 /* NRPasswordLoginRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NRPasswordLoginRequest.h; sourceTree = "<group>"; };
33560A00251B5AAF00628080 /* NRPasswordLoginRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NRPasswordLoginRequest.m; sourceTree = "<group>"; }; 33560A00251B5AAF00628080 /* NRPasswordLoginRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NRPasswordLoginRequest.m; sourceTree = "<group>"; };
33560A03251B5C3500628080 /* NRBaseRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NRBaseRequest.h; sourceTree = "<group>"; }; 33560A03251B5C3500628080 /* NRBaseRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NRBaseRequest.h; sourceTree = "<group>"; };
...@@ -67,7 +94,6 @@ ...@@ -67,7 +94,6 @@
335F6A6B25184A5E0083A571 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 335F6A6B25184A5E0083A571 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
335F6A6D25184A5E0083A571 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 335F6A6D25184A5E0083A571 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
335F6A6E25184A5E0083A571 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 335F6A6E25184A5E0083A571 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
335F6ABD251895660083A571 /* Placeholder3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Placeholder3; sourceTree = "<group>"; };
335F6AC1251895660083A571 /* Placeholder5 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Placeholder5; sourceTree = "<group>"; }; 335F6AC1251895660083A571 /* Placeholder5 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Placeholder5; sourceTree = "<group>"; };
335F6AC3251895660083A571 /* Placeholder6 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Placeholder6; sourceTree = "<group>"; }; 335F6AC3251895660083A571 /* Placeholder6 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Placeholder6; sourceTree = "<group>"; };
335F6ACF25189B130083A571 /* AppDelegate+AppService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+AppService.h"; sourceTree = "<group>"; }; 335F6ACF25189B130083A571 /* AppDelegate+AppService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+AppService.h"; sourceTree = "<group>"; };
...@@ -77,7 +103,6 @@ ...@@ -77,7 +103,6 @@
335F6B162518ADA10083A571 /* Placeholder12 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Placeholder12; sourceTree = "<group>"; }; 335F6B162518ADA10083A571 /* Placeholder12 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Placeholder12; sourceTree = "<group>"; };
335F6B182518ADA10083A571 /* Placeholder13 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Placeholder13; sourceTree = "<group>"; }; 335F6B182518ADA10083A571 /* Placeholder13 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Placeholder13; sourceTree = "<group>"; };
335F6B1A2518ADA10083A571 /* Placeholder10 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Placeholder10; sourceTree = "<group>"; }; 335F6B1A2518ADA10083A571 /* Placeholder10 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Placeholder10; sourceTree = "<group>"; };
335F6B1C2518ADA10083A571 /* Placeholder9 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Placeholder9; sourceTree = "<group>"; };
335F6B2A2518AF170083A571 /* ThirdMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThirdMacros.h; sourceTree = "<group>"; }; 335F6B2A2518AF170083A571 /* ThirdMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThirdMacros.h; sourceTree = "<group>"; };
335F6B2B2518AF170083A571 /* FontAndColorMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontAndColorMacros.h; sourceTree = "<group>"; }; 335F6B2B2518AF170083A571 /* FontAndColorMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontAndColorMacros.h; sourceTree = "<group>"; };
335F6B2C2518AF170083A571 /* URLMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLMacros.h; sourceTree = "<group>"; }; 335F6B2C2518AF170083A571 /* URLMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLMacros.h; sourceTree = "<group>"; };
...@@ -114,12 +139,12 @@ ...@@ -114,12 +139,12 @@
33E979BA251C757A00437015 /* BaseHttpModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseHttpModel.h; sourceTree = "<group>"; }; 33E979BA251C757A00437015 /* BaseHttpModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseHttpModel.h; sourceTree = "<group>"; };
33E979BF251CA2E100437015 /* NRLoginPublicKeyRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NRLoginPublicKeyRequest.h; sourceTree = "<group>"; }; 33E979BF251CA2E100437015 /* NRLoginPublicKeyRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NRLoginPublicKeyRequest.h; sourceTree = "<group>"; };
33E979C0251CA2E100437015 /* NRLoginPublicKeyRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NRLoginPublicKeyRequest.m; sourceTree = "<group>"; }; 33E979C0251CA2E100437015 /* NRLoginPublicKeyRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NRLoginPublicKeyRequest.m; sourceTree = "<group>"; };
33E979D1251CAAC800437015 /* UIDevice+NRDevice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIDevice+NRDevice.h"; sourceTree = "<group>"; }; 33E979D1251CAAC800437015 /* UIDevice+NRAdd.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIDevice+NRAdd.h"; sourceTree = "<group>"; };
33E979D2251CAAC800437015 /* UIDevice+NRDevice.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIDevice+NRDevice.m"; sourceTree = "<group>"; }; 33E979D2251CAAC800437015 /* UIDevice+NRAdd.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIDevice+NRAdd.m"; sourceTree = "<group>"; };
33E97ACC251CAFBA00437015 /* SFHFKeychainUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SFHFKeychainUtils.h; sourceTree = "<group>"; }; 33E97ACC251CAFBA00437015 /* SFHFKeychainUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SFHFKeychainUtils.h; sourceTree = "<group>"; };
33E97ACD251CAFBA00437015 /* SFHFKeychainUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SFHFKeychainUtils.m; sourceTree = "<group>"; }; 33E97ACD251CAFBA00437015 /* SFHFKeychainUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SFHFKeychainUtils.m; sourceTree = "<group>"; };
33E97AEB251CB37200437015 /* NSString+NRRSA.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+NRRSA.h"; sourceTree = "<group>"; }; 33E97AEB251CB37200437015 /* NSString+NRAdd.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+NRAdd.h"; sourceTree = "<group>"; };
33E97AEC251CB37200437015 /* NSString+NRRSA.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+NRRSA.m"; sourceTree = "<group>"; }; 33E97AEC251CB37200437015 /* NSString+NRAdd.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+NRAdd.m"; sourceTree = "<group>"; };
33E97AF5251D8A3B00437015 /* NRUserModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NRUserModel.h; sourceTree = "<group>"; }; 33E97AF5251D8A3B00437015 /* NRUserModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NRUserModel.h; sourceTree = "<group>"; };
33E97AF6251D8A3B00437015 /* NRUserModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NRUserModel.m; sourceTree = "<group>"; }; 33E97AF6251D8A3B00437015 /* NRUserModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NRUserModel.m; sourceTree = "<group>"; };
49664D4BB9E25240F6B2F0A9 /* Pods-NetrainFrame.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NetrainFrame.release.xcconfig"; path = "Target Support Files/Pods-NetrainFrame/Pods-NetrainFrame.release.xcconfig"; sourceTree = "<group>"; }; 49664D4BB9E25240F6B2F0A9 /* Pods-NetrainFrame.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NetrainFrame.release.xcconfig"; path = "Target Support Files/Pods-NetrainFrame/Pods-NetrainFrame.release.xcconfig"; sourceTree = "<group>"; };
...@@ -144,8 +169,28 @@ ...@@ -144,8 +169,28 @@
children = ( children = (
331B5523251AEF7300FFFC5C /* MainCoordinator.h */, 331B5523251AEF7300FFFC5C /* MainCoordinator.h */,
331B5524251AEF7300FFFC5C /* MainCoordinator.m */, 331B5524251AEF7300FFFC5C /* MainCoordinator.m */,
335609E8251B4D9900628080 /* CTMediator+MainCoordinatorActions.h */, );
335609E9251B4D9900628080 /* CTMediator+MainCoordinatorActions.m */, path = Coordinator;
sourceTree = "<group>";
};
334824CA25357FA400EB3141 /* NetworkManager */ = {
isa = PBXGroup;
children = (
334824CC25357FB900EB3141 /* NRNetworkManager.h */,
334824CD25357FB900EB3141 /* NRNetworkManager.m */,
334824D12535802900EB3141 /* NRReachability.h */,
334824D02535802900EB3141 /* NRReachability.m */,
);
path = NetworkManager;
sourceTree = "<group>";
};
334824F12535AF1200EB3141 /* Coordinator */ = {
isa = PBXGroup;
children = (
334824F72535AFB300EB3141 /* CTMediator+HomeCoordinatorActions.h */,
334824F82535AFB300EB3141 /* CTMediator+HomeCoordinatorActions.m */,
334824F22535AF3300EB3141 /* Target_HomeCoordinator.h */,
334824F32535AF3300EB3141 /* Target_HomeCoordinator.m */,
); );
path = Coordinator; path = Coordinator;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -153,6 +198,8 @@ ...@@ -153,6 +198,8 @@
335609B4251B23D100628080 /* Coordinator */ = { 335609B4251B23D100628080 /* Coordinator */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
335609E8251B4D9900628080 /* CTMediator+LoginCoordinatorActions.h */,
335609E9251B4D9900628080 /* CTMediator+LoginCoordinatorActions.m */,
335609B5251B23E500628080 /* Target_LoginCoordinator.h */, 335609B5251B23E500628080 /* Target_LoginCoordinator.h */,
335609B6251B23E500628080 /* Target_LoginCoordinator.m */, 335609B6251B23E500628080 /* Target_LoginCoordinator.m */,
); );
...@@ -176,6 +223,8 @@ ...@@ -176,6 +223,8 @@
children = ( children = (
33E9796E251B601700437015 /* NRLoginLogic.h */, 33E9796E251B601700437015 /* NRLoginLogic.h */,
33E9796F251B601700437015 /* NRLoginLogic.m */, 33E9796F251B601700437015 /* NRLoginLogic.m */,
334824C225356ED600EB3141 /* NRRegisterLogic.h */,
334824C325356ED600EB3141 /* NRRegisterLogic.m */,
); );
path = Logic; path = Logic;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -197,6 +246,8 @@ ...@@ -197,6 +246,8 @@
33E9795F251B5D8100437015 /* NRVerifyCodeRequest.m */, 33E9795F251B5D8100437015 /* NRVerifyCodeRequest.m */,
33E97962251B5D9400437015 /* NRRegisterRequest.h */, 33E97962251B5D9400437015 /* NRRegisterRequest.h */,
33E97963251B5D9400437015 /* NRRegisterRequest.m */, 33E97963251B5D9400437015 /* NRRegisterRequest.m */,
334824D52535856900EB3141 /* NRRegisterCheckVerifyCodeRequest.h */,
334824D62535856900EB3141 /* NRRegisterCheckVerifyCodeRequest.m */,
); );
path = Service; path = Service;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -284,7 +335,7 @@ ...@@ -284,7 +335,7 @@
335F6ABC251895660083A571 /* Manager */ = { 335F6ABC251895660083A571 /* Manager */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
335F6ABD251895660083A571 /* Placeholder3 */, 334824CA25357FA400EB3141 /* NetworkManager */,
); );
path = Manager; path = Manager;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -326,6 +377,7 @@ ...@@ -326,6 +377,7 @@
335F6B0D2518ACF80083A571 /* Home */ = { 335F6B0D2518ACF80083A571 /* Home */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
334824F12535AF1200EB3141 /* Coordinator */,
335F6B1B2518ADA10083A571 /* Controller */, 335F6B1B2518ADA10083A571 /* Controller */,
335F6B192518ADA10083A571 /* Logic */, 335F6B192518ADA10083A571 /* Logic */,
335F6B132518ADA10083A571 /* Model */, 335F6B132518ADA10083A571 /* Model */,
...@@ -370,7 +422,9 @@ ...@@ -370,7 +422,9 @@
335F6B1B2518ADA10083A571 /* Controller */ = { 335F6B1B2518ADA10083A571 /* Controller */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
335F6B1C2518ADA10083A571 /* Placeholder9 */, 334824E62535AC5B00EB3141 /* NRHomeViewController.h */,
334824E72535AC5B00EB3141 /* NRHomeViewController.m */,
334824E82535AC5B00EB3141 /* NRHomeViewController.xib */,
); );
path = Controller; path = Controller;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -410,6 +464,8 @@ ...@@ -410,6 +464,8 @@
children = ( children = (
33A1D2922519EB5100824CB8 /* NRCommonViewController.h */, 33A1D2922519EB5100824CB8 /* NRCommonViewController.h */,
33A1D2932519EB5100824CB8 /* NRCommonViewController.m */, 33A1D2932519EB5100824CB8 /* NRCommonViewController.m */,
334824B02534722700EB3141 /* NRCommonNavigationViewController.h */,
334824B12534722700EB3141 /* NRCommonNavigationViewController.m */,
); );
path = Controllers; path = Controllers;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -434,10 +490,12 @@ ...@@ -434,10 +490,12 @@
33E97ACC251CAFBA00437015 /* SFHFKeychainUtils.h */, 33E97ACC251CAFBA00437015 /* SFHFKeychainUtils.h */,
33E97ACD251CAFBA00437015 /* SFHFKeychainUtils.m */, 33E97ACD251CAFBA00437015 /* SFHFKeychainUtils.m */,
33E979A5251C659800437015 /* NSMutableArray+Safe.m */, 33E979A5251C659800437015 /* NSMutableArray+Safe.m */,
33E979D1251CAAC800437015 /* UIDevice+NRDevice.h */, 33E979D1251CAAC800437015 /* UIDevice+NRAdd.h */,
33E979D2251CAAC800437015 /* UIDevice+NRDevice.m */, 33E979D2251CAAC800437015 /* UIDevice+NRAdd.m */,
33E97AEB251CB37200437015 /* NSString+NRRSA.h */, 33E97AEB251CB37200437015 /* NSString+NRAdd.h */,
33E97AEC251CB37200437015 /* NSString+NRRSA.m */, 33E97AEC251CB37200437015 /* NSString+NRAdd.m */,
334824D92535A22300EB3141 /* NRCountDownButton.h */,
334824DA2535A22300EB3141 /* NRCountDownButton.m */,
); );
path = Categories; path = Categories;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -527,12 +585,11 @@ ...@@ -527,12 +585,11 @@
isa = PBXResourcesBuildPhase; isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
335F6AC8251895660083A571 /* Placeholder3 in Resources */,
335F6A6C25184A5E0083A571 /* LaunchScreen.storyboard in Resources */, 335F6A6C25184A5E0083A571 /* LaunchScreen.storyboard in Resources */,
335F6A6925184A5E0083A571 /* Assets.xcassets in Resources */, 335F6A6925184A5E0083A571 /* Assets.xcassets in Resources */,
335F6B202518ADA10083A571 /* Placeholder10 in Resources */, 335F6B202518ADA10083A571 /* Placeholder10 in Resources */,
335F6B212518ADA10083A571 /* Placeholder9 in Resources */,
33E979A1251C4B7900437015 /* BaseUrlConfig.json in Resources */, 33E979A1251C4B7900437015 /* BaseUrlConfig.json in Resources */,
334824EA2535AC5B00EB3141 /* NRHomeViewController.xib in Resources */,
33A1D2832519D8EB00824CB8 /* NRLogin.storyboard in Resources */, 33A1D2832519D8EB00824CB8 /* NRLogin.storyboard in Resources */,
335F6B1D2518ADA10083A571 /* Placeholder11 in Resources */, 335F6B1D2518ADA10083A571 /* Placeholder11 in Resources */,
335F6ACB251895660083A571 /* Placeholder6 in Resources */, 335F6ACB251895660083A571 /* Placeholder6 in Resources */,
...@@ -593,15 +650,19 @@ ...@@ -593,15 +650,19 @@
files = ( files = (
33E97964251B5D9500437015 /* NRRegisterRequest.m in Sources */, 33E97964251B5D9500437015 /* NRRegisterRequest.m in Sources */,
335609B7251B23E500628080 /* Target_LoginCoordinator.m in Sources */, 335609B7251B23E500628080 /* Target_LoginCoordinator.m in Sources */,
33E97AED251CB37200437015 /* NSString+NRRSA.m in Sources */, 33E97AED251CB37200437015 /* NSString+NRAdd.m in Sources */,
335F6AD125189B130083A571 /* AppDelegate+AppService.m in Sources */, 335F6AD125189B130083A571 /* AppDelegate+AppService.m in Sources */,
33E979C1251CA2E100437015 /* NRLoginPublicKeyRequest.m in Sources */, 33E979C1251CA2E100437015 /* NRLoginPublicKeyRequest.m in Sources */,
33E97993251C476300437015 /* NRBaseModelAgent.m in Sources */, 33E97993251C476300437015 /* NRBaseModelAgent.m in Sources */,
335609EA251B4D9900628080 /* CTMediator+MainCoordinatorActions.m in Sources */, 335609EA251B4D9900628080 /* CTMediator+LoginCoordinatorActions.m in Sources */,
334824F92535AFB300EB3141 /* CTMediator+HomeCoordinatorActions.m in Sources */,
33A1D28A2519E50C00824CB8 /* QMUIConfigurationTemplate.m in Sources */, 33A1D28A2519E50C00824CB8 /* QMUIConfigurationTemplate.m in Sources */,
33E979D3251CAAC800437015 /* UIDevice+NRDevice.m in Sources */, 33E979D3251CAAC800437015 /* UIDevice+NRAdd.m in Sources */,
334824DB2535A22300EB3141 /* NRCountDownButton.m in Sources */,
33E97ACE251CAFBA00437015 /* SFHFKeychainUtils.m in Sources */, 33E97ACE251CAFBA00437015 /* SFHFKeychainUtils.m in Sources */,
334824F42535AF3300EB3141 /* Target_HomeCoordinator.m in Sources */,
33E97AF7251D8A3B00437015 /* NRUserModel.m in Sources */, 33E97AF7251D8A3B00437015 /* NRUserModel.m in Sources */,
334824C425356ED600EB3141 /* NRRegisterLogic.m in Sources */,
33E97968251B5E8B00437015 /* NRServerTimeRequest.m in Sources */, 33E97968251B5E8B00437015 /* NRServerTimeRequest.m in Sources */,
33560A01251B5AAF00628080 /* NRPasswordLoginRequest.m in Sources */, 33560A01251B5AAF00628080 /* NRPasswordLoginRequest.m in Sources */,
33A1D2942519EB5100824CB8 /* NRCommonViewController.m in Sources */, 33A1D2942519EB5100824CB8 /* NRCommonViewController.m in Sources */,
...@@ -612,10 +673,15 @@ ...@@ -612,10 +673,15 @@
33E97975251B618700437015 /* NRVerifyCodeLoginRequest.m in Sources */, 33E97975251B618700437015 /* NRVerifyCodeLoginRequest.m in Sources */,
33E979A6251C659800437015 /* NSMutableArray+Safe.m in Sources */, 33E979A6251C659800437015 /* NSMutableArray+Safe.m in Sources */,
33A1D2802519D8D100824CB8 /* NRLoginViewController.m in Sources */, 33A1D2802519D8D100824CB8 /* NRLoginViewController.m in Sources */,
334824E92535AC5B00EB3141 /* NRHomeViewController.m in Sources */,
33A1D28F2519E8AD00824CB8 /* NRRegisterViewController.m in Sources */, 33A1D28F2519E8AD00824CB8 /* NRRegisterViewController.m in Sources */,
33E97970251B601700437015 /* NRLoginLogic.m in Sources */, 33E97970251B601700437015 /* NRLoginLogic.m in Sources */,
334824D22535802900EB3141 /* NRReachability.m in Sources */,
334824CE25357FB900EB3141 /* NRNetworkManager.m in Sources */,
335F6A6F25184A5E0083A571 /* main.m in Sources */, 335F6A6F25184A5E0083A571 /* main.m in Sources */,
33560A05251B5C3500628080 /* NRBaseRequest.m in Sources */, 33560A05251B5C3500628080 /* NRBaseRequest.m in Sources */,
334824B22534722700EB3141 /* NRCommonNavigationViewController.m in Sources */,
334824D72535856900EB3141 /* NRRegisterCheckVerifyCodeRequest.m in Sources */,
33E979BB251C757A00437015 /* BaseHttpModel.m in Sources */, 33E979BB251C757A00437015 /* BaseHttpModel.m in Sources */,
331B5525251AEF7300FFFC5C /* MainCoordinator.m in Sources */, 331B5525251AEF7300FFFC5C /* MainCoordinator.m in Sources */,
); );
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
-(void)initWindow{ -(void)initWindow{
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.coordinator = [[MainCoordinator alloc] initWithWindow:self.window]; self.coordinator = [[MainCoordinator alloc] init];
[self.coordinator start]; [self.coordinator start];
} }
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
// //
#import "NRBaseRequest.h" #import "NRBaseRequest.h"
#import "NRGlobalUrlModel.h"
@interface NRBaseRequest() @interface NRBaseRequest()
......
//
// NRCommonNavigationViewController.h
// NetrainFrame
//
// Created by Gin on 2020/10/12.
//
#import <QMUIKit/QMUIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface NRCommonNavigationViewController : QMUINavigationController
@end
NS_ASSUME_NONNULL_END
//
// NRCommonNavigationViewController.m
// NetrainFrame
//
// Created by Gin on 2020/10/12.
//
#import "NRCommonNavigationViewController.h"
@interface NRCommonNavigationViewController ()
@end
@implementation NRCommonNavigationViewController
- (void)viewDidLoad {
[super viewDidLoad];
QMUICMI.needsBackBarButtonItemTitle = YES;
// Do any additional setup after loading the view.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
...@@ -28,6 +28,10 @@ ...@@ -28,6 +28,10 @@
- (BOOL)shouldCustomizeNavigationBarTransitionIfHideable { - (BOOL)shouldCustomizeNavigationBarTransitionIfHideable {
return YES; return YES;
} }
-(void)dealloc{
NSLog(@"%@ dealloc",NSStringFromClass([self class]));
}
/* /*
#pragma mark - Navigation #pragma mark - Navigation
......
...@@ -11,8 +11,6 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -11,8 +11,6 @@ NS_ASSUME_NONNULL_BEGIN
@interface MainCoordinator : NSObject @interface MainCoordinator : NSObject
- (instancetype)initWithWindow:(UIWindow *)window;
- (void)start; - (void)start;
@end @end
......
...@@ -6,26 +6,16 @@ ...@@ -6,26 +6,16 @@
// //
#import "MainCoordinator.h" #import "MainCoordinator.h"
#import "CTMediator+MainCoordinatorActions.h" #import "CTMediator+LoginCoordinatorActions.h"
@interface MainCoordinator() @interface MainCoordinator()
@property(nonatomic, weak) UIWindow *window;
@property(nonatomic, strong) NSMutableArray *childCoordinators; @property(nonatomic, strong) NSMutableArray *childCoordinators;
@end @end
@implementation MainCoordinator @implementation MainCoordinator
- (instancetype)initWithWindow:(UIWindow *)window
{
self = [super init];
if (self) {
self.window = window;
}
return self;
}
-(void)start{ -(void)start{
BOOL isLogin = YES; BOOL isLogin = YES;
if(isLogin){ if(isLogin){
...@@ -41,9 +31,10 @@ ...@@ -41,9 +31,10 @@
} }
- (void)showLogin{ - (void)showLogin{
UIWindow *window = [UIApplication sharedApplication].windows.firstObject;
UIViewController *viewController = [[CTMediator sharedInstance] CTMediator_viewControllerForLoginCoordinator]; UIViewController *viewController = [[CTMediator sharedInstance] CTMediator_viewControllerForLoginCoordinator];
self.window.rootViewController = viewController; window.rootViewController = viewController;
[self.window makeKeyAndVisible]; [window makeKeyAndVisible];
} }
-(void)showNew{ -(void)showNew{
......
...@@ -10,13 +10,121 @@ ...@@ -10,13 +10,121 @@
#ifndef CommonMacros_h #ifndef CommonMacros_h
#define CommonMacros_h #define CommonMacros_h
#pragma mark - ——————— 用户相关 ———————— #pragma 通知
#define kNotification_update_authStatus @"Notification_update_authStatus" //认证状态
#define KNotification_toAuthStatus @"Notification_toAuthStatus" //咨询页认证通知
#define kNotification_update_recordStatus @"Notification_update_recordStatus" //备案状态
#define kNotification_update_mine_info @"Notification_update_mine_info"
#define kNotification_update_mine_info_more @"Notification_update_mine_info_more"
#define kNotification_update_bank_info_info @"Notification_update_bank_info_info"
#define kNotification_selected_mine_bank_card @"Notification_selected_mine_bank_card"
#define kNotification_delete_bank @"Notification_delete_bank"
#define kNotification_new_sufferer @"Notification_new_sufferer"//新患者通知
#define kNotification_visitAgain @"Notification_visitAgain"//随访通知
#define kNotification_newRequire @"Notification_newRequire"//求药通知
#define kNotification_IMNew_sufferer @"Notification_newIM_sufferer"//IM新患者通知
#define kNotification_sufferer_group_update @"Notification_sufferer_group_update"//分组更新
#define NOTIFICATION_RESIGN_ACTIVE @"appResignActive"//进入后台通知
#define NOTIFICATION_BECOME_ACTIVE @"appBecomeActive"//进入前台通知
#define notificationCenter_newChat @"notificationCenter_newChat" //新消息通知
#define NotificationcheckRecomandId @"messageUpdateWithRecomandId" //审核更改
#define NotificationPrescriptionSign @"prescriptionSignNotice" //处方签名通知
#define NotificationFaceRecognition @"faceRecognition" //人脸识别通知
#define BeginVoiceRecord @"notificationCenter_beginVoiceRecord" //开始录音
#define qlkDurgNotificationCenter @"qlkDurgNotification" //药品链接通知
#define qlkMedichienDeleteAction @"qlkMedichienDeleteNotification" //药品确认页删除药品
#define NotificationCloseVoice @"CloseVoiceAnimation" //关闭语音动画
#define finishDownLoadNotification @"FinishDownLoad" //下载完成
#define NotificatioinPatientByMdc @"TimeOutOfPatientByMdc" //系统确认购药
#define NotificationReservationId @"videoReservationId" //视屏预约通知
#define NotificationReservationIdAdd @"videoReservationIdNumAdd" //视屏红点数量
#define NotificationShowSignInView @"ShowSignInView" // 恢复签到遮罩View通知
#define NotificationCloseByNotificationMaskView @"NotificationMaskView" //关闭签到页面的通知
#define kVideoEndEventNotification @"VideoEndEventNotification" //视频结束通知
#define deleteSuffererNotification @"deleteSuffererNotification"
#define MWPHOTO_DOUBLETAP @"MWPHOTO_DOUBLETAP"
#pragma mark - ——————— 网络状态相关 ———————— #define HomeRefrashData @"refreshHomeConfigData" //刷新首页
#define DeleteSystemMsgData @"DeleteSystemMessageData" //删除通过push点击
#define notificationSystemMsgData @"QLKSystemMessageData" //系统消息通知
#define notificationConsultData @"QLKReloadConsultData"
#define notificationHomeSignDataReFresh @"notificationHomeSignDataReFresh"
#define notificationConsultDataSingleState @"QLKReloadConsultDataSingleState"
#define notificationRequestSufferersNumber @"QLKRequestSufferersNumber"
#define kCheckH5ConfigVersion @"QLKCheckH5ConfigVersion"
#define NotificationSignInEncouragePointsViewRemove @"SignInEncouragePointsViewRemove"//其他弹框出现时,移除该签到积分的view的通知
#define kNotification_update_groups @"Notification_update_groups" //更新分组
#define kNotification_update_groups_text @"Notification_update_groups_text" //更新分组文本 病历中使用
#define KNotification_jumpIntoLoginVC @"QLKLoginMainViewController" //后端返回错误码,vc 切换为登录页面
#define kNotification_update_medical_history_resource @"Notification_update_medical_history_resource"
//网络状态变化 #define QLKUpdatePrice_NOT @"QLKUpdatePrice_NOT" //改价通知
#define KNotificationNetWorkStateChange @"KNotificationNetWorkStateChange" #define kNotificationInvalidPrescriptMedical @"Notification_invalid_prescript_medical_record" //处方或病历的作废通知
#pragma 参数
#define consumer_Phone (@"0571-29601197")
#define weixin_AppId (@"wxc3ca4f0be2d94db4")
#define weixin_Secret (@"b871f2b9deeae8cb67bef293ccc6b747")
#define qq_AppId (@"1104685355")
#define qq_Secret (@"fQEWrfKIjbffAP2B")
#define UmengShareAppkey @"53290df956240b6b4a0084b3"
#pragma 常量字符串
#define QLK_PAYSETTING_STATE @"qlk_paysetting_state"
#define QLK_PAYSETTING_PRICE @"qlk_paysetting_price"
#define QLK_ClickComment @"QLK_ClickComment"//-wfh- 2.9新加记录用户是否第一次点击评价的标示 key
#define QLK_DoctorClickComment @"QLK_DoctorClickComment"//-wfh- 2.9新加记录用户是否第一次点击评价的标示 value
#define QLKSimulationToken @"QLKSimulationToken"
#define productList_Search (@"productListSearch")
#define ProductImagView @"ProductImagView"
#define NewMsgId @"NewMsgId"//公告虚拟id
#define QLK_chatListHelpShow (@"chatListHelpShow")
#define QLK_save (@"save")
#define toastTextFontSize 15.0
#define newHomeViewTag 1000101
#define BannerBelowViewHeight 52
#define IPHONE5_HEIGHT 568
#define kUnifiedTableViewCellHeight 50
#define kNaviHeight 64 // 导航栏和状态栏高度
// 空字符串转为@""
#define S(x) (x ? x : @"")
#pragma 提示语
#define kEmptyPhoneNumberHint @"请输入手机号码"
#define kErrPhoneNumberHint @"请输入正确的手机号码"
#define kEmptyVerifyCodeHint @"请输入验证码"
#define kEmptyPassword @"请输入9-16位新密码"
#define kPasswordInconformity @"密码不符合规则"
#define kErrNetworkStatus @"网络请求失败,请检查您的网络设置"
#define KErrNoService @"当前网络不给力,请检查网络稍后再试~"
#define KErrDataMsg @"数据异常"
#define KnowMsg @"知道了"
#define ctnMedicen @"继续推荐"
#define ToauthStatus @"去认证"
#define CancleauthStatus @"暂不认证"
#define ToRecordStatus @"去备案"
#define CanclRecordStatus @"暂不备案"
#define checkvideoStatus @"需要通过身份认证\n方可开通视频咨询"
#define cheakingVideoStaus @"您的身份认证正在审核中,通过后才能使用此功能哦!"
#define newHomeAutherStatus @"通过身份认证后可体验更多功能哦"
#define medicenAutherStatus @"由于您尚未通过身份认证审核,仅有有限的推荐用药次数。建议前往进行身份认证!"
#define failWithCheakStatus @"请您完成医生认证后再使用此功能!"
#define cheakingStaus @"您的身份认证正在审核中,请您耐心等待!"
#define recordingFailStaus @"请您完成医生多点执业备案后再使用此功能!"
#define recordingStaus @"您的医生多点执业备案正在审核中,请您耐心等待!"
#define cheakinghealthyStaus @"您的身份认证正在审核中,通过后才能推荐检查哦!"
#define MedchineMsg @"患者提交了处方药购药咨询,请解答患者的相关问题,您可以点击用药确认或重新推荐相关药品"
#define endMsgPrompt @"由于超过30分钟未解答患者的购药咨询,已由药师处理,患者购药后您将不能获得相应积分"
//电子签名和备案
#define requireRecord @"根据卫健委要求,也是为了保障您的处方行为真实有效,请提交互联网医院备案资料"
#define recordFail @"抱歉,您的互联网医院备案审核未通过,请重新提交。"
#define recordAfterCancelContent @"稍后您可以在个人中心>互联网医院备案,提交备案资料"
#endif /* QLKStatic_Stringi_h */
#endif /* CommonMacros_h */
...@@ -66,6 +66,12 @@ ...@@ -66,6 +66,12 @@
#define DLog(...) #define DLog(...)
#endif #endif
///输入框字数限制
#define kAccountMaxLength 11 //手机号长度限制
#define kPassswordMaxLength 16 //登录密码长度最大限制
#define kPassswordMinLength 9 //登录密码长度最小限制
#define kVerifyCodeMaxLength 4 //验证码长度限制
//拼接字符串 //拼接字符串
#define NSStringFormat(format,...) [NSString stringWithFormat:format,##__VA_ARGS__] #define NSStringFormat(format,...) [NSString stringWithFormat:format,##__VA_ARGS__]
......
//
// NRNetworkManager.h
// NetrainFrame
//
// Created by Gin on 2020/10/13.
//
#import <Foundation/Foundation.h>
@class NRReachability;
NS_ASSUME_NONNULL_BEGIN
@interface NRNetworkManager : NSObject
SINGLETON_FOR_HEADER(NRNetworkManager)
@property (nonatomic,strong) NRReachability *hostReachability;
-(BOOL/*判断当否有网络*/)currentReachable;
@end
NS_ASSUME_NONNULL_END
//
// NRNetworkManager.m
// NetrainFrame
//
// Created by Gin on 2020/10/13.
//
#import "NRNetworkManager.h"
#import "NRReachability.h"
@implementation NRNetworkManager
SINGLETON_FOR_CLASS(NRNetworkManager)
-(void)checkNetwork{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reachabilityChanging:) name:qlkReachabilityChangedNotification object:nil];
self.hostReachability = [NRReachability reachabilityWithHostName:[NRGlobalUrlModel sharedInstance].kHost];
[self.hostReachability startNotifier];
[self updateInterfaceWithReachability:self.hostReachability];
}
- (void) reachabilityChanging:(NSNotification *)note
{
NRReachability* curReach = [note object];
NSParameterAssert([curReach isKindOfClass:[NRReachability class]]);
[self updateInterfaceWithReachability:curReach];
}
-(BOOL/*判断当否有网络*/)currentReachable{
struct sockaddr_in zeroAddress;
bzero(&zeroAddress, sizeof(zeroAddress));
zeroAddress.sin_len = sizeof(zeroAddress);
zeroAddress.sin_family = AF_INET;
// Recover reachability flags
SCNetworkReachabilityRef defaultRouteReachability = SCNetworkReachabilityCreateWithAddress(NULL, (struct sockaddr *)&zeroAddress);
SCNetworkReachabilityFlags flags;
BOOL didRetrieveFlags = SCNetworkReachabilityGetFlags(defaultRouteReachability, &flags);
CFRelease(defaultRouteReachability);
if (!didRetrieveFlags)
{
return NO;
}
BOOL isReachable = flags & kSCNetworkFlagsReachable;
BOOL needsConnection = flags & kSCNetworkFlagsConnectionRequired;
return (isReachable && !needsConnection) ? YES : NO;
}
- (void/*获取当前网络状态*/)updateInterfaceWithReachability:(NRReachability *)reachability
{
if (reachability == self.hostReachability){
qlkNetworkStatus netStatus = [reachability currentReachabilityStatus];
}
}
@end
/*
Copyright (C) 2016 Apple Inc. All Rights Reserved.
See LICENSE.txt for this sample’s licensing information
Abstract:
Basic demonstration of how to use the SystemConfiguration Reachablity APIs.
*/
#import <Foundation/Foundation.h>
#import <SystemConfiguration/SystemConfiguration.h>
#import <netinet/in.h>
typedef enum : NSInteger {
qlkNotReachable = 0,
qlkReachableViaWiFi,
qlkReachableViaWWAN,
kReachableVia2G,
kReachableVia3G,
kReachableVia4G
} qlkNetworkStatus;
#pragma mark IPv6 Support
//Reachability fully support IPv6. For full details, see ReadMe.md.
extern NSString *qlkReachabilityChangedNotification;
@interface NRReachability : NSObject
/*!
* Use to check the reachability of a given host name.
*/
+ (instancetype)reachabilityWithHostName:(NSString *)hostName;
/*!
* Use to check the reachability of a given IP address.
*/
+ (instancetype)reachabilityWithAddress:(const struct sockaddr *)hostAddress;
/*!
* Checks whether the default route is available. Should be used by applications that do not connect to a particular host.
*/
+ (instancetype)reachabilityForInternetConnection;
#pragma mark reachabilityForLocalWiFi
//reachabilityForLocalWiFi has been removed from the sample. See ReadMe.md for more information.
//+ (instancetype)reachabilityForLocalWiFi;
/*!
* Start listening for reachability notifications on the current run loop.
*/
- (BOOL)startNotifier;
- (void)stopNotifier;
- (qlkNetworkStatus)currentReachabilityStatus;
/*!
* WWAN may be available, but not active until a connection has been established. WiFi may require a connection for VPN on Demand.
*/
- (BOOL)connectionRequired;
/**
* 获取运营商编码
* @return 1-中国移动, 2-中国联通, 3-中国电信
*/
- (int)getMobileNetworkCode;
@end
/*
Copyright (C) 2016 Apple Inc. All Rights Reserved.
See LICENSE.txt for this sample’s licensing information
Abstract:
Basic demonstration of how to use the SystemConfiguration Reachablity APIs.
*/
#import <arpa/inet.h>
#import <ifaddrs.h>
#import <netdb.h>
#import <sys/socket.h>
#import <netinet/in.h>
#import <CoreFoundation/CoreFoundation.h>
#import<CoreTelephony/CTTelephonyNetworkInfo.h>
#import <CoreTelephony/CTCarrier.h>
#import "NRReachability.h"
#pragma mae
//Reachability fully support IPv6. For full details, see ReadMe.md.
NSString *const kLocalWiFiConnection = @"LocalWiFiConnection";
NSString *qlkReachabilityChangedNotification = @"qlkNetworkReachabilityChangedNotification";
#pragma mark - Supporting functions
#define kShouldPrintReachabilityFlags 1
static void PrintReachabilityFlags(SCNetworkReachabilityFlags flags, const char* comment)
{
#if kShouldPrintReachabilityFlags
NSLog(@"Reachability Flag Status: %c%c %c%c%c%c%c%c%c %s\n",
(flags & kSCNetworkReachabilityFlagsIsWWAN) ? 'W' : '-',
(flags & kSCNetworkReachabilityFlagsReachable) ? 'R' : '-',
(flags & kSCNetworkReachabilityFlagsTransientConnection) ? 't' : '-',
(flags & kSCNetworkReachabilityFlagsConnectionRequired) ? 'c' : '-',
(flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) ? 'C' : '-',
(flags & kSCNetworkReachabilityFlagsInterventionRequired) ? 'i' : '-',
(flags & kSCNetworkReachabilityFlagsConnectionOnDemand) ? 'D' : '-',
(flags & kSCNetworkReachabilityFlagsIsLocalAddress) ? 'l' : '-',
(flags & kSCNetworkReachabilityFlagsIsDirect) ? 'd' : '-',
comment
);
#endif
}
static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* info)
{
#pragma unused (target, flags)
NSCAssert(info != NULL, @"info was NULL in ReachabilityCallback");
NSCAssert([(__bridge NSObject*) info isKindOfClass: [NRReachability class]], @"info was wrong class in ReachabilityCallback");
NRReachability* noteObject = (__bridge NRReachability *)info;
// Post a notification to notify the client that the network reachability changed.
[[NSNotificationCenter defaultCenter] postNotificationName: qlkReachabilityChangedNotification object: noteObject];
}
#pragma mark - Reachability implementation
@implementation NRReachability
{
SCNetworkReachabilityRef _reachabilityRef;
}
+ (instancetype)reachabilityWithHostName:(NSString *)hostName
{
NRReachability* returnValue = NULL;
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, [hostName UTF8String]);
if (reachability != NULL)
{
returnValue= [[self alloc] init];
if (returnValue != NULL)
{
returnValue->_reachabilityRef = reachability;
}
else {
CFRelease(reachability);
}
}
return returnValue;
}
+ (instancetype)reachabilityWithAddress:(const struct sockaddr *)hostAddress
{
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, hostAddress);
NRReachability* returnValue = NULL;
if (reachability != NULL)
{
returnValue = [[self alloc] init];
if (returnValue != NULL)
{
returnValue->_reachabilityRef = reachability;
}
else {
CFRelease(reachability);
}
}
return returnValue;
}
+ (instancetype)reachabilityForInternetConnection
{
struct sockaddr_in zeroAddress;
bzero(&zeroAddress, sizeof(zeroAddress));
zeroAddress.sin_len = sizeof(zeroAddress);
zeroAddress.sin_family = AF_INET;
return [self reachabilityWithAddress: (const struct sockaddr *) &zeroAddress];
}
#pragma mark reachabilityForLocalWiFi
//reachabilityForLocalWiFi has been removed from the sample. See ReadMe.md for more information.
//+ (instancetype)reachabilityForLocalWiFi
#pragma mark - Start and stop notifier
- (BOOL)startNotifier
{
BOOL returnValue = NO;
SCNetworkReachabilityContext context = {0, (__bridge void *)(self), NULL, NULL, NULL};
if (SCNetworkReachabilitySetCallback(_reachabilityRef, ReachabilityCallback, &context))
{
if (SCNetworkReachabilityScheduleWithRunLoop(_reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode))
{
returnValue = YES;
}
}
return returnValue;
}
- (void)stopNotifier
{
if (_reachabilityRef != NULL)
{
SCNetworkReachabilityUnscheduleFromRunLoop(_reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
}
}
- (void)dealloc
{
[self stopNotifier];
if (_reachabilityRef != NULL)
{
CFRelease(_reachabilityRef);
}
}
#pragma mark - Network Flag Handling
- (qlkNetworkStatus)networkStatusForFlags:(SCNetworkReachabilityFlags)flags
{
if ((flags & kSCNetworkReachabilityFlagsReachable) == 0)
{
// The target host is not reachable.
return qlkNotReachable;
}
qlkNetworkStatus returnValue = qlkNotReachable;
if ((flags & kSCNetworkReachabilityFlagsConnectionRequired) == 0)
{
/*
If the target host is reachable and no connection is required then we'll assume (for now) that you're on Wi-Fi...
*/
returnValue = qlkReachableViaWiFi;
}
if ((((flags & kSCNetworkReachabilityFlagsConnectionOnDemand ) != 0) ||
(flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0))
{
/*
... and the connection is on-demand (or on-traffic) if the calling application is using the CFSocketStream or higher APIs...
*/
if ((flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0)
{
/*
... and no [user] intervention is needed...
*/
returnValue = qlkReachableViaWiFi;
}
}
if ((flags & kSCNetworkReachabilityFlagsIsWWAN) == kSCNetworkReachabilityFlagsIsWWAN)
{
/*
... but WWAN connections are OK if the calling application is using the CFNetwork APIs.
*/
CTTelephonyNetworkInfo * info = [[CTTelephonyNetworkInfo alloc] init];
NSString *currentRadioAccessTechnology = info.currentRadioAccessTechnology;
if (currentRadioAccessTechnology) {
if ([CTRadioAccessTechnologyLTE isEqualToString:currentRadioAccessTechnology]) {
returnValue = kReachableVia4G;
}
else if ([CTRadioAccessTechnologyEdge isEqualToString:currentRadioAccessTechnology] || [currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyGPRS]) {
returnValue = kReachableVia2G;
}
else {
returnValue = kReachableVia3G;
}
return returnValue;
}
if ((flags & kSCNetworkReachabilityFlagsTransientConnection) == kSCNetworkReachabilityFlagsTransientConnection) {
if((flags & kSCNetworkReachabilityFlagsConnectionRequired) == kSCNetworkReachabilityFlagsConnectionRequired) {
returnValue = kReachableVia2G;
return returnValue;
}
returnValue = kReachableVia3G;
return returnValue;
}
returnValue = qlkReachableViaWWAN;
}
return returnValue;
}
- (BOOL)connectionRequired
{
NSAssert(_reachabilityRef != NULL, @"connectionRequired called with NULL reachabilityRef");
SCNetworkReachabilityFlags flags;
if (SCNetworkReachabilityGetFlags(_reachabilityRef, &flags))
{
return (flags & kSCNetworkReachabilityFlagsConnectionRequired);
}
return NO;
}
- (qlkNetworkStatus)currentReachabilityStatus
{
NSAssert(_reachabilityRef != NULL, @"currentNetworkStatus called with NULL SCNetworkReachabilityRef");
qlkNetworkStatus returnValue = qlkNotReachable;
SCNetworkReachabilityFlags flags;
if (SCNetworkReachabilityGetFlags(_reachabilityRef, &flags))
{
returnValue = [self networkStatusForFlags:flags];
}
return returnValue;
}
- (int)getMobileNetworkCode
{
int ret = 0;
CTTelephonyNetworkInfo *info = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [info subscriberCellularProvider];
if (carrier == nil) {
return ret;
}
NSString *code = [carrier mobileNetworkCode];
if (code == nil) {
return ret;
}
/**
00 中国移动
01 中国联通
02 中国移动
03 中国电信
05 中国电信
06 中国联通
07 中国移动
20 中国电信
*/
if ([code isEqualToString:@"00"] || [code isEqualToString:@"02"] || [code isEqualToString:@"07"]) {
ret = 1;
}else if ([code isEqualToString:@"01"] || [code isEqualToString:@"06"]){
ret = 2;
}else {
ret = 3;
}
return ret;
}
@end
//
// NRHomeViewController.h
// NetrainFrame
//
// Created by Gin on 2020/10/13.
//
#import "NRCommonViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface NRHomeViewController : NRCommonViewController
@end
NS_ASSUME_NONNULL_END
//
// NRHomeViewController.m
// NetrainFrame
//
// Created by Gin on 2020/10/13.
//
#import "NRHomeViewController.h"
@interface NRHomeViewController ()
@end
@implementation NRHomeViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="NRHomeViewController">
<connections>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="恭喜你,登录成功了!" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FLD-n7-M0w">
<rect key="frame" x="70" y="432" width="274" height="32.5"/>
<fontDescription key="fontDescription" type="system" pointSize="27"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="FLD-n7-M0w" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="HRd-Sw-w58"/>
<constraint firstItem="FLD-n7-M0w" firstAttribute="centerY" secondItem="i5M-Pr-FkT" secondAttribute="centerY" id="uvJ-Kg-pcA"/>
</constraints>
<point key="canvasLocation" x="218.84057971014494" y="131.91964285714286"/>
</view>
</objects>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
//
// CTMediator+HomeCoordinatorActions.h
// NetrainFrame
//
// Created by Gin on 2020/10/13.
//
#import <CTMediator/CTMediator.h>
NS_ASSUME_NONNULL_BEGIN
@interface CTMediator (HomeCoordinatorActions)
- (UIViewController *)CTMediator_viewControllerForHomeCoordinator;
@end
NS_ASSUME_NONNULL_END
//
// CTMediator+HomeCoordinatorActions.m
// NetrainFrame
//
// Created by Gin on 2020/10/13.
//
#import "CTMediator+HomeCoordinatorActions.h"
NSString * const kCTMediatorTargetHomeCoordinator = @"HomeCoordinator";
NSString * const kCTMediatorActionHomeCoordinatorRootController = @"HomeCoordinatorRootController";
@implementation CTMediator (HomeCoordinatorActions)
- (UIViewController *)CTMediator_viewControllerForHomeCoordinator{
UIViewController *viewController = [self performTarget:kCTMediatorTargetHomeCoordinator
action:kCTMediatorActionHomeCoordinatorRootController
params:nil
shouldCacheTarget:NO
];
if (viewController) {
// view controller 交付出去之后,可以由外界选择是push还是present
return viewController;
} else {
// 这里处理异常场景,具体如何处理取决于产品
return [[UINavigationController alloc] init];
}
}
@end
//
// Target_HomeCoordinator.h
// NetrainFrame
//
// Created by Gin on 2020/10/13.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface Target_HomeCoordinator : NSObject
- (UIViewController *)Action_HomeCoordinatorRootController:(NSDictionary *)params;
@end
NS_ASSUME_NONNULL_END
//
// Target_HomeCoordinator.m
// NetrainFrame
//
// Created by Gin on 2020/10/13.
//
#import "Target_HomeCoordinator.h"
#import "NRHomeViewController.h"
#import "NRCommonNavigationViewController.h"
@implementation Target_HomeCoordinator
- (UIViewController *)Action_HomeCoordinatorRootController:(NSDictionary *)params{
NRHomeViewController *vc = [[NRHomeViewController alloc] init];
NRCommonNavigationViewController *navigationController = [[NRCommonNavigationViewController alloc] initWithRootViewController:vc];
return navigationController;
}
@end
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<scenes> <scenes>
...@@ -117,14 +116,14 @@ ...@@ -117,14 +116,14 @@
</userDefinedRuntimeAttribute> </userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
</textField> </textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0dh-8W-io8"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0dh-8W-io8" customClass="NRCountDownButton">
<rect key="frame" x="248" y="7.5" width="90" height="32"/> <rect key="frame" x="248" y="7.5" width="90" height="32"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="90" id="6jj-Au-gza"/> <constraint firstAttribute="width" constant="90" id="6jj-Au-gza"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<state key="normal" title="获取验证码"> <state key="normal" title="获取验证码">
<color key="titleColor" red="0.44705882349999998" green="0.44705882349999998" blue="0.44705882349999998" alpha="1" colorSpace="calibratedRGB"/> <color key="titleColor" red="0.26666666666666666" green="0.26666666666666666" blue="0.26666666666666666" alpha="0.84705882352941175" colorSpace="custom" customColorSpace="sRGB"/>
</state> </state>
<connections> <connections>
<action selector="getVerification:" destination="lEQ-vc-MoR" eventType="touchUpInside" id="Vxt-4J-ryq"/> <action selector="getVerification:" destination="lEQ-vc-MoR" eventType="touchUpInside" id="Vxt-4J-ryq"/>
...@@ -309,12 +308,346 @@ ...@@ -309,12 +308,346 @@
<viewControllerLayoutGuide type="top" id="5dx-nC-obY"/> <viewControllerLayoutGuide type="top" id="5dx-nC-obY"/>
<viewControllerLayoutGuide type="bottom" id="8YR-t7-0xR"/> <viewControllerLayoutGuide type="bottom" id="8YR-t7-0xR"/>
</layoutGuides> </layoutGuides>
<view key="view" contentMode="scaleToFill" id="zaq-4J-1KU"> <view key="view" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="gET-G4-phc">
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/> <rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lPh-dV-0j3" userLabel="scroll content view">
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zEA-3t-Mru" userLabel="account view">
<rect key="frame" x="20" y="20" width="379" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XTf-k0-PJA">
<rect key="frame" x="10" y="35" width="316" height="15"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="iYU-5l-QYM"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="10"/>
<color key="textColor" red="0.8862745098" green="0.13725490200000001" blue="0.1019607843" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入姓名" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="56g-th-3Yr" customClass="QMUITextField">
<rect key="frame" x="0.0" y="5" width="334" height="40"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" red="0.094117647060000004" green="0.18823529410000001" blue="0.16078431369999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<textInputTraits key="textInputTraits" returnKeyType="next"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="maximumTextLength">
<integer key="value" value="20"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ilV-G5-zLL" userLabel="line view">
<rect key="frame" x="0.0" y="50" width="379" height="1"/>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="QBU-TP-N6r"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="ilV-G5-zLL" firstAttribute="top" secondItem="XTf-k0-PJA" secondAttribute="bottom" id="4Fa-hF-2Tq"/>
<constraint firstItem="ilV-G5-zLL" firstAttribute="leading" secondItem="56g-th-3Yr" secondAttribute="leading" id="5Hy-Gb-cnn"/>
<constraint firstAttribute="height" constant="50" id="FlC-Xg-vWw"/>
<constraint firstAttribute="trailing" secondItem="XTf-k0-PJA" secondAttribute="trailing" constant="53" id="Ha8-8i-6iH"/>
<constraint firstAttribute="trailing" secondItem="ilV-G5-zLL" secondAttribute="trailing" id="L5c-sM-cUh"/>
<constraint firstItem="ilV-G5-zLL" firstAttribute="top" secondItem="zEA-3t-Mru" secondAttribute="top" constant="50" id="Swl-yF-obD"/>
<constraint firstItem="ilV-G5-zLL" firstAttribute="top" secondItem="56g-th-3Yr" secondAttribute="bottom" constant="5" id="ZgM-Ea-PB1"/>
<constraint firstAttribute="bottom" secondItem="ilV-G5-zLL" secondAttribute="bottom" constant="-1" id="azM-zw-DOK"/>
<constraint firstItem="56g-th-3Yr" firstAttribute="centerY" secondItem="zEA-3t-Mru" secondAttribute="centerY" id="fYz-Q3-VZk"/>
<constraint firstItem="56g-th-3Yr" firstAttribute="trailing" secondItem="XTf-k0-PJA" secondAttribute="trailing" constant="8" id="kI5-17-dp4"/>
<constraint firstItem="XTf-k0-PJA" firstAttribute="leading" secondItem="zEA-3t-Mru" secondAttribute="leading" constant="10" id="r8L-1Q-fW9"/>
<constraint firstItem="ilV-G5-zLL" firstAttribute="leading" secondItem="XTf-k0-PJA" secondAttribute="leading" constant="-10" id="yxQ-fk-Jce"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qwt-3r-OgF" userLabel="account view">
<rect key="frame" x="20" y="91" width="378" height="50"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入您的手机号" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="9z2-jL-N2p" customClass="QMUITextField">
<rect key="frame" x="0.0" y="5" width="230" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" red="0.094117647060000004" green="0.18823529410000001" blue="0.16078431369999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad" returnKeyType="next"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="maximumTextLength">
<integer key="value" value="11"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UgQ-Ho-J6y" userLabel="line view">
<rect key="frame" x="0.0" y="49.5" width="378" height="1"/>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="gWb-0r-L9r"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FkA-MC-0Db" customClass="NRCountDownButton">
<rect key="frame" x="296" y="14" width="82" height="22"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="lcs-y0-tvJ"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<state key="normal" title="获取验证码">
<color key="titleColor" red="0.2666666667" green="0.2666666667" blue="0.2666666667" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="getVerficationAction:" destination="h8n-sm-Z0M" eventType="touchUpInside" id="Jy1-89-obo"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="UgQ-Ho-J6y" firstAttribute="leading" secondItem="qwt-3r-OgF" secondAttribute="leading" id="17Q-9s-wIX"/>
<constraint firstAttribute="bottom" secondItem="UgQ-Ho-J6y" secondAttribute="bottom" constant="-0.5" id="EvO-6G-fXX"/>
<constraint firstItem="FkA-MC-0Db" firstAttribute="centerY" secondItem="qwt-3r-OgF" secondAttribute="centerY" id="Ucp-su-gDA"/>
<constraint firstAttribute="trailing" secondItem="FkA-MC-0Db" secondAttribute="trailing" id="dte-Oz-N7R"/>
<constraint firstAttribute="height" constant="50" id="kBo-iG-rgj"/>
<constraint firstAttribute="trailing" secondItem="UgQ-Ho-J6y" secondAttribute="trailing" id="vNv-FG-wUJ"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fla-AM-Yg8" userLabel="name view">
<rect key="frame" x="20" y="157" width="379" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1hV-QH-UgY">
<rect key="frame" x="0.0" y="33" width="399" height="15"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="WuE-er-0WI"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="10"/>
<color key="textColor" red="0.8862745098" green="0.13725490200000001" blue="0.1019607843" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="输入验证码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="a8W-8x-dgb" customClass="QMUITextField">
<rect key="frame" x="0.0" y="5" width="334" height="40"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="ZnB-x0-Ih3"/>
<constraint firstAttribute="width" constant="334" id="ecd-WV-EJx"/>
</constraints>
<color key="textColor" red="0.094117647060000004" green="0.18823529410000001" blue="0.16078431369999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad" returnKeyType="next"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="maximumTextLength">
<integer key="value" value="4"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fug-dS-M3U" userLabel="line view">
<rect key="frame" x="0.0" y="50" width="379" height="1"/>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="7Gf-T5-KsK"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="fug-dS-M3U" firstAttribute="leading" secondItem="fla-AM-Yg8" secondAttribute="leading" id="5Fn-gN-9lk"/>
<constraint firstItem="a8W-8x-dgb" firstAttribute="top" secondItem="fla-AM-Yg8" secondAttribute="top" constant="5" id="SAI-Cq-CuN"/>
<constraint firstItem="1hV-QH-UgY" firstAttribute="top" secondItem="fla-AM-Yg8" secondAttribute="top" constant="33" id="WYe-De-KSk"/>
<constraint firstAttribute="trailing" secondItem="1hV-QH-UgY" secondAttribute="trailing" constant="-20" id="Ydg-1v-zA6"/>
<constraint firstItem="a8W-8x-dgb" firstAttribute="leading" secondItem="fla-AM-Yg8" secondAttribute="leading" id="aQw-KN-VGH"/>
<constraint firstAttribute="trailing" secondItem="fug-dS-M3U" secondAttribute="trailing" id="adp-l2-6mn"/>
<constraint firstItem="1hV-QH-UgY" firstAttribute="leading" secondItem="fla-AM-Yg8" secondAttribute="leading" id="mxt-VQ-c7f"/>
<constraint firstAttribute="height" constant="50" id="opG-iY-gZf"/>
<constraint firstAttribute="bottom" secondItem="fug-dS-M3U" secondAttribute="bottom" constant="-1" id="pZO-MN-7En"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rTx-6Q-JHQ" userLabel="password view">
<rect key="frame" x="20" y="226" width="379" height="50"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入9-16位密码" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="EiM-HY-I6f" customClass="QMUITextField">
<rect key="frame" x="0.0" y="16" width="284" height="21"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" red="0.094117647060000004" green="0.18823529410000001" blue="0.16078431369999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation" returnKeyType="done" secureTextEntry="YES"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="maximumTextLength">
<integer key="value" value="16"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2gx-cy-DV8" userLabel="line view">
<rect key="frame" x="0.0" y="50" width="379" height="1"/>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="vCi-Ts-dek"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZSV-hl-WiM" userLabel="eyes">
<rect key="frame" x="338" y="21" width="20" height="14"/>
<constraints>
<constraint firstAttribute="height" constant="14" id="0Vx-Le-c9V"/>
<constraint firstAttribute="width" constant="20" id="iCH-PS-rE8"/>
</constraints>
<state key="normal" image="login_eyes_close"/>
<state key="selected" image="login_eyes_open"/>
<connections>
<action selector="isShowAction:" destination="h8n-sm-Z0M" eventType="touchUpInside" id="hah-R6-NG7"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="ZSV-hl-WiM" firstAttribute="top" secondItem="rTx-6Q-JHQ" secondAttribute="top" constant="21" id="3AQ-OR-LAT"/>
<constraint firstItem="EiM-HY-I6f" firstAttribute="leading" secondItem="rTx-6Q-JHQ" secondAttribute="leading" id="AUj-Dg-dZ5"/>
<constraint firstItem="2gx-cy-DV8" firstAttribute="top" secondItem="EiM-HY-I6f" secondAttribute="bottom" constant="13" id="Jw6-Go-lG9"/>
<constraint firstAttribute="trailing" secondItem="EiM-HY-I6f" secondAttribute="trailing" constant="95" id="LBW-np-yIs"/>
<constraint firstItem="2gx-cy-DV8" firstAttribute="leading" secondItem="EiM-HY-I6f" secondAttribute="leading" id="bQ0-Te-1Vs"/>
<constraint firstAttribute="trailing" secondItem="2gx-cy-DV8" secondAttribute="trailing" id="ezy-PY-BRk"/>
<constraint firstAttribute="trailing" secondItem="ZSV-hl-WiM" secondAttribute="trailing" constant="21" id="fYu-jB-vTi"/>
<constraint firstItem="2gx-cy-DV8" firstAttribute="top" secondItem="rTx-6Q-JHQ" secondAttribute="top" constant="50" id="h8p-45-KAI"/>
<constraint firstAttribute="bottom" secondItem="2gx-cy-DV8" secondAttribute="bottom" constant="-1" id="rs7-Dg-olX"/>
<constraint firstItem="EiM-HY-I6f" firstAttribute="top" secondItem="rTx-6Q-JHQ" secondAttribute="top" constant="16" id="vAm-9b-2sk"/>
<constraint firstItem="2gx-cy-DV8" firstAttribute="top" secondItem="EiM-HY-I6f" secondAttribute="bottom" constant="13" id="xeV-ZV-WTk"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="密码由9-16位大小写字母、数字加特殊符号组成" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VNZ-ko-i3V">
<rect key="frame" x="20" y="278" width="344" height="36"/>
<constraints>
<constraint firstAttribute="height" constant="36" id="Tpj-zs-LbF"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.0" green="0.60392156860000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UB0-dD-lRj" userLabel="confirm view">
<rect key="frame" x="15" y="324" width="354" height="23"/>
<subviews>
<button opaque="NO" tag="2" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mEm-UZ-dyC">
<rect key="frame" x="0.0" y="0.0" width="23" height="23"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" image="register_protocol_normal">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="selected" image="register_protocol_selected"/>
<connections>
<action selector="isAgreeUserProtocol:" destination="h8n-sm-Z0M" eventType="touchUpInside" id="lTm-F6-RRh"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="同意" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vKy-V0-zOi">
<rect key="frame" x="31" y="0.0" width="31" height="23"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.42745098040000001" green="0.42745098040000001" blue="0.42745098040000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" tag="1" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="P9K-v1-UGT">
<rect key="frame" x="50" y="0.0" width="164" height="23"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" title="《医生端用户注册协议》">
<color key="titleColor" red="0.42745098040000001" green="0.42745098040000001" blue="0.42745098040000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="userProtocolBtnAction:" destination="h8n-sm-Z0M" eventType="touchUpInside" id="PnS-AJ-zmT"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="B4e-u0-7qI">
<rect key="frame" x="215" y="0.0" width="90" height="23"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" title="《隐私政策》">
<color key="titleColor" red="0.42745098040000001" green="0.42745098040000001" blue="0.42745098040000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="privacyPolicyBtnAction:" destination="h8n-sm-Z0M" eventType="touchUpInside" id="675-zL-LAX"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="23" id="reg-Ii-yL9"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cS1-B0-cML">
<rect key="frame" x="25" y="398" width="364" height="61"/>
<constraints>
<constraint firstAttribute="height" constant="61" id="haA-eF-0p5"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<inset key="titleEdgeInsets" minX="0.0" minY="0.0" maxX="0.0" maxY="8"/>
<state key="normal" title="注册" backgroundImage="common_button_bgView_available">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="titleShadowColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="disabled" backgroundImage="common_button_bgView_notavailable">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="registerAction:" destination="h8n-sm-Z0M" eventType="touchUpInside" id="cVd-9r-llB"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="UB0-dD-lRj" firstAttribute="leading" secondItem="lPh-dV-0j3" secondAttribute="leading" constant="15" id="38M-ar-piG"/>
<constraint firstAttribute="trailing" secondItem="cS1-B0-cML" secondAttribute="trailing" constant="25" id="3OF-e0-pzw"/>
<constraint firstItem="VNZ-ko-i3V" firstAttribute="top" secondItem="rTx-6Q-JHQ" secondAttribute="bottom" constant="2" id="5Fq-Ch-4Gh"/>
<constraint firstItem="VNZ-ko-i3V" firstAttribute="centerX" secondItem="UB0-dD-lRj" secondAttribute="centerX" id="96j-lL-zvi"/>
<constraint firstItem="cS1-B0-cML" firstAttribute="top" secondItem="UB0-dD-lRj" secondAttribute="bottom" constant="51" id="CwS-cp-ROl"/>
<constraint firstItem="fla-AM-Yg8" firstAttribute="trailing" secondItem="rTx-6Q-JHQ" secondAttribute="trailing" id="FFP-JW-Nkl"/>
<constraint firstItem="cS1-B0-cML" firstAttribute="leading" secondItem="lPh-dV-0j3" secondAttribute="leading" constant="25" id="GbE-CC-8e1"/>
<constraint firstAttribute="trailing" secondItem="zEA-3t-Mru" secondAttribute="trailing" constant="15" id="H8p-JL-o0U"/>
<constraint firstItem="zEA-3t-Mru" firstAttribute="leading" secondItem="lPh-dV-0j3" secondAttribute="leading" constant="20" id="I48-F1-Umd"/>
<constraint firstItem="rTx-6Q-JHQ" firstAttribute="top" secondItem="fla-AM-Yg8" secondAttribute="bottom" constant="19" id="JdJ-ff-Suz"/>
<constraint firstItem="qwt-3r-OgF" firstAttribute="leading" secondItem="lPh-dV-0j3" secondAttribute="leading" constant="20" id="MbW-BB-2sR"/>
<constraint firstAttribute="trailing" secondItem="fla-AM-Yg8" secondAttribute="trailing" constant="15" id="NiL-An-Lcm"/>
<constraint firstItem="zEA-3t-Mru" firstAttribute="top" secondItem="lPh-dV-0j3" secondAttribute="top" constant="20" id="X6U-w6-2rz"/>
<constraint firstItem="VNZ-ko-i3V" firstAttribute="leading" secondItem="lPh-dV-0j3" secondAttribute="leading" constant="20" id="fw9-WX-FHQ"/>
<constraint firstItem="fla-AM-Yg8" firstAttribute="leading" secondItem="rTx-6Q-JHQ" secondAttribute="leading" id="jzH-QJ-npW"/>
<constraint firstAttribute="trailing" secondItem="UB0-dD-lRj" secondAttribute="trailing" constant="45" id="m6m-mu-KBh"/>
<constraint firstItem="qwt-3r-OgF" firstAttribute="top" secondItem="zEA-3t-Mru" secondAttribute="bottom" constant="21" id="o4f-Sb-f9L"/>
<constraint firstItem="UB0-dD-lRj" firstAttribute="top" secondItem="rTx-6Q-JHQ" secondAttribute="bottom" constant="48" id="qHp-Id-RPx"/>
<constraint firstAttribute="trailing" secondItem="qwt-3r-OgF" secondAttribute="trailing" constant="16" id="rAC-Hr-4lo"/>
<constraint firstItem="fla-AM-Yg8" firstAttribute="leading" secondItem="lPh-dV-0j3" secondAttribute="leading" constant="20" id="w9F-iL-wVQ"/>
<constraint firstItem="fla-AM-Yg8" firstAttribute="top" secondItem="qwt-3r-OgF" secondAttribute="bottom" constant="16" id="xPo-LT-AlW"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="lPh-dV-0j3" firstAttribute="top" secondItem="5dx-nC-obY" secondAttribute="bottom" id="Yam-9B-vlZ"/>
<constraint firstAttribute="bottom" secondItem="lPh-dV-0j3" secondAttribute="bottom" id="gUg-tB-xE4"/>
<constraint firstItem="lPh-dV-0j3" firstAttribute="leading" secondItem="gET-G4-phc" secondAttribute="leading" id="sBs-jE-Mxd"/>
<constraint firstAttribute="trailing" secondItem="lPh-dV-0j3" secondAttribute="trailing" id="xmt-z2-4Ua"/>
</constraints>
</view> </view>
<navigationItem key="navigationItem" id="dbh-Jw-NKP"/> <navigationItem key="navigationItem" id="dbh-Jw-NKP"/>
<connections>
<outlet property="accountView" destination="zEA-3t-Mru" id="r97-Iq-f7i"/>
<outlet property="backView" destination="lPh-dV-0j3" id="l9J-dc-Qkx"/>
<outlet property="checkCodeTF" destination="a8W-8x-dgb" id="GsU-hz-d6j"/>
<outlet property="confirmButton" destination="mEm-UZ-dyC" id="tju-yn-saa"/>
<outlet property="line1" destination="ilV-G5-zLL" id="VlG-3S-bfR"/>
<outlet property="line2" destination="UgQ-Ho-J6y" id="J23-hO-nWK"/>
<outlet property="line3" destination="fug-dS-M3U" id="54U-Hc-BlC"/>
<outlet property="line4" destination="2gx-cy-DV8" id="4MZ-Su-shg"/>
<outlet property="nameTextField" destination="56g-th-3Yr" id="98Z-Rl-nZZ"/>
<outlet property="nameValidLabel" destination="XTf-k0-PJA" id="nL0-kX-rbb"/>
<outlet property="nameView" destination="fla-AM-Yg8" id="ZAJ-cw-LmO"/>
<outlet property="passwordTextField" destination="EiM-HY-I6f" id="J9g-6J-5q2"/>
<outlet property="passwordValidLabel" destination="VNZ-ko-i3V" id="F1D-mV-9ab"/>
<outlet property="passwordView" destination="rTx-6Q-JHQ" id="XTj-G8-x8f"/>
<outlet property="phoneTextField" destination="9z2-jL-N2p" id="YOD-Vi-Aug"/>
<outlet property="phoneView" destination="qwt-3r-OgF" id="yqT-Cl-qMy"/>
<outlet property="privacyPolicyBtn" destination="B4e-u0-7qI" id="fPu-KP-10i"/>
<outlet property="protocolBtn" destination="P9K-v1-UGT" id="DNn-SP-wdh"/>
<outlet property="registerButton" destination="cS1-B0-cML" id="U3I-lW-ybI"/>
<outlet property="verificationBtn" destination="FkA-MC-0Db" id="esL-Le-15S"/>
</connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="G5m-J7-4Gf" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="G5m-J7-4Gf" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects> </objects>
...@@ -328,8 +661,7 @@ ...@@ -328,8 +661,7 @@
<image name="login_bottomarc" width="26" height="7"/> <image name="login_bottomarc" width="26" height="7"/>
<image name="login_eyes_close" width="17" height="10"/> <image name="login_eyes_close" width="17" height="10"/>
<image name="login_eyes_open" width="17" height="10"/> <image name="login_eyes_open" width="17" height="10"/>
<systemColor name="systemBackgroundColor"> <image name="register_protocol_normal" width="18" height="18"/>
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <image name="register_protocol_selected" width="18" height="18"/>
</systemColor>
</resources> </resources>
</document> </document>
...@@ -6,12 +6,18 @@ ...@@ -6,12 +6,18 @@
// //
#import "NRCommonViewController.h" #import "NRCommonViewController.h"
@class MainCoordinator;
@protocol NRLoginViewControllerDelegate <NSObject>
- (void)loginSuccessAction;
@end
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface NRLoginViewController : NRCommonViewController @interface NRLoginViewController : NRCommonViewController
@property(weak, nonatomic) MainCoordinator *coordinator; @property(nonatomic, weak) id<NRLoginViewControllerDelegate> controllerDelegate;
@end @end
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#import "NRLoginViewController.h" #import "NRLoginViewController.h"
#import "NRLoginLogic.h" #import "NRLoginLogic.h"
#import "NRCountDownButton.h"
typedef NS_ENUM(NSUInteger, UserSelectLoginMode) { typedef NS_ENUM(NSUInteger, UserSelectLoginMode) {
passswdLogin = 10, //密码登录 passswdLogin = 10, //密码登录
...@@ -19,15 +20,12 @@ typedef NS_ENUM(NSUInteger, UserSelectLoginMode) { ...@@ -19,15 +20,12 @@ typedef NS_ENUM(NSUInteger, UserSelectLoginMode) {
@property (weak, nonatomic) IBOutlet QMUITextField *passwdField; @property (weak, nonatomic) IBOutlet QMUITextField *passwdField;
@property (weak, nonatomic) IBOutlet UIButton *showPwdBtn; @property (weak, nonatomic) IBOutlet UIButton *showPwdBtn;
@property (weak, nonatomic) IBOutlet UIButton *loginButton; @property (weak, nonatomic) IBOutlet UIButton *loginButton;
@property (weak, nonatomic) IBOutlet UIButton *verificationBtn; @property (weak, nonatomic) IBOutlet NRCountDownButton *verificationBtn;
@property (weak, nonatomic) IBOutlet UIImageView *verificationBtnBottomArc; @property (weak, nonatomic) IBOutlet UIImageView *verificationBtnBottomArc;
@property (weak, nonatomic) IBOutlet UIButton *passwdLogBtn; @property (weak, nonatomic) IBOutlet UIButton *passwdLogBtn;
@property (weak, nonatomic) IBOutlet UIImageView *passwdBtnBottomArc; @property (weak, nonatomic) IBOutlet UIImageView *passwdBtnBottomArc;
@property (weak, nonatomic) IBOutlet UIButton *verificationLogBtn; @property (weak, nonatomic) IBOutlet UIButton *verificationLogBtn;
@property (assign, nonatomic) UserSelectLoginMode loginMode; @property (assign, nonatomic) UserSelectLoginMode loginMode;
@property (strong,nonatomic) NSDate *resignBackgroundDate;
@property (assign,nonatomic) int timeout;
@property (strong,nonatomic) NSTimer* countDownTimer;
@property (weak, nonatomic) IBOutlet UIView *forgetAndRegisterView; @property (weak, nonatomic) IBOutlet UIView *forgetAndRegisterView;
@property (weak, nonatomic) IBOutlet UIView *accountView; @property (weak, nonatomic) IBOutlet UIView *accountView;
@property (weak, nonatomic) IBOutlet UIButton *registerButton; @property (weak, nonatomic) IBOutlet UIButton *registerButton;
...@@ -40,11 +38,6 @@ typedef NS_ENUM(NSUInteger, UserSelectLoginMode) { ...@@ -40,11 +38,6 @@ typedef NS_ENUM(NSUInteger, UserSelectLoginMode) {
@end @end
#define kAccountMaxLength 11 //手机号长度限制
#define kPassswordMaxLength 16 //登录密码长度最大限制
#define kPassswordMinLength 9 //登录密码长度最小限制
#define kVerifyCodeMaxLength 4 //验证码长度限制
@implementation NRLoginViewController @implementation NRLoginViewController
-(BOOL)preferredNavigationBarHidden{ -(BOOL)preferredNavigationBarHidden{
...@@ -71,7 +64,6 @@ typedef NS_ENUM(NSUInteger, UserSelectLoginMode) { ...@@ -71,7 +64,6 @@ typedef NS_ENUM(NSUInteger, UserSelectLoginMode) {
[self.forgetAndRegisterDividingLine setBackgroundColor:UIColorThemeBorderColor]; [self.forgetAndRegisterDividingLine setBackgroundColor:UIColorThemeBorderColor];
[self.passwdLogBtn setTitleColor:UIColorThemeColor forState:UIControlStateSelected]; [self.passwdLogBtn setTitleColor:UIColorThemeColor forState:UIControlStateSelected];
[self.verificationLogBtn setTitleColor:UIColorThemeColor forState:UIControlStateSelected]; [self.verificationLogBtn setTitleColor:UIColorThemeColor forState:UIControlStateSelected];
[self.verificationBtn setTitleColor:UIColorThemeButtonBlackColor forState:UIControlStateNormal];
} }
-(void)configSubviews{ -(void)configSubviews{
...@@ -121,10 +113,22 @@ typedef NS_ENUM(NSUInteger, UserSelectLoginMode) { ...@@ -121,10 +113,22 @@ typedef NS_ENUM(NSUInteger, UserSelectLoginMode) {
} }
#pragma mark -- NRLoginLogicDelegate #pragma mark -- NRLoginLogicDelegate
-(void)sendMessageCompleted:(BaseHttpModel *)httpModel{
[QMUITips hideAllTips];
if(httpModel.isSucc){
[QMUITips showSucceed:httpModel.errorMsg];
[self.verificationBtn startTimer];
}else{
[QMUITips showError:httpModel.errorMsg];
}
}
-(void)requestDataCompleted:(BaseHttpModel *)httpModel{ -(void)requestDataCompleted:(BaseHttpModel *)httpModel{
[QMUITips hideAllTips]; [QMUITips hideAllTips];
if(httpModel.isSucc){ if(httpModel.isSucc){
[QMUITips showSucceed:httpModel.errorMsg]; [QMUITips showSucceed:httpModel.errorMsg];
if(self.controllerDelegate && [self.controllerDelegate respondsToSelector:@selector(loginSuccessAction)]){
[self.controllerDelegate loginSuccessAction];
}
}else{ }else{
[QMUITips showError:httpModel.errorMsg]; [QMUITips showError:httpModel.errorMsg];
} }
...@@ -218,7 +222,7 @@ typedef NS_ENUM(NSUInteger, UserSelectLoginMode) { ...@@ -218,7 +222,7 @@ typedef NS_ENUM(NSUInteger, UserSelectLoginMode) {
} }
} }
} }
#pragma mark -- setter/getter
-(NRLoginLogic *)loginLogic{ -(NRLoginLogic *)loginLogic{
if(!_loginLogic){ if(!_loginLogic){
_loginLogic = [[NRLoginLogic alloc] init]; _loginLogic = [[NRLoginLogic alloc] init];
......
...@@ -7,10 +7,20 @@ ...@@ -7,10 +7,20 @@
#import "NRCommonViewController.h" #import "NRCommonViewController.h"
@protocol NRRegisterViewControllerDelegate <NSObject>
///用户协议
- (void)toUserProtocolAction;
///隐私政策
- (void)toPrivacyPolicyAction;
@end
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface NRRegisterViewController : NRCommonViewController @interface NRRegisterViewController : NRCommonViewController
@property(nonatomic, weak) id<NRRegisterViewControllerDelegate> controllerDelegate;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -6,8 +6,36 @@ ...@@ -6,8 +6,36 @@
// //
#import "NRRegisterViewController.h" #import "NRRegisterViewController.h"
#import "NRRegisterLogic.h"
#import "NRCountDownButton.h"
@interface NRRegisterViewController () @interface NRRegisterViewController ()<QMUITextFieldDelegate>
@property (weak, nonatomic) IBOutlet UIView *backView;
@property (weak, nonatomic) IBOutlet QMUITextField *nameTextField;//姓名输入框
@property (weak, nonatomic) IBOutlet QMUITextField *phoneTextField;//显示电话号码输入框
@property (weak, nonatomic) IBOutlet QMUITextField *passwordTextField;//密码输入框
@property (weak, nonatomic) IBOutlet UIButton *registerButton;//注册按钮
@property (weak, nonatomic) IBOutlet UIButton *confirmButton;//是否同意注册协议按钮
@property (strong, nonatomic) IBOutlet UILabel *nameValidLabel;//姓名文本框
@property (strong, nonatomic) IBOutlet UILabel *passwordValidLabel;//密码文本框
@property (weak, nonatomic) IBOutlet UIButton *protocolBtn;
@property (weak, nonatomic) IBOutlet UIButton *privacyPolicyBtn;//隐私政策按钮
@property (weak, nonatomic) IBOutlet QMUITextField *checkCodeTF;///验证码输入框
@property (weak, nonatomic) IBOutlet NRCountDownButton *verificationBtn;
@property (assign,nonatomic) int timeout;
@property (strong,nonatomic) NSTimer* countDownTimer;
@property (weak, nonatomic) IBOutlet UIView *passwordView;
@property (weak, nonatomic) IBOutlet UIView *nameView;
@property (weak, nonatomic) IBOutlet UIView *accountView;
@property (weak, nonatomic) IBOutlet UIView *phoneView;
@property (weak, nonatomic) IBOutlet UIView *line1;
@property (weak, nonatomic) IBOutlet UIView *line2;
@property (weak, nonatomic) IBOutlet UIView *line3;
@property (weak, nonatomic) IBOutlet UIView *line4;
///Logic
@property(strong, nonatomic) NRRegisterLogic *registerLogic;
@end @end
...@@ -17,13 +45,148 @@ ...@@ -17,13 +45,148 @@
return NO; return NO;
} }
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
[self.verificationBtn removeTimer];
}
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
[self configSubviews];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
} }
-(void)dealloc{ - (void)initSubviews{
NSLog(@"register delloc"); [super initSubviews];
self.passwordValidLabel.textColor = UIColorThemeColor;
if (@available(iOS 11.0, *)) {
self.passwordTextField.textContentType = UITextContentTypeName;
}
}
-(void)configSubviews{
self.nameTextField.delegate = self;
self.phoneTextField.delegate = self;
self.checkCodeTF.delegate = self;
self.passwordTextField.delegate = self;
[self.nameTextField addTarget:self action:@selector(textFieldDidChange)
forControlEvents:UIControlEventEditingChanged];
[self.phoneTextField addTarget:self action:@selector(textFieldDidChange)
forControlEvents:UIControlEventEditingChanged];
[self.checkCodeTF addTarget:self action:@selector(textFieldDidChange)
forControlEvents:UIControlEventEditingChanged];
[self.passwordTextField addTarget:self action:@selector(textFieldDidChange)
forControlEvents:UIControlEventEditingChanged];
}
#pragma mark -- QMUITextFieldDelegate
-(void)textFieldDidBeginEditing:(UITextField *)textField{
if(textField == self.nameTextField){
self.line1.backgroundColor = UIColorThemeBorderColor;
}else if(textField == self.phoneTextField){
self.line2.backgroundColor = UIColorThemeBorderColor;
}else if(textField == self.checkCodeTF){
self.line3.backgroundColor = UIColorThemeBorderColor;
}else {
self.line4.backgroundColor=UIColorThemeBorderColor;
}
}
- (void)textFieldDidChange{
[self checkRegisterStatus];
}
-(void)textFieldDidEndEditing:(UITextField *)textField{
if(textField == self.nameTextField){
self.line1.backgroundColor = UIColorThemeLineColor;
}else if(textField == self.phoneTextField){
self.line2.backgroundColor = UIColorThemeLineColor;
}else if(textField == self.checkCodeTF){
self.line3.backgroundColor = UIColorThemeLineColor;
}else{
self.line4.backgroundColor=UIColorThemeLineColor;
}
}
#pragma mark -- IBAaction
- (IBAction)privacyPolicyBtnAction:(id)sender {//隐私政策];
if(self.controllerDelegate && [self.controllerDelegate respondsToSelector:@selector(toPrivacyPolicyAction)]){
[self.controllerDelegate toPrivacyPolicyAction];
}
}
- (IBAction)isAgreeUserProtocol:(id)sender{
UIButton *btn = (UIButton *)sender;
btn.selected = !btn.selected;
[self checkRegisterStatus];
}
- (IBAction)userProtocolBtnAction:(id)sender {//用户协议
if(self.controllerDelegate && [self.controllerDelegate respondsToSelector:@selector(toUserProtocolAction)]){
[self.controllerDelegate toUserProtocolAction];
}
}
- (IBAction)registerAction:(id)sender {//注册
if (![self.nameTextField.text isMatchName]) {
self.nameValidLabel.text = @"名字不能包含表情、特殊字符等";
return;
}
if (!self.confirmButton.isSelected) {
[QMUITips showError:@"同意互联网医院注册协议才可以注册"];
return;
}
NSMutableDictionary *params = [NSMutableDictionary dictionary];
params[@"name"] = self.nameTextField.text;
params[@"phoneNum"] = self.phoneTextField.text;
params[@"inviterCode"] = self.checkCodeTF.text;
params[@"password"] = self.passwordTextField.text;
params[@"purepassword"] = self.passwordTextField.text;
params[@"regSource"] = @"0";
[self.registerLogic registerRequestStepWithParams:params.copy];
}
- (IBAction)getVerficationAction:(id)sender {
[self.verificationBtn startTimer];
// [self.registerLogic getVerifyCodeWithPhoneNumber:self.phoneTextField.text];
}
- (IBAction)isShowAction:(id)sender {
UIButton *btn = (UIButton *)sender;
btn.selected = !btn.selected;
self.passwordTextField.secureTextEntry = btn.selected ? NO : YES;
}
#pragma mark -- private method
//按钮状态随文本变化而变化
- (void)checkRegisterStatus{
if(self.nameTextField.text.isNotBlank && self.checkCodeTF.text.length == kVerifyCodeMaxLength && self.passwordTextField.text.length >= kPassswordMinLength && self.passwordTextField.text.length <= kPassswordMaxLength && self.phoneTextField.text.length == kAccountMaxLength && self.confirmButton.isSelected) {
self.registerButton.enabled = YES;
}
else{
if(self.registerButton.isEnabled){
self.registerButton.enabled = NO;
}
}
if(self.phoneTextField.text.length == kAccountMaxLength) {
self.verificationBtn.enabled = YES;
}else{
if(self.verificationBtn.isEnabled){
self.verificationBtn.enabled = NO;
}
}
}
#pragma mark -- setter/getter
-(NRRegisterLogic *)registerLogic{
if(!_registerLogic){
_registerLogic = [[NRRegisterLogic alloc] init];
// _registerLogic.logicDelegate = self;
}
return _registerLogic;
} }
/* /*
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface CTMediator (MainCoordinatorActions) @interface CTMediator (LoginCoordinatorActions)
- (UIViewController *)CTMediator_viewControllerForLoginCoordinator; - (UIViewController *)CTMediator_viewControllerForLoginCoordinator;
@end @end
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
// Created by Gin on 2020/9/23. // Created by Gin on 2020/9/23.
// //
#import "CTMediator+MainCoordinatorActions.h" #import "CTMediator+LoginCoordinatorActions.h"
NSString * const kCTMediatorTargetLoginCoordinator = @"LoginCoordinator"; NSString * const kCTMediatorTargetLoginCoordinator = @"LoginCoordinator";
NSString * const kCTMediatorActionLoginCoordinatorRootController = @"LoginCoordinatorRootController"; NSString * const kCTMediatorActionLoginCoordinatorRootController = @"LoginCoordinatorRootController";
@implementation CTMediator (MainCoordinatorActions) @implementation CTMediator (LoginCoordinatorActions)
- (UIViewController *)CTMediator_viewControllerForLoginCoordinator{ - (UIViewController *)CTMediator_viewControllerForLoginCoordinator{
UIViewController *viewController = [self performTarget:kCTMediatorTargetLoginCoordinator UIViewController *viewController = [self performTarget:kCTMediatorTargetLoginCoordinator
......
...@@ -7,21 +7,28 @@ ...@@ -7,21 +7,28 @@
#import "Target_LoginCoordinator.h" #import "Target_LoginCoordinator.h"
#import "NRLoginViewController.h" #import "NRLoginViewController.h"
#import "NRCommonNavigationViewController.h"
#import "CTMediator+HomeCoordinatorActions.h"
@interface Target_LoginCoordinator() @interface Target_LoginCoordinator()<NRLoginViewControllerDelegate>
@property(nonatomic, weak) UINavigationController *navigationController; @property(nonatomic, weak) UINavigationController *navigationController;
@end @end
@implementation Target_LoginCoordinator @implementation Target_LoginCoordinator
- (UIViewController *)Action_LoginCoordinatorRootController:(NSDictionary *)params{ - (UIViewController *)Action_LoginCoordinatorRootController:(NSDictionary *)params{
NRLoginViewController *vc = [NRLoginViewController instantiateWithStoryboardName:@"NRLogin"]; NRLoginViewController *loginVC = [NRLoginViewController instantiateWithStoryboardName:@"NRLogin"];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:vc]; loginVC.controllerDelegate = self;
NRCommonNavigationViewController *navigationController = [[NRCommonNavigationViewController alloc] initWithRootViewController:loginVC];
return navigationController; return navigationController;
} }
- (void)loginSuccessAction{
UIWindow *window = [UIApplication sharedApplication].windows.firstObject;
UIViewController *viewController = [[CTMediator sharedInstance] CTMediator_viewControllerForHomeCoordinator];
window.rootViewController = viewController;
[window makeKeyAndVisible];
}
@end @end
...@@ -14,6 +14,11 @@ ...@@ -14,6 +14,11 @@
@protocol NRLoginLogicDelegate <NSObject> @protocol NRLoginLogicDelegate <NSObject>
@optional @optional
/**
发送短信
*/
-(void)sendMessageCompleted:(BaseHttpModel *_Nullable)httpModel;
/** /**
数据加载完成 数据加载完成
*/ */
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
// //
#import "NRLoginLogic.h" #import "NRLoginLogic.h"
#import "UIDevice+NRDevice.h"
#import "NSString+NRRSA.h"
#import "NRUserModel.h" #import "NRUserModel.h"
@implementation NRLoginLogic @implementation NRLoginLogic
...@@ -19,8 +17,8 @@ ...@@ -19,8 +17,8 @@
NSString *tvalue = [servertimeRequest.httpModel.data objectAtIndex:0]; NSString *tvalue = [servertimeRequest.httpModel.data objectAtIndex:0];
[self sendVerifyCodeRequest:tvalue phoneNumber:phoneNumber]; [self sendVerifyCodeRequest:tvalue phoneNumber:phoneNumber];
}else{ }else{
if (self.logicDelegate && [self.logicDelegate respondsToSelector:@selector(requestDataCompleted:)]) { if (self.logicDelegate && [self.logicDelegate respondsToSelector:@selector(sendMessageCompleted:)]) {
[self.logicDelegate requestDataCompleted:request.httpModel]; [self.logicDelegate sendMessageCompleted:request.httpModel];
} }
} }
}]; }];
...@@ -35,8 +33,8 @@ ...@@ -35,8 +33,8 @@
if (!error) { if (!error) {
} }
if (self.logicDelegate && [self.logicDelegate respondsToSelector:@selector(requestDataCompleted:)]) { if (self.logicDelegate && [self.logicDelegate respondsToSelector:@selector(sendMessageCompleted:)]) {
[self.logicDelegate requestDataCompleted:request.httpModel]; [self.logicDelegate sendMessageCompleted:request.httpModel];
} }
}]; }];
} }
...@@ -103,7 +101,8 @@ ...@@ -103,7 +101,8 @@
[pwdLoginRequest startWithCompletionBlock:^(NRBaseRequest * _Nonnull request, NSString * _Nonnull error) { [pwdLoginRequest startWithCompletionBlock:^(NRBaseRequest * _Nonnull request, NSString * _Nonnull error) {
if(!error){ if(!error){
[pwdLoginRequest saveModel]; [pwdLoginRequest saveModel];
///TO DO 退出过程中有其他人登录该账号,该设备的记录将被清除
///TO DO 当deviceFlag == 0时,说明退出过程中有其他人登录该账号,该设备的记录将被清除
} }
if (self.logicDelegate && [self.logicDelegate respondsToSelector:@selector(requestDataCompleted:)]) { if (self.logicDelegate && [self.logicDelegate respondsToSelector:@selector(requestDataCompleted:)]) {
[self.logicDelegate requestDataCompleted:request.httpModel]; [self.logicDelegate requestDataCompleted:request.httpModel];
......
//
// NRRegisterLogic.h
// NetrainFrame
//
// Created by Gin on 2020/10/13.
//
#import <Foundation/Foundation.h>
#import "NRServerTimeRequest.h"
#import "NRVerifyCodeRequest.h"
#import "NRRegisterRequest.h"
#import "NRRegisterCheckVerifyCodeRequest.h"
#import "NRLoginPublicKeyRequest.h"
#import "NRPasswordLoginRequest.h"
#import "NRLoginKeyRequest.h"
@protocol NRRegisterLogicDelegate <NSObject>
@optional
/**
数据加载完成
*/
-(void)requestDataCompleted:(BaseHttpModel *_Nullable)httpModel;
@end
NS_ASSUME_NONNULL_BEGIN
@interface NRRegisterLogic : NSObject
@property(nonatomic,weak) id<NRRegisterLogicDelegate> logicDelegate;
- (void)getVerifyCodeWithPhoneNumber:(NSString *)phoneNumber;
- (void)registerRequestStepWithParams:(NSMutableDictionary *)params;
@end
NS_ASSUME_NONNULL_END
//
// NRRegisterLogic.m
// NetrainFrame
//
// Created by Gin on 2020/10/13.
//
#import "NRRegisterLogic.h"
@implementation NRRegisterLogic
- (void)getVerifyCodeWithPhoneNumber:(NSString *)phoneNumber{
NRServerTimeRequest *servertimeRequest = [[NRServerTimeRequest alloc] init];
[servertimeRequest startWithCompletionBlock:^(NRBaseRequest * _Nonnull request, NSString * _Nonnull error) {
if (!error) {
NSString *tvalue = [servertimeRequest.httpModel.data objectAtIndex:0];
[self sendVerifyCodeRequest:tvalue phoneNumber:phoneNumber];
}else{
// if (self.logicDelegate && [self.logicDelegate respondsToSelector:@selector(requestDataCompleted:)]) {
// [self.logicDelegate requestDataCompleted:request.httpModel];
// }
}
}];
}
- (void)sendVerifyCodeRequest:(NSString *)tvalue phoneNumber:(NSString *)phoneNumber{
NRVerifyCodeRequest *verifyCodeRequest = [[NRVerifyCodeRequest alloc] init];
verifyCodeRequest.phoneNumber = phoneNumber;
verifyCodeRequest.actionType = @"1";
verifyCodeRequest.tvalue = tvalue ? tvalue : @"";
[verifyCodeRequest startWithCompletionBlock:^(NRBaseRequest * _Nonnull request, NSString * _Nonnull error) {
if (!error) {
}
// if (self.logicDelegate && [self.logicDelegate respondsToSelector:@selector(requestDataCompleted:)]) {
// [self.logicDelegate requestDataCompleted:request.httpModel];
// }
}];
}
- (void)registerRequestStepWithParams:(NSMutableDictionary *)params{
///检查验证码
NRRegisterCheckVerifyCodeRequest *checkVerifyCodeRequest = [[NRRegisterCheckVerifyCodeRequest alloc] init];
checkVerifyCodeRequest.phoneNumber = params[@"phoneNum"];
checkVerifyCodeRequest.verifyCode = params[@"inviterCode"];
[checkVerifyCodeRequest startWithCompletionBlock:^(NRBaseRequest * _Nonnull request, NSString * _Nonnull error) {
if (!error) {
[self getRegisterPublicKeyRequest:params];
}
}];
}
-(void)getRegisterPublicKeyRequest:(NSMutableDictionary *)params{
NRLoginPublicKeyRequest *publicKeyRequest = [[NRLoginPublicKeyRequest alloc] init];
publicKeyRequest.phoneNumber = [params objectForKey:@"phoneNum"];
[publicKeyRequest startWithCompletionBlock:^(NRBaseRequest * _Nonnull request, NSString * _Nonnull error) {
if(!error){
NSString* pubKey = [[publicKeyRequest.httpModel.data objectAtIndex:0] objectForKey:@"publicKey"];
NSString *publicKey=[NSString formatPulicKeys:pubKey password:[params objectForKey:@"password"]];
if(!publicKey.isNotBlank){
return ;
}
[params setObject:publicKey forKey:@"password"];
[self registerActionRequest:params];
}else{
// if (self.logicDelegate && [self.logicDelegate respondsToSelector:@selector(requestDataCompleted:)]) {
// [self.logicDelegate requestDataCompleted:request.httpModel];
// }
}
}];
}
- (void)registerActionRequest:(NSMutableDictionary *)params{
NRRegisterRequest *registerRequest = [[NRRegisterRequest alloc] init];
registerRequest.params = params;
[registerRequest startWithCompletionBlock:^(NRBaseRequest * _Nonnull request, NSString * _Nonnull error) {
if(!error){
[self passwordLoginWithPhoneNumber:params[@"phoneNum"] password:params[@"purepassword"]];
}
// if (self.logicDelegate && [self.logicDelegate respondsToSelector:@selector(requestDataCompleted:)]) {
// [self.logicDelegate requestDataCompleted:request.httpModel];
// }
}];
}
- (void)passwordLoginWithPhoneNumber:(NSString *)phoneNumber password:(NSString *)password{
NSMutableDictionary *params = [[NSMutableDictionary alloc] init];
NRLoginKeyRequest *loginKeyRequest = [[NRLoginKeyRequest alloc] init];
loginKeyRequest.phoneNumber = phoneNumber;
[loginKeyRequest startWithCompletionBlock:^(NRBaseRequest * _Nonnull request, NSString * _Nonnull error) {
if(!error){
NSDictionary *loginKeyDict = [loginKeyRequest.httpModel.data objectAtIndex:0];
[params setObject:[loginKeyDict objectForKey:@"loginKey"] forKey:@"loginKey"];
[params setObject:[loginKeyDict objectForKey:@"loginId"] forKey:@"loginId"];
[params setObject:phoneNumber forKey:@"phoneNum"];
[params setObject:password forKey:@"password"];
[self getLoginPublicKeyRequest:params];
}else{
// if (self.logicDelegate && [self.logicDelegate respondsToSelector:@selector(requestDataCompleted:)]) {
// [self.logicDelegate requestDataCompleted:request.httpModel];
// }
}
}];
}
-(void)getLoginPublicKeyRequest:(NSMutableDictionary *)params{
NRLoginPublicKeyRequest *publicKeyRequest = [[NRLoginPublicKeyRequest alloc] init];
publicKeyRequest.phoneNumber = [params objectForKey:@"phoneNum"];
[publicKeyRequest startWithCompletionBlock:^(NRBaseRequest * _Nonnull request, NSString * _Nonnull error) {
if(!error){
NSString* pubKey = [[publicKeyRequest.httpModel.data objectAtIndex:0] objectForKey:@"publicKey"];
NSString *publicKey=[NSString formatPulicKeys:pubKey password:[params objectForKey:@"password"]];
if(!publicKey.isNotBlank){
request.httpModel.code = kHttpCode_NotPublic;
request.httpModel.msg = @"登录失败,请重新登录";
// if (self.logicDelegate && [self.logicDelegate respondsToSelector:@selector(requestDataCompleted:)]) {
// [self.logicDelegate requestDataCompleted:request.httpModel];
// }
return ;
}
[params setObject:publicKey forKey:@"password"];
[self passwordLoginRequest:params];
}else{
// if (self.logicDelegate && [self.logicDelegate respondsToSelector:@selector(requestDataCompleted:)]) {
// [self.logicDelegate requestDataCompleted:request.httpModel];
// }
}
}];
}
-(void)passwordLoginRequest:(NSMutableDictionary *)params{
NRPasswordLoginRequest *pwdLoginRequest = [[NRPasswordLoginRequest alloc] init];
NSString *deviceIdentifier = [UIDevice deviceIdentifier];
if (!deviceIdentifier.isNotBlank) {
deviceIdentifier = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
}
if(deviceIdentifier.isNotBlank){
[params setObject:deviceIdentifier forKey:@"deviceSN"];
}
pwdLoginRequest.params = params;
[pwdLoginRequest startWithCompletionBlock:^(NRBaseRequest * _Nonnull request, NSString * _Nonnull error) {
if(!error){
[pwdLoginRequest saveModel];
///TO DO 退出过程中有其他人登录该账号,该设备的记录将被清除
}
// if (self.logicDelegate && [self.logicDelegate respondsToSelector:@selector(requestDataCompleted:)]) {
// [self.logicDelegate requestDataCompleted:request.httpModel];
// }
}];
}
@end
...@@ -21,6 +21,9 @@ ...@@ -21,6 +21,9 @@
-(void)saveModel{ -(void)saveModel{
NSArray *arr = [[NRBaseModelAgent agent] createModel:NRUserModel.class fromJson:self.httpModel.data]; NSArray *arr = [[NRBaseModelAgent agent] createModel:NRUserModel.class fromJson:self.httpModel.data];
NRUserModel *userModel = [arr objectAtIndex:0]; NRUserModel *userModel = [arr objectAtIndex:0];
if(!userModel.status){
userModel.status = @"4";
}
userModel.phoneNum = [self.params objectForKey:@"phoneNum"]; userModel.phoneNum = [self.params objectForKey:@"phoneNum"];
[[NRBaseModelAgent agent] writeModel:userModel]; [[NRBaseModelAgent agent] writeModel:userModel];
} }
......
//
// NRRegisterCheckVerifyCodeRequest.h
// NetrainFrame
//
// Created by Gin on 2020/10/13.
//
#import "NRBaseRequest.h"
NS_ASSUME_NONNULL_BEGIN
@interface NRRegisterCheckVerifyCodeRequest : NRBaseRequest
@property(nonatomic, copy) NSString *verifyCode;
@property(nonatomic, copy) NSString *phoneNumber;
@end
NS_ASSUME_NONNULL_END
//
// NRRegisterCheckVerifyCodeRequest.m
// NetrainFrame
//
// Created by Gin on 2020/10/13.
//
#import "NRRegisterCheckVerifyCodeRequest.h"
@implementation NRRegisterCheckVerifyCodeRequest
-(NSString *)requestUrl{
return @"login/validateRegist";
}
-(id)requestArgument{
return @{
@"phoneNum": self.phoneNumber,
@"verifyCode": self.verifyCode,
};
}
@end
...@@ -11,6 +11,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -11,6 +11,8 @@ NS_ASSUME_NONNULL_BEGIN
@interface NRRegisterRequest : NRBaseRequest @interface NRRegisterRequest : NRBaseRequest
@property(copy, nonatomic) NSDictionary *params;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -8,5 +8,12 @@ ...@@ -8,5 +8,12 @@
#import "NRRegisterRequest.h" #import "NRRegisterRequest.h"
@implementation NRRegisterRequest @implementation NRRegisterRequest
-(NSString *)requestUrl{
return @"login/regist";
}
-(id)requestArgument{
return self.params;
}
@end @end
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "navi_return_button@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "navi_return_button@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="kDB-rm-a1x">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<scenes> <scenes>
<!--View Controller--> <!--View Controller-->
<scene sceneID="EHf-IW-A2E"> <scene sceneID="KcI-v5-LXv">
<objects> <objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController"> <viewController storyboardIdentifier="LaunchScreen" id="kDB-rm-a1x" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> <layoutGuides>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <viewControllerLayoutGuide type="top" id="p2s-TZ-1jR"/>
<viewControllerLayoutGuide type="bottom" id="dsf-gh-mdf"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Tjz-N3-y2q">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_appicon" translatesAutoresizingMaskIntoConstraints="NO" id="rbb-XS-oyO">
<rect key="frame" x="130.5" y="809" width="153" height="30"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" secondItem="rbb-XS-oyO" secondAttribute="height" multiplier="51:10" id="5J6-qz-kPP"/>
<constraint firstAttribute="width" constant="153" id="Wok-Wh-glg"/>
</constraints>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="VkO-Ud-Kfo"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="rbb-XS-oyO" firstAttribute="centerX" secondItem="Tjz-N3-y2q" secondAttribute="centerX" id="kyL-dw-77I"/>
<constraint firstItem="dsf-gh-mdf" firstAttribute="top" secondItem="rbb-XS-oyO" secondAttribute="bottom" constant="23" id="z7R-IQ-KW7"/>
</constraints>
</view> </view>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="RIj-UL-9zB" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="53" y="375"/> <point key="canvasLocation" x="52.173913043478265" y="375"/>
</scene> </scene>
</scenes> </scenes>
<resources>
<image name="login_appicon" width="153" height="30"/>
</resources>
</document> </document>
...@@ -7,15 +7,21 @@ ...@@ -7,15 +7,21 @@
#ifndef PrefixHeader_pch #ifndef PrefixHeader_pch
#define PrefixHeader_pch #define PrefixHeader_pch
//全局宏 ///全局宏
#import "UtilsMacros.h" #import "UtilsMacros.h"
#import "URLMacros.h" #import "URLMacros.h"
#import "FontAndColorMacros.h" #import "FontAndColorMacros.h"
#import "ThirdMacros.h" #import "ThirdMacros.h"
#import "NotificationMacros.h" #import "NotificationMacros.h"
///Categories
#import "UIDevice+NRAdd.h"
#import "NSString+NRAdd.h"
//第三方 ///
#import "NRGlobalUrlModel.h"
///第三方
#import <Masonry.h> #import <Masonry.h>
#import <YYModel.h> #import <YYModel.h>
#import <SDWebImage/UIImageView+WebCache.h> #import <SDWebImage/UIImageView+WebCache.h>
......
//
// NRCountDownButton.h
// NetrainFrame
//
// Created by Gin on 2020/10/13.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface NRCountDownButton : UIButton
- (void)startTimer;
-(void)removeTimer;
@end
NS_ASSUME_NONNULL_END
//
// NRCountDownButton.m
// NetrainFrame
//
// Created by Gin on 2020/10/13.
//
#import "NRCountDownButton.h"
@interface NRCountDownButton ()
@property(nonatomic, strong)NSTimer *countDownTimer;
@property(nonatomic, assign)NSInteger timeout;
@property (strong,nonatomic) NSDate *resignBackgroundDate;
@end
@implementation NRCountDownButton
-(instancetype)initWithFrame:(CGRect)frame{
if(self = [super initWithFrame:frame]){
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(resignActiveToRecordState)
name:NOTIFICATION_RESIGN_ACTIVE
object:nil];////进入后台通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(becomeActiveToRecordState)
name:NOTIFICATION_BECOME_ACTIVE
object:nil];//进入前台通知
}
return self;
}
-(instancetype)initWithCoder:(NSCoder *)coder{
if(self = [super initWithCoder:coder]){
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(resignActiveToRecordState)
name:NOTIFICATION_RESIGN_ACTIVE
object:nil];////进入后台通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(becomeActiveToRecordState)
name:NOTIFICATION_BECOME_ACTIVE
object:nil];//进入前台通知
}
return self;
}
- (void)resignActiveToRecordState {
_resignBackgroundDate = [NSDate date];
}
- (void)becomeActiveToRecordState {
NSTimeInterval timeHasGone = [[NSDate date] timeIntervalSinceDate:_resignBackgroundDate];
if (_timeout - timeHasGone < 0) {
_timeout = 0;
}else{
_timeout = _timeout - timeHasGone;
}
}
- (void)startTimer{
_timeout = 59; //倒计时时间
[self setEnabled:NO];
_countDownTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(timeFireMethod) userInfo:nil repeats:YES];
}
- (void)timeFireMethod{
if (_timeout > 0) {
_timeout--;
}else{
_timeout = 0;
}
if(_timeout==0){
[self setTitle:@"重新获取" forState:UIControlStateNormal];
[self setEnabled:YES];
[_countDownTimer invalidate];
}else{
int seconds = _timeout % 60;
[self setEnabled:NO];
NSString *strTime = [NSString stringWithFormat:@"%.2ds重试", seconds];
self.titleLabel.textAlignment = NSTextAlignmentCenter;
self.titleLabel.text = strTime;
[self setTitle:strTime forState:UIControlStateNormal];
NSLog(@"%d",seconds);
}
}
- (void)resetVerifyCode {
_timeout = 0;
[self setTitle:@"重新获取" forState:UIControlStateNormal];
[self setEnabled:YES];
[self removeTimer];
}
-(void)removeTimer{
[_countDownTimer invalidate];
_countDownTimer = nil;
}
-(void)dealloc{
NSLog(@"countdown button dealloc");
}
@end
...@@ -9,8 +9,12 @@ ...@@ -9,8 +9,12 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface NSString (NRRSA) @interface NSString (NRAdd)
///Match
- (BOOL)isMatchName;
///RSA
+(NSString*)formatPulicKeys:(NSString*)publicKey password:(NSString*)password; +(NSString*)formatPulicKeys:(NSString*)publicKey password:(NSString*)password;
@end @end
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// Created by Gin on 2020/9/24. // Created by Gin on 2020/9/24.
// //
#import "NSString+NRRSA.h" #import "NSString+NRAdd.h"
#import "BDRSACryptor.h" #import "BDRSACryptor.h"
#import "BDRSACryptorKeyPair.h" #import "BDRSACryptorKeyPair.h"
...@@ -13,9 +13,24 @@ ...@@ -13,9 +13,24 @@
#define X509PublicHeader @"-----BEGIN PUBLIC KEY-----" #define X509PublicHeader @"-----BEGIN PUBLIC KEY-----"
#define X509PublicFooter @"-----END PUBLIC KEY-----" #define X509PublicFooter @"-----END PUBLIC KEY-----"
@implementation NSString (NRRSA) @implementation NSString (NRAdd)
#pragma mark -- Match
- (BOOL)isMatchName{
if(self.isNotBlank){
NSString *regex = @"^[A-Za-z0-9\u4e00-\u9fa5-/:;()$&@\".,?!'\\[\\]{}#%\\^*+=_\\\\|~&#%\\^*+=_\\\\|~&amp;#%\\^*+=_\\\\|~&#%\\^*+=_\\\\|~&amp;amp;#%\\^*+=_\\\\|~&#%\\^*+=_\\\\|~&amp;#%\\^*+=_\\\\|~&#%\\^*+=_\\\\|~&amp;amp;lt;&#%\\^*+=_\\\\|~&amp;amp;lt;&amp;#%\\^*+=_\\\\|~&#%\\^*+=_\\\\|~&amp;amp;lt;&#%\\^*+=_\\\\|~&amp;amp;lt;&amp;amp;#%\\^*+=_\\\\|~&#%\\^*+=_\\\\|~&amp;#%\\^*+=_\\\\|~&#%\\^*+=_\\\\|~&amp;amp;lt;&#%\\^*+=_\\\\|~&amp;amp;lt;&amp;#%\\^*+=_\\\\|~&#%\\^*+=_\\\\|~&amp;amp;lt;&#%\\^*+=_\\\\|~&amp;amp;lt;&amp;amp;gt;€£¥•·]*";
NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex];
BOOL isMatch = [pred evaluateWithObject:[NSString stringWithFormat:@"%@",self]];
if ([self containsString:@","]||[self containsString:@"?"]||[self containsString:@"("]||[self containsString:@")"]) {
isMatch=NO;
}
return isMatch;
}
return NO;
}
#pragma mark-导入公钥 #pragma mark -- RSA
+(NSString*)formatPulicKeys:(NSString*)publicKey password:(NSString*)password{ +(NSString*)formatPulicKeys:(NSString*)publicKey password:(NSString*)password{
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface UIDevice (NRDevice) @interface UIDevice (NRAdd)
/** /**
* 同步唯一设备标识 (生成并保存唯一设备标识,如已存在则不进行任何处理) * 同步唯一设备标识 (生成并保存唯一设备标识,如已存在则不进行任何处理)
* *
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
// Created by Gin on 2020/9/24. // Created by Gin on 2020/9/24.
// //
#import "UIDevice+NRDevice.h" #import "UIDevice+NRAdd.h"
#import "SFHFKeychainUtils.h" #import "SFHFKeychainUtils.h"
#define bundleIdentifier [[NSBundle mainBundle]bundleIdentifier] #define bundleIdentifier [[NSBundle mainBundle]bundleIdentifier]
@implementation UIDevice (NRDevice) @implementation UIDevice (NRAdd)
/** /**
* 同步唯一设备标识 (生成并保存唯一设备标识,如已存在则不进行任何处理) * 同步唯一设备标识 (生成并保存唯一设备标识,如已存在则不进行任何处理)
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment