Commit 086cabe0fa88bf746e514eb579668d17e16061fd

Authored by 张旭
1 parent 9f553974

更换新的SDK,并增加测试代码

CNLiveUserSystemDemo/CNLiveUserSystemDemo.xcodeproj/project.pbxproj
@@ -7,7 +7,6 @@ @@ -7,7 +7,6 @@
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
10 - 8107CD3C1DDEFB9B0061EA8A /* CNLiveThirdLoginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8107CD3B1DDEFB9B0061EA8A /* CNLiveThirdLoginManager.m */; };  
11 810D9B651D8FB70600B7A776 /* TencentOpenAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B511D8FB70600B7A776 /* TencentOpenAPI.framework */; }; 10 810D9B651D8FB70600B7A776 /* TencentOpenAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B511D8FB70600B7A776 /* TencentOpenAPI.framework */; };
12 810D9B661D8FB70600B7A776 /* TencentOpenApi_IOS_Bundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 810D9B521D8FB70600B7A776 /* TencentOpenApi_IOS_Bundle.bundle */; }; 11 810D9B661D8FB70600B7A776 /* TencentOpenApi_IOS_Bundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 810D9B521D8FB70600B7A776 /* TencentOpenApi_IOS_Bundle.bundle */; };
13 810D9B671D8FB70600B7A776 /* libWeiboSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B541D8FB70600B7A776 /* libWeiboSDK.a */; }; 12 810D9B671D8FB70600B7A776 /* libWeiboSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B541D8FB70600B7A776 /* libWeiboSDK.a */; };
@@ -24,11 +23,6 @@ @@ -24,11 +23,6 @@
24 810D9B7A1D8FB7AC00B7A776 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B791D8FB7AC00B7A776 /* libz.tbd */; }; 23 810D9B7A1D8FB7AC00B7A776 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B791D8FB7AC00B7A776 /* libz.tbd */; };
25 810D9B7F1D8FCD1900B7A776 /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B7E1D8FCD1900B7A776 /* libsqlite3.0.tbd */; }; 24 810D9B7F1D8FCD1900B7A776 /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B7E1D8FCD1900B7A776 /* libsqlite3.0.tbd */; };
26 810D9B811D8FCD3200B7A776 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B801D8FCD3200B7A776 /* libc++.tbd */; }; 25 810D9B811D8FCD3200B7A776 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B801D8FCD3200B7A776 /* libc++.tbd */; };
27 - 810EB6441E543EE900C33D18 /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 810EB63B1E543EE900C33D18 /* LoginViewController.m */; };  
28 - 810EB6451E543EE900C33D18 /* ModifyUserInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 810EB63D1E543EE900C33D18 /* ModifyUserInfoViewController.m */; };  
29 - 810EB6461E543EE900C33D18 /* RegisterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 810EB63F1E543EE900C33D18 /* RegisterViewController.m */; };  
30 - 810EB6471E543EE900C33D18 /* UserInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 810EB6411E543EE900C33D18 /* UserInfoViewController.m */; };  
31 - 810EB6481E543EE900C33D18 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 810EB6431E543EE900C33D18 /* ViewController.m */; };  
32 810EB6541E543EFC00C33D18 /* IdAndPwdView.m in Sources */ = {isa = PBXBuildFile; fileRef = 810EB64B1E543EFC00C33D18 /* IdAndPwdView.m */; }; 26 810EB6541E543EFC00C33D18 /* IdAndPwdView.m in Sources */ = {isa = PBXBuildFile; fileRef = 810EB64B1E543EFC00C33D18 /* IdAndPwdView.m */; };
33 810EB6551E543EFC00C33D18 /* RegistBasicInformationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 810EB64D1E543EFC00C33D18 /* RegistBasicInformationView.m */; }; 27 810EB6551E543EFC00C33D18 /* RegistBasicInformationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 810EB64D1E543EFC00C33D18 /* RegistBasicInformationView.m */; };
34 810EB6561E543EFC00C33D18 /* ThirdPartyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 810EB64F1E543EFC00C33D18 /* ThirdPartyView.m */; }; 28 810EB6561E543EFC00C33D18 /* ThirdPartyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 810EB64F1E543EFC00C33D18 /* ThirdPartyView.m */; };
@@ -58,7 +52,6 @@ @@ -58,7 +52,6 @@
58 812642D41D86A7A800B402CA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 812642D21D86A7A800B402CA /* LaunchScreen.storyboard */; }; 52 812642D41D86A7A800B402CA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 812642D21D86A7A800B402CA /* LaunchScreen.storyboard */; };
59 812642DF1D86A7A800B402CA /* CNLiveUserSystemDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 812642DE1D86A7A800B402CA /* CNLiveUserSystemDemoTests.m */; }; 53 812642DF1D86A7A800B402CA /* CNLiveUserSystemDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 812642DE1D86A7A800B402CA /* CNLiveUserSystemDemoTests.m */; };
60 812642EA1D86A7A800B402CA /* CNLiveUserSystemDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 812642E91D86A7A800B402CA /* CNLiveUserSystemDemoUITests.m */; }; 54 812642EA1D86A7A800B402CA /* CNLiveUserSystemDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 812642E91D86A7A800B402CA /* CNLiveUserSystemDemoUITests.m */; };
61 - 813A4A161E9E25DD00129F94 /* CNLiveUserSystemSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 813A4A151E9E25DD00129F94 /* CNLiveUserSystemSDK.framework */; };  
62 817C6EC31D90D60E0016F211 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 817C6EC21D90D60E0016F211 /* ImageIO.framework */; }; 55 817C6EC31D90D60E0016F211 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 817C6EC21D90D60E0016F211 /* ImageIO.framework */; };
63 8187A8EF1D8E6394007FAFB6 /* Tools.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A8EE1D8E6394007FAFB6 /* Tools.m */; }; 56 8187A8EF1D8E6394007FAFB6 /* Tools.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A8EE1D8E6394007FAFB6 /* Tools.m */; };
64 8187A8F61D8E6486007FAFB6 /* NSObject+UserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A8F11D8E6486007FAFB6 /* NSObject+UserModel.m */; }; 57 8187A8F61D8E6486007FAFB6 /* NSObject+UserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A8F11D8E6486007FAFB6 /* NSObject+UserModel.m */; };
@@ -70,6 +63,15 @@ @@ -70,6 +63,15 @@
70 8187A90D1D8E9A7B007FAFB6 /* SVProgressHUD.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 8187A9061D8E9A7B007FAFB6 /* SVProgressHUD.bundle */; }; 63 8187A90D1D8E9A7B007FAFB6 /* SVProgressHUD.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 8187A9061D8E9A7B007FAFB6 /* SVProgressHUD.bundle */; };
71 8187A90E1D8E9A7B007FAFB6 /* SVProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A9081D8E9A7B007FAFB6 /* SVProgressHUD.m */; }; 64 8187A90E1D8E9A7B007FAFB6 /* SVProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A9081D8E9A7B007FAFB6 /* SVProgressHUD.m */; };
72 8187A90F1D8E9A7B007FAFB6 /* SVRadialGradientLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A90A1D8E9A7B007FAFB6 /* SVRadialGradientLayer.m */; }; 65 8187A90F1D8E9A7B007FAFB6 /* SVRadialGradientLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 8187A90A1D8E9A7B007FAFB6 /* SVRadialGradientLayer.m */; };
  66 + D2470C281EE6572A00C16A1F /* EmailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2470C1B1EE6572A00C16A1F /* EmailViewController.m */; };
  67 + D2470C291EE6572A00C16A1F /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2470C1D1EE6572A00C16A1F /* LoginViewController.m */; };
  68 + D2470C2A1EE6572A00C16A1F /* ModifyPwdViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2470C1F1EE6572A00C16A1F /* ModifyPwdViewController.m */; };
  69 + D2470C2B1EE6572A00C16A1F /* ModifyUserInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2470C211EE6572A00C16A1F /* ModifyUserInfoViewController.m */; };
  70 + D2470C2C1EE6572A00C16A1F /* RegisterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2470C231EE6572A00C16A1F /* RegisterViewController.m */; };
  71 + D2470C2D1EE6572A00C16A1F /* UserInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2470C251EE6572A00C16A1F /* UserInfoViewController.m */; };
  72 + D2470C2E1EE6572A00C16A1F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2470C271EE6572A00C16A1F /* ViewController.m */; };
  73 + D2470C311EE6575F00C16A1F /* CNLiveThirdLoginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D2470C301EE6575F00C16A1F /* CNLiveThirdLoginManager.m */; };
  74 + D2470C411EE660AB00C16A1F /* CNLiveUserSystemSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2470C401EE660AB00C16A1F /* CNLiveUserSystemSDK.framework */; };
73 /* End PBXBuildFile section */ 75 /* End PBXBuildFile section */
74 76
75 /* Begin PBXContainerItemProxy section */ 77 /* Begin PBXContainerItemProxy section */
@@ -103,8 +105,6 @@ @@ -103,8 +105,6 @@
103 /* End PBXCopyFilesBuildPhase section */ 105 /* End PBXCopyFilesBuildPhase section */
104 106
105 /* Begin PBXFileReference section */ 107 /* Begin PBXFileReference section */
106 - 8107CD3A1DDEFB9B0061EA8A /* CNLiveThirdLoginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveThirdLoginManager.h; sourceTree = "<group>"; };  
107 - 8107CD3B1DDEFB9B0061EA8A /* CNLiveThirdLoginManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveThirdLoginManager.m; sourceTree = "<group>"; };  
108 810D9B511D8FB70600B7A776 /* TencentOpenAPI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = TencentOpenAPI.framework; sourceTree = "<group>"; }; 108 810D9B511D8FB70600B7A776 /* TencentOpenAPI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = TencentOpenAPI.framework; sourceTree = "<group>"; };
109 810D9B521D8FB70600B7A776 /* TencentOpenApi_IOS_Bundle.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = TencentOpenApi_IOS_Bundle.bundle; sourceTree = "<group>"; }; 109 810D9B521D8FB70600B7A776 /* TencentOpenApi_IOS_Bundle.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = TencentOpenApi_IOS_Bundle.bundle; sourceTree = "<group>"; };
110 810D9B541D8FB70600B7A776 /* libWeiboSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libWeiboSDK.a; sourceTree = "<group>"; }; 110 810D9B541D8FB70600B7A776 /* libWeiboSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libWeiboSDK.a; sourceTree = "<group>"; };
@@ -133,16 +133,6 @@ @@ -133,16 +133,6 @@
133 810D9B791D8FB7AC00B7A776 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; 133 810D9B791D8FB7AC00B7A776 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
134 810D9B7E1D8FCD1900B7A776 /* libsqlite3.0.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.0.tbd; path = usr/lib/libsqlite3.0.tbd; sourceTree = SDKROOT; }; 134 810D9B7E1D8FCD1900B7A776 /* libsqlite3.0.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.0.tbd; path = usr/lib/libsqlite3.0.tbd; sourceTree = SDKROOT; };
135 810D9B801D8FCD3200B7A776 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; 135 810D9B801D8FCD3200B7A776 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
136 - 810EB63A1E543EE900C33D18 /* LoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginViewController.h; sourceTree = "<group>"; };  
137 - 810EB63B1E543EE900C33D18 /* LoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginViewController.m; sourceTree = "<group>"; };  
138 - 810EB63C1E543EE900C33D18 /* ModifyUserInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModifyUserInfoViewController.h; sourceTree = "<group>"; };  
139 - 810EB63D1E543EE900C33D18 /* ModifyUserInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModifyUserInfoViewController.m; sourceTree = "<group>"; };  
140 - 810EB63E1E543EE900C33D18 /* RegisterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterViewController.h; sourceTree = "<group>"; };  
141 - 810EB63F1E543EE900C33D18 /* RegisterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegisterViewController.m; sourceTree = "<group>"; };  
142 - 810EB6401E543EE900C33D18 /* UserInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInfoViewController.h; sourceTree = "<group>"; };  
143 - 810EB6411E543EE900C33D18 /* UserInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserInfoViewController.m; sourceTree = "<group>"; };  
144 - 810EB6421E543EE900C33D18 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };  
145 - 810EB6431E543EE900C33D18 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };  
146 810EB64A1E543EFC00C33D18 /* IdAndPwdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdAndPwdView.h; sourceTree = "<group>"; }; 136 810EB64A1E543EFC00C33D18 /* IdAndPwdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdAndPwdView.h; sourceTree = "<group>"; };
147 810EB64B1E543EFC00C33D18 /* IdAndPwdView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IdAndPwdView.m; sourceTree = "<group>"; }; 137 810EB64B1E543EFC00C33D18 /* IdAndPwdView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IdAndPwdView.m; sourceTree = "<group>"; };
148 810EB64C1E543EFC00C33D18 /* RegistBasicInformationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegistBasicInformationView.h; sourceTree = "<group>"; }; 138 810EB64C1E543EFC00C33D18 /* RegistBasicInformationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegistBasicInformationView.h; sourceTree = "<group>"; };
@@ -202,7 +192,6 @@ @@ -202,7 +192,6 @@
202 812642E51D86A7A800B402CA /* CNLiveUserSystemDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CNLiveUserSystemDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 192 812642E51D86A7A800B402CA /* CNLiveUserSystemDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CNLiveUserSystemDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
203 812642E91D86A7A800B402CA /* CNLiveUserSystemDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLiveUserSystemDemoUITests.m; sourceTree = "<group>"; }; 193 812642E91D86A7A800B402CA /* CNLiveUserSystemDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLiveUserSystemDemoUITests.m; sourceTree = "<group>"; };
204 812642EB1D86A7A800B402CA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 194 812642EB1D86A7A800B402CA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
205 - 813A4A151E9E25DD00129F94 /* CNLiveUserSystemSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveUserSystemSDK.framework; sourceTree = "<group>"; };  
206 817C6EC21D90D60E0016F211 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; 195 817C6EC21D90D60E0016F211 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };
207 8187A8ED1D8E6394007FAFB6 /* Tools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tools.h; sourceTree = "<group>"; }; 196 8187A8ED1D8E6394007FAFB6 /* Tools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tools.h; sourceTree = "<group>"; };
208 8187A8EE1D8E6394007FAFB6 /* Tools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Tools.m; sourceTree = "<group>"; }; 197 8187A8EE1D8E6394007FAFB6 /* Tools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Tools.m; sourceTree = "<group>"; };
@@ -224,6 +213,23 @@ @@ -224,6 +213,23 @@
224 8187A9081D8E9A7B007FAFB6 /* SVProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVProgressHUD.m; sourceTree = "<group>"; }; 213 8187A9081D8E9A7B007FAFB6 /* SVProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVProgressHUD.m; sourceTree = "<group>"; };
225 8187A9091D8E9A7B007FAFB6 /* SVRadialGradientLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVRadialGradientLayer.h; sourceTree = "<group>"; }; 214 8187A9091D8E9A7B007FAFB6 /* SVRadialGradientLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVRadialGradientLayer.h; sourceTree = "<group>"; };
226 8187A90A1D8E9A7B007FAFB6 /* SVRadialGradientLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVRadialGradientLayer.m; sourceTree = "<group>"; }; 215 8187A90A1D8E9A7B007FAFB6 /* SVRadialGradientLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVRadialGradientLayer.m; sourceTree = "<group>"; };
  216 + D2470C1A1EE6572A00C16A1F /* EmailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmailViewController.h; sourceTree = "<group>"; };
  217 + D2470C1B1EE6572A00C16A1F /* EmailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EmailViewController.m; sourceTree = "<group>"; };
  218 + D2470C1C1EE6572A00C16A1F /* LoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginViewController.h; sourceTree = "<group>"; };
  219 + D2470C1D1EE6572A00C16A1F /* LoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginViewController.m; sourceTree = "<group>"; };
  220 + D2470C1E1EE6572A00C16A1F /* ModifyPwdViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModifyPwdViewController.h; sourceTree = "<group>"; };
  221 + D2470C1F1EE6572A00C16A1F /* ModifyPwdViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModifyPwdViewController.m; sourceTree = "<group>"; };
  222 + D2470C201EE6572A00C16A1F /* ModifyUserInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModifyUserInfoViewController.h; sourceTree = "<group>"; };
  223 + D2470C211EE6572A00C16A1F /* ModifyUserInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModifyUserInfoViewController.m; sourceTree = "<group>"; };
  224 + D2470C221EE6572A00C16A1F /* RegisterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterViewController.h; sourceTree = "<group>"; };
  225 + D2470C231EE6572A00C16A1F /* RegisterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegisterViewController.m; sourceTree = "<group>"; };
  226 + D2470C241EE6572A00C16A1F /* UserInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInfoViewController.h; sourceTree = "<group>"; };
  227 + D2470C251EE6572A00C16A1F /* UserInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserInfoViewController.m; sourceTree = "<group>"; };
  228 + D2470C261EE6572A00C16A1F /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
  229 + D2470C271EE6572A00C16A1F /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
  230 + D2470C2F1EE6575F00C16A1F /* CNLiveThirdLoginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveThirdLoginManager.h; sourceTree = "<group>"; };
  231 + D2470C301EE6575F00C16A1F /* CNLiveThirdLoginManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveThirdLoginManager.m; sourceTree = "<group>"; };
  232 + D2470C401EE660AB00C16A1F /* CNLiveUserSystemSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveUserSystemSDK.framework; sourceTree = "<group>"; };
227 /* End PBXFileReference section */ 233 /* End PBXFileReference section */
228 234
229 /* Begin PBXFrameworksBuildPhase section */ 235 /* Begin PBXFrameworksBuildPhase section */
@@ -231,7 +237,7 @@ @@ -231,7 +237,7 @@
231 isa = PBXFrameworksBuildPhase; 237 isa = PBXFrameworksBuildPhase;
232 buildActionMask = 2147483647; 238 buildActionMask = 2147483647;
233 files = ( 239 files = (
234 - 813A4A161E9E25DD00129F94 /* CNLiveUserSystemSDK.framework in Frameworks */, 240 + D2470C411EE660AB00C16A1F /* CNLiveUserSystemSDK.framework in Frameworks */,
235 811600FE1D927E7E003CAE7D /* WebP.framework in Frameworks */, 241 811600FE1D927E7E003CAE7D /* WebP.framework in Frameworks */,
236 817C6EC31D90D60E0016F211 /* ImageIO.framework in Frameworks */, 242 817C6EC31D90D60E0016F211 /* ImageIO.framework in Frameworks */,
237 810D9B811D8FCD3200B7A776 /* libc++.tbd in Frameworks */, 243 810D9B811D8FCD3200B7A776 /* libc++.tbd in Frameworks */,
@@ -330,16 +336,20 @@ @@ -330,16 +336,20 @@
330 810EB6391E543EE900C33D18 /* Conreollers */ = { 336 810EB6391E543EE900C33D18 /* Conreollers */ = {
331 isa = PBXGroup; 337 isa = PBXGroup;
332 children = ( 338 children = (
333 - 810EB63A1E543EE900C33D18 /* LoginViewController.h */,  
334 - 810EB63B1E543EE900C33D18 /* LoginViewController.m */,  
335 - 810EB63C1E543EE900C33D18 /* ModifyUserInfoViewController.h */,  
336 - 810EB63D1E543EE900C33D18 /* ModifyUserInfoViewController.m */,  
337 - 810EB63E1E543EE900C33D18 /* RegisterViewController.h */,  
338 - 810EB63F1E543EE900C33D18 /* RegisterViewController.m */,  
339 - 810EB6401E543EE900C33D18 /* UserInfoViewController.h */,  
340 - 810EB6411E543EE900C33D18 /* UserInfoViewController.m */,  
341 - 810EB6421E543EE900C33D18 /* ViewController.h */,  
342 - 810EB6431E543EE900C33D18 /* ViewController.m */, 339 + D2470C1A1EE6572A00C16A1F /* EmailViewController.h */,
  340 + D2470C1B1EE6572A00C16A1F /* EmailViewController.m */,
  341 + D2470C1C1EE6572A00C16A1F /* LoginViewController.h */,
  342 + D2470C1D1EE6572A00C16A1F /* LoginViewController.m */,
  343 + D2470C1E1EE6572A00C16A1F /* ModifyPwdViewController.h */,
  344 + D2470C1F1EE6572A00C16A1F /* ModifyPwdViewController.m */,
  345 + D2470C201EE6572A00C16A1F /* ModifyUserInfoViewController.h */,
  346 + D2470C211EE6572A00C16A1F /* ModifyUserInfoViewController.m */,
  347 + D2470C221EE6572A00C16A1F /* RegisterViewController.h */,
  348 + D2470C231EE6572A00C16A1F /* RegisterViewController.m */,
  349 + D2470C241EE6572A00C16A1F /* UserInfoViewController.h */,
  350 + D2470C251EE6572A00C16A1F /* UserInfoViewController.m */,
  351 + D2470C261EE6572A00C16A1F /* ViewController.h */,
  352 + D2470C271EE6572A00C16A1F /* ViewController.m */,
343 ); 353 );
344 path = Conreollers; 354 path = Conreollers;
345 sourceTree = "<group>"; 355 sourceTree = "<group>";
@@ -405,7 +415,7 @@ @@ -405,7 +415,7 @@
405 812642B81D86A7A800B402CA = { 415 812642B81D86A7A800B402CA = {
406 isa = PBXGroup; 416 isa = PBXGroup;
407 children = ( 417 children = (
408 - 813A4A151E9E25DD00129F94 /* CNLiveUserSystemSDK.framework */, 418 + D2470C401EE660AB00C16A1F /* CNLiveUserSystemSDK.framework */,
409 810D9B7D1D8FCBC200B7A776 /* frameworks */, 419 810D9B7D1D8FCBC200B7A776 /* frameworks */,
410 812642C31D86A7A800B402CA /* CNLiveUserSystemDemo */, 420 812642C31D86A7A800B402CA /* CNLiveUserSystemDemo */,
411 812642DD1D86A7A800B402CA /* CNLiveUserSystemDemoTests */, 421 812642DD1D86A7A800B402CA /* CNLiveUserSystemDemoTests */,
@@ -482,8 +492,8 @@ @@ -482,8 +492,8 @@
482 8187A8F51D8E6486007FAFB6 /* UserInfoSava.m */, 492 8187A8F51D8E6486007FAFB6 /* UserInfoSava.m */,
483 8187A8F91D8E68CD007FAFB6 /* CNLiveLogout.h */, 493 8187A8F91D8E68CD007FAFB6 /* CNLiveLogout.h */,
484 8187A8FA1D8E68CD007FAFB6 /* CNLiveLogout.m */, 494 8187A8FA1D8E68CD007FAFB6 /* CNLiveLogout.m */,
485 - 8107CD3A1DDEFB9B0061EA8A /* CNLiveThirdLoginManager.h */,  
486 - 8107CD3B1DDEFB9B0061EA8A /* CNLiveThirdLoginManager.m */, 495 + D2470C2F1EE6575F00C16A1F /* CNLiveThirdLoginManager.h */,
  496 + D2470C301EE6575F00C16A1F /* CNLiveThirdLoginManager.m */,
487 ); 497 );
488 path = Tools; 498 path = Tools;
489 sourceTree = "<group>"; 499 sourceTree = "<group>";
@@ -656,11 +666,11 @@ @@ -656,11 +666,11 @@
656 isa = PBXSourcesBuildPhase; 666 isa = PBXSourcesBuildPhase;
657 buildActionMask = 2147483647; 667 buildActionMask = 2147483647;
658 files = ( 668 files = (
659 - 810EB6441E543EE900C33D18 /* LoginViewController.m in Sources */,  
660 - 8107CD3C1DDEFB9B0061EA8A /* CNLiveThirdLoginManager.m in Sources */,  
661 811600FB1D927E7E003CAE7D /* UIImageView+HighlightedWebCache.m in Sources */, 669 811600FB1D927E7E003CAE7D /* UIImageView+HighlightedWebCache.m in Sources */,
662 811600FC1D927E7E003CAE7D /* UIImageView+WebCache.m in Sources */, 670 811600FC1D927E7E003CAE7D /* UIImageView+WebCache.m in Sources */,
663 8187A90C1D8E9A7B007FAFB6 /* SVProgressAnimatedView.m in Sources */, 671 8187A90C1D8E9A7B007FAFB6 /* SVProgressAnimatedView.m in Sources */,
  672 + D2470C291EE6572A00C16A1F /* LoginViewController.m in Sources */,
  673 + D2470C2D1EE6572A00C16A1F /* UserInfoViewController.m in Sources */,
664 811600F71D927E7E003CAE7D /* UIButton+WebCache.m in Sources */, 674 811600F71D927E7E003CAE7D /* UIButton+WebCache.m in Sources */,
665 811600F81D927E7E003CAE7D /* UIImage+GIF.m in Sources */, 675 811600F81D927E7E003CAE7D /* UIImage+GIF.m in Sources */,
666 811600F61D927E7E003CAE7D /* SDWebImagePrefetcher.m in Sources */, 676 811600F61D927E7E003CAE7D /* SDWebImagePrefetcher.m in Sources */,
@@ -668,29 +678,31 @@ @@ -668,29 +678,31 @@
668 811600F11D927E7E003CAE7D /* SDWebImageCompat.m in Sources */, 678 811600F11D927E7E003CAE7D /* SDWebImageCompat.m in Sources */,
669 811600F31D927E7E003CAE7D /* SDWebImageDownloader.m in Sources */, 679 811600F31D927E7E003CAE7D /* SDWebImageDownloader.m in Sources */,
670 811600F41D927E7E003CAE7D /* SDWebImageDownloaderOperation.m in Sources */, 680 811600F41D927E7E003CAE7D /* SDWebImageDownloaderOperation.m in Sources */,
  681 + D2470C311EE6575F00C16A1F /* CNLiveThirdLoginManager.m in Sources */,
671 811600F21D927E7E003CAE7D /* SDWebImageDecoder.m in Sources */, 682 811600F21D927E7E003CAE7D /* SDWebImageDecoder.m in Sources */,
672 - 810EB6461E543EE900C33D18 /* RegisterViewController.m in Sources */,  
673 811600F51D927E7E003CAE7D /* SDWebImageManager.m in Sources */, 683 811600F51D927E7E003CAE7D /* SDWebImageManager.m in Sources */,
674 810EB6541E543EFC00C33D18 /* IdAndPwdView.m in Sources */, 684 810EB6541E543EFC00C33D18 /* IdAndPwdView.m in Sources */,
675 8187A8FB1D8E68CD007FAFB6 /* CNLiveLogout.m in Sources */, 685 8187A8FB1D8E68CD007FAFB6 /* CNLiveLogout.m in Sources */,
  686 + D2470C281EE6572A00C16A1F /* EmailViewController.m in Sources */,
676 810EB6561E543EFC00C33D18 /* ThirdPartyView.m in Sources */, 687 810EB6561E543EFC00C33D18 /* ThirdPartyView.m in Sources */,
677 8187A90E1D8E9A7B007FAFB6 /* SVProgressHUD.m in Sources */, 688 8187A90E1D8E9A7B007FAFB6 /* SVProgressHUD.m in Sources */,
678 811600FD1D927E7E003CAE7D /* UIView+WebCacheOperation.m in Sources */, 689 811600FD1D927E7E003CAE7D /* UIView+WebCacheOperation.m in Sources */,
679 8187A8EF1D8E6394007FAFB6 /* Tools.m in Sources */, 690 8187A8EF1D8E6394007FAFB6 /* Tools.m in Sources */,
680 812642C91D86A7A800B402CA /* AppDelegate.m in Sources */, 691 812642C91D86A7A800B402CA /* AppDelegate.m in Sources */,
681 - 810EB6451E543EE900C33D18 /* ModifyUserInfoViewController.m in Sources */,  
682 8187A90B1D8E9A7B007FAFB6 /* SVIndefiniteAnimatedView.m in Sources */, 692 8187A90B1D8E9A7B007FAFB6 /* SVIndefiniteAnimatedView.m in Sources */,
683 810EB6571E543EFC00C33D18 /* UserInfoHeaderImageTableViewCell.m in Sources */, 693 810EB6571E543EFC00C33D18 /* UserInfoHeaderImageTableViewCell.m in Sources */,
684 811600EE1D927E7E003CAE7D /* MKAnnotationView+WebCache.m in Sources */, 694 811600EE1D927E7E003CAE7D /* MKAnnotationView+WebCache.m in Sources */,
685 811600F91D927E7E003CAE7D /* UIImage+MultiFormat.m in Sources */, 695 811600F91D927E7E003CAE7D /* UIImage+MultiFormat.m in Sources */,
  696 + D2470C2A1EE6572A00C16A1F /* ModifyPwdViewController.m in Sources */,
  697 + D2470C2C1EE6572A00C16A1F /* RegisterViewController.m in Sources */,
686 8187A8F81D8E6486007FAFB6 /* UserInfoSava.m in Sources */, 698 8187A8F81D8E6486007FAFB6 /* UserInfoSava.m in Sources */,
687 811600EF1D927E7E003CAE7D /* NSData+ImageContentType.m in Sources */, 699 811600EF1D927E7E003CAE7D /* NSData+ImageContentType.m in Sources */,
  700 + D2470C2B1EE6572A00C16A1F /* ModifyUserInfoViewController.m in Sources */,
688 812642C61D86A7A800B402CA /* main.m in Sources */, 701 812642C61D86A7A800B402CA /* main.m in Sources */,
689 - 810EB6481E543EE900C33D18 /* ViewController.m in Sources */,  
690 811600FA1D927E7E003CAE7D /* UIImage+WebP.m in Sources */, 702 811600FA1D927E7E003CAE7D /* UIImage+WebP.m in Sources */,
  703 + D2470C2E1EE6572A00C16A1F /* ViewController.m in Sources */,
691 8187A90F1D8E9A7B007FAFB6 /* SVRadialGradientLayer.m in Sources */, 704 8187A90F1D8E9A7B007FAFB6 /* SVRadialGradientLayer.m in Sources */,
692 810EB6551E543EFC00C33D18 /* RegistBasicInformationView.m in Sources */, 705 810EB6551E543EFC00C33D18 /* RegistBasicInformationView.m in Sources */,
693 - 810EB6471E543EE900C33D18 /* UserInfoViewController.m in Sources */,  
694 8187A8F71D8E6486007FAFB6 /* UserInfoModel.m in Sources */, 706 8187A8F71D8E6486007FAFB6 /* UserInfoModel.m in Sources */,
695 810EB6581E543EFC00C33D18 /* UserInfoTableViewCell.m in Sources */, 707 810EB6581E543EFC00C33D18 /* UserInfoTableViewCell.m in Sources */,
696 811600F01D927E7E003CAE7D /* SDImageCache.m in Sources */, 708 811600F01D927E7E003CAE7D /* SDImageCache.m in Sources */,
@@ -855,6 +867,7 @@ @@ -855,6 +867,7 @@
855 "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/QQSDK", 867 "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/QQSDK",
856 "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/SDWebImage", 868 "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/SDWebImage",
857 "$(PROJECT_DIR)", 869 "$(PROJECT_DIR)",
  870 + "$(PROJECT_DIR)/CNLiveUserSystemDemo",
858 ); 871 );
859 GCC_PREFIX_HEADER = "$(SRCROOT)/CNLiveUserSystemDemo/PrefixHeader.pch"; 872 GCC_PREFIX_HEADER = "$(SRCROOT)/CNLiveUserSystemDemo/PrefixHeader.pch";
860 INFOPLIST_FILE = CNLiveUserSystemDemo/Info.plist; 873 INFOPLIST_FILE = CNLiveUserSystemDemo/Info.plist;
@@ -865,6 +878,7 @@ @@ -865,6 +878,7 @@
865 "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/SinaSDK", 878 "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/SinaSDK",
866 "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/WeChatSDK", 879 "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/WeChatSDK",
867 ); 880 );
  881 + MACH_O_TYPE = mh_execute;
868 OTHER_LDFLAGS = ( 882 OTHER_LDFLAGS = (
869 "-fobjc-arc", 883 "-fobjc-arc",
870 "-ObjC", 884 "-ObjC",
@@ -889,6 +903,7 @@ @@ -889,6 +903,7 @@
889 "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/QQSDK", 903 "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/QQSDK",
890 "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/SDWebImage", 904 "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/SDWebImage",
891 "$(PROJECT_DIR)", 905 "$(PROJECT_DIR)",
  906 + "$(PROJECT_DIR)/CNLiveUserSystemDemo",
892 ); 907 );
893 GCC_PREFIX_HEADER = "$(SRCROOT)/CNLiveUserSystemDemo/PrefixHeader.pch"; 908 GCC_PREFIX_HEADER = "$(SRCROOT)/CNLiveUserSystemDemo/PrefixHeader.pch";
894 INFOPLIST_FILE = CNLiveUserSystemDemo/Info.plist; 909 INFOPLIST_FILE = CNLiveUserSystemDemo/Info.plist;
@@ -899,6 +914,7 @@ @@ -899,6 +914,7 @@
899 "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/SinaSDK", 914 "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/SinaSDK",
900 "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/WeChatSDK", 915 "$(PROJECT_DIR)/CNLiveUserSystemDemo/ThirdSDK/WeChatSDK",
901 ); 916 );
  917 + MACH_O_TYPE = mh_execute;
902 OTHER_LDFLAGS = ( 918 OTHER_LDFLAGS = (
903 "-fobjc-arc", 919 "-fobjc-arc",
904 "-ObjC", 920 "-ObjC",
CNLiveUserSystemDemo/CNLiveUserSystemDemo/Conreollers/EmailViewController.h 0 → 100644
  1 +//
  2 +// EmailViewController.h
  3 +// CNLiveUserSystemDemo
  4 +//
  5 +// Created by 张旭 on 2017/5/27.
  6 +// Copyright © 2017年 zhulin. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +@interface EmailViewController : UIViewController
  12 +
  13 +@end
CNLiveUserSystemDemo/CNLiveUserSystemDemo/Conreollers/EmailViewController.m 0 → 100644
  1 +//
  2 +// EmailViewController.m
  3 +// CNLiveUserSystemDemo
  4 +//
  5 +// Created by 张旭 on 2017/5/27.
  6 +// Copyright © 2017年 zhulin. All rights reserved.
  7 +//
  8 +
  9 +#import "EmailViewController.h"
  10 +
  11 +@interface EmailViewController ()
  12 +
  13 +@property (nonatomic ,strong) UITextField * _Nullable emailTF;
  14 +@property (nonatomic ,strong) UITextField * _Nullable pwdTF;
  15 +@property (nonatomic, strong) UIButton * _Nullable confirmBtn;
  16 +
  17 +@end
  18 +
  19 +@implementation EmailViewController
  20 +
  21 +- (void)viewDidLoad {
  22 + [super viewDidLoad];
  23 + // Do any additional setup after loading the view.
  24 + self.view.backgroundColor = [UIColor whiteColor];
  25 +
  26 + [self.view addSubview:self.emailTF];
  27 + [self.view addSubview:self.pwdTF];
  28 + [self.view addSubview:self.confirmBtn];
  29 +}
  30 +
  31 +- (void)confirmBtnAction
  32 +{
  33 + [CNLiveUserSystemCenter modifyPwdWithEmail:self.emailTF.text newPwd:self.pwdTF.text success:^(id result) {
  34 + NSLog(@"result: %@",result);
  35 + [Tools toast:result[@"errorMessage"]];
  36 +
  37 + } failure:^(NSDictionary *errorDic) {
  38 + [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]];
  39 + }];
  40 +}
  41 +
  42 +- (UIButton *)confirmBtn
  43 +{
  44 + if (!_confirmBtn) {
  45 + _confirmBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  46 + [_confirmBtn setFrame:CGRectMake(10, 280, KScreenWidth - 20, 40)];
  47 + [_confirmBtn setTitle:@"确 认" forState:UIControlStateNormal];
  48 + [_confirmBtn addTarget:self action:@selector(confirmBtnAction) forControlEvents:UIControlEventTouchUpInside];
  49 + _confirmBtn.titleLabel.font = [UIFont systemFontOfSize:18];
  50 + [_confirmBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal];
  51 + _confirmBtn.layer.cornerRadius = 20;
  52 + _confirmBtn.layer.masksToBounds = YES;
  53 + _confirmBtn.layer.borderColor = [UIColor blackColor].CGColor;
  54 + _confirmBtn.layer.borderWidth = 1;
  55 + }
  56 + return _confirmBtn;
  57 +}
  58 +
  59 +- (UITextField *)emailTF
  60 +{
  61 + if (!_emailTF) {
  62 + _emailTF = [[UITextField alloc] initWithFrame:CGRectMake(10, 70, KScreenWidth - 20, 57)];
  63 + _emailTF.placeholder = @"请输入您的邮箱";
  64 + _emailTF.keyboardType = UIKeyboardTypeNamePhonePad;
  65 + _emailTF.clearButtonMode = UITextFieldViewModeWhileEditing;
  66 + _emailTF.font = [UIFont systemFontOfSize:17];
  67 + }
  68 + return _emailTF;
  69 +}
  70 +
  71 +- (UITextField *)pwdTF
  72 +{
  73 + if (!_pwdTF) {
  74 + _pwdTF = [[UITextField alloc] initWithFrame:CGRectMake(10, 70 + 57, KScreenWidth - 20, 57)];
  75 + _pwdTF.placeholder = @"请输入您的新密码";
  76 + _pwdTF.clearButtonMode = UITextFieldViewModeWhileEditing;
  77 + _pwdTF.keyboardType = UIKeyboardTypeNamePhonePad;
  78 + _pwdTF.font = [UIFont systemFontOfSize:17];
  79 + }
  80 + return _pwdTF;
  81 +}
  82 +
  83 +- (void)didReceiveMemoryWarning {
  84 + [super didReceiveMemoryWarning];
  85 + // Dispose of any resources that can be recreated.
  86 +}
  87 +
  88 +/*
  89 +#pragma mark - Navigation
  90 +
  91 +// In a storyboard-based application, you will often want to do a little preparation before navigation
  92 +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  93 + // Get the new view controller using [segue destinationViewController].
  94 + // Pass the selected object to the new view controller.
  95 +}
  96 +*/
  97 +
  98 +@end
CNLiveUserSystemDemo/CNLiveUserSystemDemo/Conreollers/LoginViewController.m
@@ -24,6 +24,10 @@ @@ -24,6 +24,10 @@
24 @property (nonatomic, strong) UIButton *qqBtn; 24 @property (nonatomic, strong) UIButton *qqBtn;
25 @property (nonatomic, strong) UILabel *thirdpartyLoginLbl; 25 @property (nonatomic, strong) UILabel *thirdpartyLoginLbl;
26 26
  27 +@property (nonatomic, strong) UIButton *checkThirdBtn;
  28 +@property (nonatomic, strong) UIButton *bindMobileBtn;
  29 +@property (nonatomic ,strong) UITextField *verificationCodeTF;
  30 +@property (nonatomic ,strong) NSDictionary *dic;
27 @end 31 @end
28 32
29 @implementation LoginViewController 33 @implementation LoginViewController
@@ -44,33 +48,49 @@ @@ -44,33 +48,49 @@
44 [self.view addSubview:self.sinaBtn]; 48 [self.view addSubview:self.sinaBtn];
45 [self.view addSubview:self.qqBtn]; 49 [self.view addSubview:self.qqBtn];
46 [self.view addSubview:self.thirdpartyLoginLbl]; 50 [self.view addSubview:self.thirdpartyLoginLbl];
  51 + [self.view addSubview:self.checkThirdBtn];
  52 + [self.view addSubview:self.bindMobileBtn];
  53 + [self.view addSubview:self.verificationCodeTF];
47 54
48 UIBarButtonItem *rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:self.registBtn]; 55 UIBarButtonItem *rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:self.registBtn];
49 self.navigationItem.rightBarButtonItem = rightBarButtonItem; 56 self.navigationItem.rightBarButtonItem = rightBarButtonItem;
50 57
51 - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginSuccess) name:ThirdLoginSuccess object:nil]; 58 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginSuccess:) name:ThirdLoginSuccess object:nil];
52 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginFailure) name:ThirdLoginFailure object:nil]; 59 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginFailure) name:ThirdLoginFailure object:nil];
53 -  
54 } 60 }
55 61
56 #pragma mark - action 62 #pragma mark - action
57 - (void)loginBtnAction 63 - (void)loginBtnAction
58 { 64 {
59 - [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeClear];  
60 - [SVProgressHUD show];  
61 -  
62 - [CNLiveUserSystemCenter loginWithUserName:_idAndPwdView.idTF.text password:_idAndPwdView.pwdTF.text frmId:nil success:^(id result) {  
63 -  
64 - NSLog(@"登录 success------------%@",result);  
65 - [SVProgressHUD showSuccessWithStatus:@"登录成功"];  
66 - [UserInfoSava saveUserinfoDic:result[@"data"]];  
67 - [Tools setUserLogin:YES];  
68 - [self.navigationController popViewControllerAnimated:YES]; 65 + NSDictionary *dic = self.dic;
  66 + if (dic) {//三方强制绑定手机号登录
  67 + [CNLiveUserSystemCenter thirdPartyBindMobileLoginWithThirdPartyPlatType:[dic objectForKey:@"platType"] thirdPartyId:dic[@"partyId"] nickName:@"testNickName" gender:[dic objectForKey:@"gender"] location:[dic objectForKey:@"location"] faceUrl:[dic objectForKey:@"faceUrl"] mobile:[dic objectForKey:@"mobile"] verificationCode:self.verificationCodeTF.text pawd:_idAndPwdView.pwdTF.text frmId:@"" success:^(id result) {
  68 + NSLog(@"BindMobile 登录------%@",result);
  69 + [UserInfoSava saveUserinfoDic:result[@"data"]];
  70 + [Tools setUserLogin:YES];
  71 + [self.navigationController popViewControllerAnimated:YES];
  72 +
  73 + } failure:^(NSDictionary *errorDic) {
  74 + NSLog(@"BindMobile 登录------%@",errorDic);
  75 + }];
  76 + }else
  77 + {//普通登录或三方验证登录
  78 + [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeClear];
  79 + [SVProgressHUD show];
69 80
70 - } failure:^(NSDictionary *errorDic) {  
71 - [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]];  
72 - [SVProgressHUD dismiss];  
73 - }]; 81 + [CNLiveUserSystemCenter loginWithUserName:_idAndPwdView.idTF.text password:_idAndPwdView.pwdTF.text frmId:nil success:^(id result) {
  82 +
  83 + NSLog(@"登录 success------------%@",result);
  84 + [SVProgressHUD showSuccessWithStatus:@"登录成功"];
  85 + [UserInfoSava saveUserinfoDic:result[@"data"]];
  86 + [Tools setUserLogin:YES];
  87 + [self.navigationController popViewControllerAnimated:YES];
  88 +
  89 + } failure:^(NSDictionary *errorDic) {
  90 + [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]];
  91 + [SVProgressHUD dismiss];
  92 + }];
  93 + }
74 } 94 }
75 95
76 - (void)messageLoginBtnAction 96 - (void)messageLoginBtnAction
@@ -102,9 +122,40 @@ @@ -102,9 +122,40 @@
102 [[CNLiveThirdLoginManager manager] qqLoginIsBindingThirdParty:NO]; 122 [[CNLiveThirdLoginManager manager] qqLoginIsBindingThirdParty:NO];
103 } 123 }
104 124
105 -- (void)loginSuccess 125 +- (void)checkThirdBtnAction:(UIButton *)button
  126 +{
  127 + button.selected = !button.selected;
  128 + BOOL isCheck = NO;
  129 + if (button.selected) {
  130 + isCheck = YES;
  131 + }else{
  132 + isCheck = NO;
  133 + }
  134 + [CNLiveThirdLoginManager manager].thirdType = ThirdLoginTypeCheckIsRegister;
  135 +}
  136 +
  137 +- (void)bindMobileBtnAction:(UIButton *)button
106 { 138 {
107 - [self.navigationController popViewControllerAnimated:YES]; 139 + button.selected = !button.selected;
  140 + BOOL isCheck = NO;
  141 + if (button.selected) {
  142 + isCheck = YES;
  143 + }else{
  144 + isCheck = NO;
  145 + }
  146 + [CNLiveThirdLoginManager manager].thirdType = ThirdLoginTypeBindMobile;
  147 + [CNLiveThirdLoginManager manager].bindMobile = _idAndPwdView.idTF.text;
  148 +}
  149 +
  150 +- (void)loginSuccess:(NSNotification *)noti
  151 +{
  152 + if (noti.userInfo)
  153 + {//强制绑定手机号
  154 + self.dic = noti.userInfo;
  155 + }else
  156 + {//普通三方登录和验证三方登录
  157 + [self.navigationController popViewControllerAnimated:YES];
  158 + }
108 } 159 }
109 160
110 - (void)loginFailure 161 - (void)loginFailure
@@ -121,6 +172,9 @@ @@ -121,6 +172,9 @@
121 if ([self.idAndPwdView.pwdTF isFirstResponder]) { 172 if ([self.idAndPwdView.pwdTF isFirstResponder]) {
122 [self.idAndPwdView.pwdTF resignFirstResponder]; 173 [self.idAndPwdView.pwdTF resignFirstResponder];
123 } 174 }
  175 + if ([self.verificationCodeTF isFirstResponder]) {
  176 + [self.verificationCodeTF resignFirstResponder];
  177 + }
124 } 178 }
125 #pragma mark - getter 179 #pragma mark - getter
126 180
@@ -244,6 +298,54 @@ @@ -244,6 +298,54 @@
244 return _qqBtn; 298 return _qqBtn;
245 } 299 }
246 300
  301 +- (UIButton *)checkThirdBtn
  302 +{
  303 + if (!_checkThirdBtn) {
  304 + _checkThirdBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  305 + [_checkThirdBtn setFrame:CGRectMake(SpaceWidth, KScreenHeight-100, 150, 40)];
  306 + [_checkThirdBtn setTitle:@"三方登录" forState:UIControlStateNormal];
  307 + [_checkThirdBtn setTitle:@"三方验证并登录" forState:UIControlStateSelected];
  308 + [_checkThirdBtn addTarget:self action:@selector(checkThirdBtnAction:) forControlEvents:UIControlEventTouchUpInside];
  309 + _checkThirdBtn.titleLabel.font = [UIFont systemFontOfSize:18];
  310 + [_checkThirdBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal];
  311 + _checkThirdBtn.layer.cornerRadius = 20;
  312 + _checkThirdBtn.layer.masksToBounds = YES;
  313 + _checkThirdBtn.layer.borderColor = [UIColor blackColor].CGColor;
  314 + _checkThirdBtn.layer.borderWidth = 1;
  315 + }
  316 + return _checkThirdBtn;
  317 +}
  318 +
  319 +- (UIButton *)bindMobileBtn
  320 +{
  321 + if (!_bindMobileBtn) {
  322 + _bindMobileBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  323 + [_bindMobileBtn setFrame:CGRectMake(SpaceWidth, KScreenHeight-50, 180, 40)];
  324 + [_bindMobileBtn setTitle:@"三方登录" forState:UIControlStateNormal];
  325 + [_bindMobileBtn setTitle:@"三方绑定手机号登录" forState:UIControlStateSelected];
  326 + [_bindMobileBtn addTarget:self action:@selector(bindMobileBtnAction:) forControlEvents:UIControlEventTouchUpInside];
  327 + _bindMobileBtn.titleLabel.font = [UIFont systemFontOfSize:18];
  328 + [_bindMobileBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal];
  329 + _bindMobileBtn.layer.cornerRadius = 20;
  330 + _bindMobileBtn.layer.masksToBounds = YES;
  331 + _bindMobileBtn.layer.borderColor = [UIColor blackColor].CGColor;
  332 + _bindMobileBtn.layer.borderWidth = 1;
  333 + }
  334 + return _bindMobileBtn;
  335 +}
  336 +
  337 +- (UITextField *)verificationCodeTF
  338 +{
  339 + if (!_verificationCodeTF) {
  340 + _verificationCodeTF = [[UITextField alloc] initWithFrame:CGRectMake(SpaceWidth + 200, KScreenHeight-50, self.view.bounds.size.width - SpaceWidth - 200, 40)];
  341 + _verificationCodeTF.font = [UIFont systemFontOfSize:17];
  342 + _verificationCodeTF.keyboardType = UIKeyboardTypeNumberPad;
  343 + _verificationCodeTF.placeholder = @"请输入验证码";
  344 + _verificationCodeTF.returnKeyType = UIReturnKeyDone;
  345 + }
  346 + return _verificationCodeTF;
  347 +}
  348 +
247 - (void)didReceiveMemoryWarning { 349 - (void)didReceiveMemoryWarning {
248 [super didReceiveMemoryWarning]; 350 [super didReceiveMemoryWarning];
249 // Dispose of any resources that can be recreated. 351 // Dispose of any resources that can be recreated.
CNLiveUserSystemDemo/CNLiveUserSystemDemo/Conreollers/ModifyPwdViewController.h 0 → 100644
  1 +//
  2 +// ModifyPwdViewController.h
  3 +// CNLiveUserSystemDemo
  4 +//
  5 +// Created by 张旭 on 2017/5/27.
  6 +// Copyright © 2017年 zhulin. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +typedef NS_ENUM(NSInteger, ModifyPwdType) {//枚举类型
  12 + ModifyPwdTypeEmail = 1,//通过邮箱修改密码
  13 + ModifyPwdTypeOldPwd //通过原密码修改密码
  14 +};
  15 +
  16 +
  17 +@interface ModifyPwdViewController : UIViewController
  18 +
  19 +@property (nonatomic ,assign) ModifyPwdType type;
  20 +@end
CNLiveUserSystemDemo/CNLiveUserSystemDemo/Conreollers/ModifyPwdViewController.m 0 → 100644
  1 +//
  2 +// ModifyPwdViewController.m
  3 +// CNLiveUserSystemDemo
  4 +//
  5 +// Created by 张旭 on 2017/5/27.
  6 +// Copyright © 2017年 zhulin. All rights reserved.
  7 +//
  8 +
  9 +#import "ModifyPwdViewController.h"
  10 +
  11 +@interface ModifyPwdViewController ()
  12 +
  13 +@property (nonatomic ,strong) UITextField * _Nullable emailTF;
  14 +@property (nonatomic ,strong) UITextField * _Nullable pwdTF;
  15 +@property (nonatomic, strong) UIButton * _Nullable confirmBtn;
  16 +
  17 +@end
  18 +
  19 +@implementation ModifyPwdViewController
  20 +
  21 +- (void)viewDidLoad {
  22 + [super viewDidLoad];
  23 + // Do any additional setup after loading the view.
  24 +
  25 + self.view.backgroundColor = [UIColor whiteColor];
  26 +
  27 + [self.view addSubview:self.emailTF];
  28 + [self.view addSubview:self.pwdTF];
  29 + [self.view addSubview:self.confirmBtn];
  30 +}
  31 +
  32 +
  33 +- (void)confirmBtnAction
  34 +{
  35 + if (self.type == ModifyPwdTypeEmail) {
  36 + [CNLiveUserSystemCenter modifyPwdWithEmail:self.emailTF.text newPwd:self.pwdTF.text success:^(id result) {
  37 +
  38 + [Tools toast:result[@"errorMessage"]];
  39 +
  40 + } failure:^(NSDictionary *errorDic) {
  41 + [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]];
  42 + }];
  43 +
  44 + }else if (self.type == ModifyPwdTypeOldPwd){
  45 + UserInfoModel *model = [UserInfoModel modelWithKeyValues:[Tools getLocalUserInfo]];
  46 + [CNLiveUserSystemCenter oldPwdChangePasswordWithUid:model.uid pwd:self.emailTF.text newPwd:self.pwdTF.text success:^(id result) {
  47 +
  48 + [Tools toast:result[@"errorMessage"]];
  49 + } failure:^(NSDictionary *errorDic) {
  50 + [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]];
  51 + }];
  52 +
  53 + }
  54 +
  55 +
  56 +}
  57 +
  58 +- (UIButton *)confirmBtn
  59 +{
  60 + if (!_confirmBtn) {
  61 + _confirmBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  62 + [_confirmBtn setFrame:CGRectMake(10, 280, KScreenWidth - 20, 40)];
  63 + [_confirmBtn setTitle:@"确 认" forState:UIControlStateNormal];
  64 + [_confirmBtn addTarget:self action:@selector(confirmBtnAction) forControlEvents:UIControlEventTouchUpInside];
  65 + _confirmBtn.titleLabel.font = [UIFont systemFontOfSize:18];
  66 + [_confirmBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal];
  67 + _confirmBtn.layer.cornerRadius = 20;
  68 + _confirmBtn.layer.masksToBounds = YES;
  69 + _confirmBtn.layer.borderColor = [UIColor blackColor].CGColor;
  70 + _confirmBtn.layer.borderWidth = 1;
  71 + }
  72 + return _confirmBtn;
  73 +}
  74 +
  75 +- (UITextField *)emailTF
  76 +{
  77 + if (!_emailTF) {
  78 + _emailTF = [[UITextField alloc] initWithFrame:CGRectMake(10, 70, KScreenWidth - 20, 57)];
  79 + if (self.type == ModifyPwdTypeEmail) {
  80 + _emailTF.placeholder = @"请输入您的邮箱";
  81 + }else if (self.type == ModifyPwdTypeOldPwd){
  82 + _emailTF.placeholder = @"请输入您的旧密码";
  83 + }
  84 + _emailTF.keyboardType = UIKeyboardTypeNamePhonePad;
  85 + _emailTF.clearButtonMode = UITextFieldViewModeWhileEditing;
  86 + _emailTF.font = [UIFont systemFontOfSize:17];
  87 + }
  88 + return _emailTF;
  89 +}
  90 +
  91 +- (UITextField *)pwdTF
  92 +{
  93 + if (!_pwdTF) {
  94 + _pwdTF = [[UITextField alloc] initWithFrame:CGRectMake(10, 70 + 57, KScreenWidth - 20, 57)];
  95 + _pwdTF.placeholder = @"请输入您的新密码";
  96 + _pwdTF.clearButtonMode = UITextFieldViewModeWhileEditing;
  97 + _pwdTF.keyboardType = UIKeyboardTypeNamePhonePad;
  98 + _pwdTF.font = [UIFont systemFontOfSize:17];
  99 + }
  100 + return _pwdTF;
  101 +}
  102 +
  103 +
  104 +- (void)didReceiveMemoryWarning {
  105 + [super didReceiveMemoryWarning];
  106 + // Dispose of any resources that can be recreated.
  107 +}
  108 +
  109 +/*
  110 +#pragma mark - Navigation
  111 +
  112 +// In a storyboard-based application, you will often want to do a little preparation before navigation
  113 +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  114 + // Get the new view controller using [segue destinationViewController].
  115 + // Pass the selected object to the new view controller.
  116 +}
  117 +*/
  118 +
  119 +@end
CNLiveUserSystemDemo/CNLiveUserSystemDemo/Conreollers/RegisterViewController.m
@@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
15 @property (nonatomic, strong) UIButton *verificationBtn; 15 @property (nonatomic, strong) UIButton *verificationBtn;
16 @property (nonatomic, strong) UIButton *loginBtn; 16 @property (nonatomic, strong) UIButton *loginBtn;
17 @property (nonatomic, strong) dispatch_source_t timer; 17 @property (nonatomic, strong) dispatch_source_t timer;
  18 +@property (nonatomic, strong) UIButton *checkCodeBtn;
18 19
19 @end 20 @end
20 21
@@ -39,7 +40,9 @@ @@ -39,7 +40,9 @@
39 [self.view addSubview:self.registBasicInformationView]; 40 [self.view addSubview:self.registBasicInformationView];
40 [self.view addSubview:self.verificationBtn]; 41 [self.view addSubview:self.verificationBtn];
41 [self.view addSubview:self.loginBtn]; 42 [self.view addSubview:self.loginBtn];
42 - 43 + if ([_type isEqualToString:@"register"] || [_type isEqualToString:@"quicklyLogin"]) {
  44 + [self.view addSubview:self.checkCodeBtn];
  45 + }
43 } 46 }
44 47
45 #pragma mark - action 48 #pragma mark - action
@@ -87,6 +90,15 @@ @@ -87,6 +90,15 @@
87 } 90 }
88 } 91 }
89 92
  93 +- (void)checkCodeBtnAction
  94 +{
  95 + [CNLiveUserSystemCenter shortcutLoginCheckVerificationCodeWithMobile:_registBasicInformationView.phoneTF.text verificationCode:_registBasicInformationView.verificationTF.text success:^(id result) {
  96 + [Tools toast:result[@"errorMessage"]];
  97 + } failure:^(NSDictionary *errorDic) {
  98 + [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]];
  99 + }];
  100 +}
  101 +
90 - (void)stopTimer 102 - (void)stopTimer
91 { 103 {
92 [self.verificationBtn setTitle:@"发送验证码" forState:UIControlStateNormal]; 104 [self.verificationBtn setTitle:@"发送验证码" forState:UIControlStateNormal];
@@ -213,6 +225,24 @@ @@ -213,6 +225,24 @@
213 return _registBasicInformationView; 225 return _registBasicInformationView;
214 } 226 }
215 227
  228 +- (UIButton *)checkCodeBtn
  229 +{
  230 + if (!_checkCodeBtn) {
  231 + _checkCodeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  232 + [_checkCodeBtn setFrame:CGRectMake(KScreenWidth - 105, 80 + 57, 95, 37)];
  233 + [_checkCodeBtn setTitle:@"校验验证码" forState:UIControlStateNormal];
  234 + [_checkCodeBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
  235 + [_checkCodeBtn addTarget:self action:@selector(checkCodeBtnAction) forControlEvents:UIControlEventTouchUpInside];
  236 + _checkCodeBtn.titleLabel.font = [UIFont systemFontOfSize:15];
  237 + [_checkCodeBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal];
  238 + _checkCodeBtn.layer.cornerRadius = 10;
  239 + _checkCodeBtn.layer.masksToBounds = YES;
  240 + _checkCodeBtn.layer.borderColor = [UIColor blackColor].CGColor;
  241 + _checkCodeBtn.layer.borderWidth = 1;
  242 + }
  243 + return _checkCodeBtn;
  244 +}
  245 +
216 - (UIButton *)verificationBtn 246 - (UIButton *)verificationBtn
217 { 247 {
218 if (!_verificationBtn) { 248 if (!_verificationBtn) {
CNLiveUserSystemDemo/CNLiveUserSystemDemo/Conreollers/ViewController.m
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
14 #import "UserInfoSava.h" 14 #import "UserInfoSava.h"
15 #import "ThirdPartyView.h" 15 #import "ThirdPartyView.h"
16 #import "CNLiveThirdLoginManager.h" 16 #import "CNLiveThirdLoginManager.h"
  17 +#import "ModifyPwdViewController.h"
17 18
18 @interface ViewController ()<UITableViewDelegate,UITableViewDataSource,ThirdPartyViewDelegate,UIGestureRecognizerDelegate> 19 @interface ViewController ()<UITableViewDelegate,UITableViewDataSource,ThirdPartyViewDelegate,UIGestureRecognizerDelegate>
19 { 20 {
@@ -47,7 +48,7 @@ @@ -47,7 +48,7 @@
47 [self.view addSubview:self.loginBtn]; 48 [self.view addSubview:self.loginBtn];
48 [self.view addSubview:self.thirPartydView]; 49 [self.view addSubview:self.thirPartydView];
49 50
50 - _dataArr = @[@"通过手机号修改密码",@"更新附加信息",@"修改用户信息",@"查询用户信息",@"查询多条用户信息",@"反馈",@"绑定第三方账号"]; 51 + _dataArr = @[@"通过手机号修改密码",@"更新附加信息",@"修改用户信息",@"查询用户信息",@"查询多条用户信息",@"反馈",@"绑定第三方账号",@"通过邮箱修改密码",@"通过原密码修改密码"];
51 52
52 } 53 }
53 54
@@ -129,7 +130,7 @@ @@ -129,7 +130,7 @@
129 iconImg.layer.masksToBounds = YES; 130 iconImg.layer.masksToBounds = YES;
130 [loginCell.contentView addSubview:iconImg]; 131 [loginCell.contentView addSubview:iconImg];
131 UserInfoModel *model = [UserInfoModel modelWithKeyValues:[Tools getLocalUserInfo]]; 132 UserInfoModel *model = [UserInfoModel modelWithKeyValues:[Tools getLocalUserInfo]];
132 - 133 +
133 [iconImg sd_setImageWithURL:[NSURL URLWithString:model.faceUrl] placeholderImage:[UIImage imageNamed:@"touxiang"]]; 134 [iconImg sd_setImageWithURL:[NSURL URLWithString:model.faceUrl] placeholderImage:[UIImage imageNamed:@"touxiang"]];
134 135
135 UILabel *name = [[UILabel alloc] initWithFrame:CGRectMake(120, 0, KScreenWidth- 160, 120)]; 136 UILabel *name = [[UILabel alloc] initWithFrame:CGRectMake(120, 0, KScreenWidth- 160, 120)];
@@ -151,7 +152,7 @@ @@ -151,7 +152,7 @@
151 } 152 }
152 cell.textLabel.text = [NSString stringWithFormat:@"%@",_dataArr[indexPath.row-1]]; 153 cell.textLabel.text = [NSString stringWithFormat:@"%@",_dataArr[indexPath.row-1]];
153 return cell; 154 return cell;
154 - 155 +
155 } 156 }
156 return nil; 157 return nil;
157 } 158 }
@@ -159,7 +160,7 @@ @@ -159,7 +160,7 @@
159 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 160 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
160 { 161 {
161 [tableView deselectRowAtIndexPath:indexPath animated:YES]; 162 [tableView deselectRowAtIndexPath:indexPath animated:YES];
162 - 163 +
163 if (indexPath.row == 1) { //修改密码 164 if (indexPath.row == 1) { //修改密码
164 RegisterViewController *regVC = [[RegisterViewController alloc] init]; 165 RegisterViewController *regVC = [[RegisterViewController alloc] init];
165 regVC.type = @"forgetPwd"; 166 regVC.type = @"forgetPwd";
@@ -171,14 +172,14 @@ @@ -171,14 +172,14 @@
171 [SVProgressHUD show]; 172 [SVProgressHUD show];
172 173
173 UserInfoModel *model = [UserInfoModel modelWithKeyValues:[Tools getLocalUserInfo]]; 174 UserInfoModel *model = [UserInfoModel modelWithKeyValues:[Tools getLocalUserInfo]];
174 - 175 +
175 [CNLiveUserSystemCenter updateOtherInfoWithUid:model.uid extInfo:@"将要更新的附加信息,NSString类型" success:^(id result) { 176 [CNLiveUserSystemCenter updateOtherInfoWithUid:model.uid extInfo:@"将要更新的附加信息,NSString类型" success:^(id result) {
176 177
177 NSLog(@"--------%@",result); 178 NSLog(@"--------%@",result);
178 179
179 [SVProgressHUD showSuccessWithStatus:@"更新附加信息成功"]; 180 [SVProgressHUD showSuccessWithStatus:@"更新附加信息成功"];
180 [self.navigationController popViewControllerAnimated:YES]; 181 [self.navigationController popViewControllerAnimated:YES];
181 - 182 +
182 } failure:^(NSDictionary *errorDic) { 183 } failure:^(NSDictionary *errorDic) {
183 [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; 184 [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]];
184 [SVProgressHUD dismiss]; 185 [SVProgressHUD dismiss];
@@ -195,15 +196,15 @@ @@ -195,15 +196,15 @@
195 196
196 [CNLiveUserSystemCenter queryUserInfoWithUid:model.uid srcUid:model.uid success:^(id result) { 197 [CNLiveUserSystemCenter queryUserInfoWithUid:model.uid srcUid:model.uid success:^(id result) {
197 NSLog(@"%@",result); 198 NSLog(@"%@",result);
198 - 199 +
199 NSDictionary *dic = result[@"data"]; 200 NSDictionary *dic = result[@"data"];
200 NSString *message = [NSString stringWithFormat:@" uid:%@\n nickName:%@\n gender:%@\n location:%@\n extInfo:%@\n mobile:%@\n email:%@",dic[@"uid"],dic[@"nickName"],dic[@"gender"],dic[@"location"],dic[@"extInfo"],dic[@"mobile"],dic[@"email"]]; 201 NSString *message = [NSString stringWithFormat:@" uid:%@\n nickName:%@\n gender:%@\n location:%@\n extInfo:%@\n mobile:%@\n email:%@",dic[@"uid"],dic[@"nickName"],dic[@"gender"],dic[@"location"],dic[@"extInfo"],dic[@"mobile"],dic[@"email"]];
201 NSString *icon = dic[@"faceUrl"]; 202 NSString *icon = dic[@"faceUrl"];
202 - 203 +
203 [UserInfoSava setLocalUserInfo:icon withKey:@"faceUrl"]; 204 [UserInfoSava setLocalUserInfo:icon withKey:@"faceUrl"];
204 [_tableView reloadRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:0 inSection:0]] withRowAnimation:UITableViewRowAnimationFade]; 205 [_tableView reloadRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:0 inSection:0]] withRowAnimation:UITableViewRowAnimationFade];
205 [Tools toast:message]; 206 [Tools toast:message];
206 - 207 +
207 } failure:^(NSDictionary *errorDic) { 208 } failure:^(NSDictionary *errorDic) {
208 [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; 209 [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]];
209 }]; 210 }];
@@ -212,19 +213,17 @@ @@ -212,19 +213,17 @@
212 if (indexPath.row == 5) { //查询多条用户信息 213 if (indexPath.row == 5) { //查询多条用户信息
213 UserInfoModel *model = [UserInfoModel modelWithKeyValues:[Tools getLocalUserInfo]]; 214 UserInfoModel *model = [UserInfoModel modelWithKeyValues:[Tools getLocalUserInfo]];
214 [CNLiveUserSystemCenter queryMoreUserInfosWithUid:model.uid srcUids:@[@"498122",@"10000098",@"10451544"] success:^(id result) { 215 [CNLiveUserSystemCenter queryMoreUserInfosWithUid:model.uid srcUids:@[@"498122",@"10000098",@"10451544"] success:^(id result) {
215 - NSLog(@"-----%@",result);  
216 - [Tools toast:@"查询多条用户信息成功"];  
217 - 216 + NSLog(@"查询多条用户信息-----%@",result);
218 } failure:^(NSDictionary *errorDic) { 217 } failure:^(NSDictionary *errorDic) {
219 [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; 218 [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]];
220 }]; 219 }];
221 } 220 }
222 221
223 if (indexPath.row == 6) { //反馈 222 if (indexPath.row == 6) { //反馈
224 - 223 +
225 [CNLiveUserSystemCenter feedbackWithContentId:@"11" message:@"fhsjhifkncznshfu" success:^(id result) { 224 [CNLiveUserSystemCenter feedbackWithContentId:@"11" message:@"fhsjhifkncznshfu" success:^(id result) {
226 [Tools toast:[NSString stringWithFormat:@"反馈--%@",result[@"errorMessage"]]]; 225 [Tools toast:[NSString stringWithFormat:@"反馈--%@",result[@"errorMessage"]]];
227 - 226 +
228 } failure:^(NSDictionary *errorDic) { 227 } failure:^(NSDictionary *errorDic) {
229 [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; 228 [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]];
230 }]; 229 }];
@@ -236,6 +235,18 @@ @@ -236,6 +235,18 @@
236 _thirPartydView.frame = CGRectMake(0, KScreenHeight-160, KScreenWidth, 160); 235 _thirPartydView.frame = CGRectMake(0, KScreenHeight-160, KScreenWidth, 160);
237 }]; 236 }];
238 } 237 }
  238 +
  239 + if (indexPath.row == 8) { //邮箱修改密码
  240 + ModifyPwdViewController *modVC = [[ModifyPwdViewController alloc] init];
  241 + modVC.type = ModifyPwdTypeEmail;
  242 + [self.navigationController pushViewController:modVC animated:YES];
  243 + }
  244 +
  245 + if (indexPath.row == 9) { //原密码修改密码
  246 + ModifyPwdViewController *modVC = [[ModifyPwdViewController alloc] init];
  247 + modVC.type = ModifyPwdTypeOldPwd;
  248 + [self.navigationController pushViewController:modVC animated:YES];
  249 + }
239 } 250 }
240 251
241 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 252 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
CNLiveUserSystemDemo/CNLiveUserSystemDemo/Info.plist
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 <key>CFBundlePackageType</key> 15 <key>CFBundlePackageType</key>
16 <string>APPL</string> 16 <string>APPL</string>
17 <key>CFBundleShortVersionString</key> 17 <key>CFBundleShortVersionString</key>
18 - <string>1.0</string> 18 + <string>1.1</string>
19 <key>CFBundleSignature</key> 19 <key>CFBundleSignature</key>
20 <string>????</string> 20 <string>????</string>
21 <key>CFBundleURLTypes</key> 21 <key>CFBundleURLTypes</key>
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
52 </dict> 52 </dict>
53 </array> 53 </array>
54 <key>CFBundleVersion</key> 54 <key>CFBundleVersion</key>
55 - <string>1</string> 55 + <string>2</string>
56 <key>LSApplicationQueriesSchemes</key> 56 <key>LSApplicationQueriesSchemes</key>
57 <array> 57 <array>
58 <string>wechat</string> 58 <string>wechat</string>
CNLiveUserSystemDemo/CNLiveUserSystemDemo/Tools/CNLiveThirdLoginManager.h
@@ -8,6 +8,13 @@ @@ -8,6 +8,13 @@
8 8
9 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
10 10
  11 +typedef NS_ENUM(NSInteger, ThirdLoginType) {//枚举类型
  12 + ThirdLoginTypeCommon = 0,//普通三方登录
  13 + ThirdLoginTypeCheckIsRegister ,//验证三方是否注册,注册过登录
  14 + ThirdLoginTypeBindMobile //强制绑定手机号三方登录
  15 +};
  16 +
  17 +
11 @interface CNLiveThirdLoginManager : NSObject 18 @interface CNLiveThirdLoginManager : NSObject
12 19
13 + (CNLiveThirdLoginManager *)manager; 20 + (CNLiveThirdLoginManager *)manager;
@@ -20,4 +27,7 @@ @@ -20,4 +27,7 @@
20 27
21 - (void)sinaLoginIsBindingThirdParty:(BOOL)Binding; 28 - (void)sinaLoginIsBindingThirdParty:(BOOL)Binding;
22 29
  30 +@property (nonatomic ,assign) ThirdLoginType thirdType;
  31 +@property (nonatomic ,copy) NSString * bindMobile;
  32 +
23 @end 33 @end
CNLiveUserSystemDemo/CNLiveUserSystemDemo/Tools/CNLiveThirdLoginManager.m
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 #import <TencentOpenAPI/QQApiInterfaceObject.h> 11 #import <TencentOpenAPI/QQApiInterfaceObject.h>
12 #import <TencentOpenAPI/QQApiInterface.h> 12 #import <TencentOpenAPI/QQApiInterface.h>
13 13
14 -#define verificationCode @"cnlive" 14 +#define VerificationCode @"cnlive"
15 15
16 @interface CNLiveThirdLoginManager ()<WXApiDelegate,TencentSessionDelegate,TencentLoginDelegate,WBHttpRequestDelegate,WeiboSDKDelegate> 16 @interface CNLiveThirdLoginManager ()<WXApiDelegate,TencentSessionDelegate,TencentLoginDelegate,WBHttpRequestDelegate,WeiboSDKDelegate>
17 { 17 {
@@ -88,7 +88,7 @@ @@ -88,7 +88,7 @@
88 if ([WXApi isWXAppInstalled]) { 88 if ([WXApi isWXAppInstalled]) {
89 SendAuthReq* req = [[SendAuthReq alloc] init]; 89 SendAuthReq* req = [[SendAuthReq alloc] init];
90 req.scope = @"snsapi_userinfo"; 90 req.scope = @"snsapi_userinfo";
91 - req.state = verificationCode; 91 + req.state = VerificationCode;
92 [WXApi sendReq:req]; 92 [WXApi sendReq:req];
93 } 93 }
94 else { 94 else {
@@ -150,17 +150,57 @@ @@ -150,17 +150,57 @@
150 gender = @"n"; 150 gender = @"n";
151 } 151 }
152 152
153 - [CNLiveUserSystemCenter thirdPartyLoginWithThirdPartyPlatType:@"2" thirdPartyId:[tencentOAuth getUserOpenID] nickName:[result objectForKey:@"nickname"] gender:gender location:[result objectForKey:@"city"] faceUrl:[result objectForKey:@"figureurl"] frmId:nil success:^(id result) {  
154 - NSLog(@"qq登录------%@",result);  
155 -  
156 - [Tools setUserLogin:YES];  
157 - [SVProgressHUD showSuccessWithStatus:@"登录成功"];  
158 - [UserInfoSava saveUserinfoDic:result[@"data"]];  
159 - [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginSuccess object:nil userInfo:nil];  
160 -  
161 - } failure:^(NSDictionary *errorDic) {  
162 - [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginFailure object:nil userInfo:nil];  
163 - }]; 153 + switch (self.thirdType) {
  154 + case ThirdLoginTypeCommon:
  155 + {
  156 + [CNLiveUserSystemCenter thirdPartyLoginWithThirdPartyPlatType:@"2" thirdPartyId:[tencentOAuth getUserOpenID] nickName:[result objectForKey:@"nickname"] gender:gender location:[result objectForKey:@"city"] faceUrl:[result objectForKey:@"figureurl"] frmId:nil success:^(id result) {
  157 + NSLog(@"三方qq登录------%@",result);
  158 +
  159 + [Tools setUserLogin:YES];
  160 + [SVProgressHUD showSuccessWithStatus:@"登录成功"];
  161 + [UserInfoSava saveUserinfoDic:result[@"data"]];
  162 + [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginSuccess object:nil userInfo:nil];
  163 +
  164 + } failure:^(NSDictionary *errorDic) {
  165 + [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginFailure object:nil userInfo:nil];
  166 + }];
  167 + }
  168 + break;
  169 + case ThirdLoginTypeCheckIsRegister:
  170 + {
  171 + [CNLiveUserSystemCenter thirdPartyCheckLoginWithThirdPartyPlatType:@"2" thirdPartyId:[tencentOAuth getUserOpenID] frmId:@"" success:^(id result) {
  172 + NSLog(@"验证三方qq登录------%@",result);
  173 + [Tools setUserLogin:YES];
  174 + [SVProgressHUD showSuccessWithStatus:@"登录成功"];
  175 + [UserInfoSava saveUserinfoDic:result[@"data"]];
  176 + [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginSuccess object:nil userInfo:nil];
  177 +
  178 + } failure:^(NSDictionary *errorDic) {
  179 + [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginFailure object:nil userInfo:nil];
  180 + }];
  181 + }
  182 + break;
  183 + case ThirdLoginTypeBindMobile:
  184 + {
  185 + [CNLiveUserSystemCenter verificationCodeType:VerificationCodeTypeShortcutLogin mobile:self.bindMobile success:^(id result) {
  186 + NSLog(@"ver %@",result);
  187 + if ([result[@"errorCode"] isEqualToString:@"0"]) {
  188 +
  189 + NSString *location = [response.jsonResponse objectForKey:@"city"];
  190 + NSString *teId = [tencentOAuth getUserOpenID];
  191 + NSString *faceUrl = [response.jsonResponse objectForKey:@"figureurl_qq_2"];
  192 + NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:teId,@"partyId",gender,@"gender",location,@"location",faceUrl,@"faceUrl",@"2",@"platType",self.bindMobile,@"mobile", nil];
  193 + [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginSuccess object:nil userInfo:dic];
  194 + }
  195 +
  196 + } failure:^(NSDictionary *errorDic) {
  197 + NSLog(@"%@",errorDic);
  198 + }];
  199 + }
  200 + break;
  201 + default:
  202 + break;
  203 + }
164 } 204 }
165 } 205 }
166 206
@@ -197,8 +237,6 @@ @@ -197,8 +237,6 @@
197 237
198 [self getWeChatUserInfo:authResp]; 238 [self getWeChatUserInfo:authResp];
199 239
200 -// }  
201 -  
202 } 240 }
203 else if (temp.errCode == -4) { 241 else if (temp.errCode == -4) {
204 // 用户拒绝授权 242 // 用户拒绝授权
@@ -285,17 +323,58 @@ @@ -285,17 +323,58 @@
285 break; 323 break;
286 } 324 }
287 325
288 - [CNLiveUserSystemCenter thirdPartyLoginWithThirdPartyPlatType:@"3" thirdPartyId:[dic objectForKey:@"openid"] nickName:[dic objectForKey:@"nickname"] gender:gender location:[dic objectForKey:@"country"] faceUrl:[dic objectForKey:@"headimgurl"] frmId:nil success:^(id result) {  
289 - NSLog(@"微信登录------%@",result);  
290 -  
291 - [Tools setUserLogin:YES];  
292 - [SVProgressHUD showSuccessWithStatus:@"登录成功"];  
293 - [UserInfoSava saveUserinfoDic:result[@"data"]];  
294 - [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginSuccess object:nil userInfo:nil];  
295 -  
296 - } failure:^(NSDictionary *errorDic) {  
297 - [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginFailure object:nil userInfo:nil];  
298 - }]; 326 + switch (self.thirdType) {
  327 + case ThirdLoginTypeCommon:
  328 + {
  329 +
  330 + [CNLiveUserSystemCenter thirdPartyLoginWithThirdPartyPlatType:@"3" thirdPartyId:[dic objectForKey:@"openid"] nickName:[dic objectForKey:@"nickname"] gender:gender location:[dic objectForKey:@"country"] faceUrl:[dic objectForKey:@"headimgurl"] frmId:nil success:^(id result) {
  331 + NSLog(@"微信登录------%@",result);
  332 +
  333 + [Tools setUserLogin:YES];
  334 + [SVProgressHUD showSuccessWithStatus:@"登录成功"];
  335 + [UserInfoSava saveUserinfoDic:result[@"data"]];
  336 + [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginSuccess object:nil userInfo:nil];
  337 +
  338 + } failure:^(NSDictionary *errorDic) {
  339 + [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginFailure object:nil userInfo:nil];
  340 + }];
  341 + }
  342 + break;
  343 + case ThirdLoginTypeCheckIsRegister:
  344 + {
  345 + [CNLiveUserSystemCenter thirdPartyCheckLoginWithThirdPartyPlatType:@"3" thirdPartyId:[dic objectForKey:@"openid"] frmId:@"" success:^(id result) {
  346 + NSLog(@"验证三方微信登录------%@",result);
  347 + [Tools setUserLogin:YES];
  348 + [SVProgressHUD showSuccessWithStatus:@"登录成功"];
  349 + [UserInfoSava saveUserinfoDic:result[@"data"]];
  350 + [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginSuccess object:nil userInfo:nil];
  351 +
  352 + } failure:^(NSDictionary *errorDic) {
  353 + [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginFailure object:nil userInfo:nil];
  354 + }];
  355 + }
  356 + break;
  357 + case ThirdLoginTypeBindMobile:
  358 + {
  359 + [CNLiveUserSystemCenter verificationCodeType:VerificationCodeTypeShortcutLogin mobile:self.bindMobile success:^(id result) {
  360 + NSLog(@"ver %@",result);
  361 + if ([result[@"errorCode"] isEqualToString:@"0"]) {
  362 +
  363 + NSString *location = [dic objectForKey:@"country"];
  364 + NSString *teId = [dic objectForKey:@"openid"];
  365 + NSString *faceUrl = [dic objectForKey:@"headimgurl"];
  366 + NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:teId,@"partyId",gender,@"gender",location,@"location",faceUrl,@"faceUrl",@"3",@"platType",self.bindMobile,@"mobile", nil];
  367 + [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginSuccess object:nil userInfo:dic];
  368 + }
  369 +
  370 + } failure:^(NSDictionary *errorDic) {
  371 + NSLog(@"%@",errorDic);
  372 + }];
  373 + }
  374 + break;
  375 + default:
  376 + break;
  377 + }
299 } 378 }
300 } 379 }
301 } 380 }
@@ -354,17 +433,57 @@ @@ -354,17 +433,57 @@
354 gender = @"n"; 433 gender = @"n";
355 } 434 }
356 435
357 - [CNLiveUserSystemCenter thirdPartyLoginWithThirdPartyPlatType:@"1" thirdPartyId:[dic objectForKey:@"id"] nickName:[dic objectForKey:@"name"] gender:gender location:[dic objectForKey:@"location"] faceUrl:[dic objectForKey:@"avatar_hd"] frmId:nil success:^(id result) {  
358 - NSLog(@"微博登录------%@",result);  
359 -  
360 - [Tools setUserLogin:YES];  
361 - [SVProgressHUD showSuccessWithStatus:@"登录成功"];  
362 - [UserInfoSava saveUserinfoDic:result[@"data"]];  
363 - [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginSuccess object:nil userInfo:nil];  
364 -  
365 - } failure:^(NSDictionary *errorDic) {  
366 - [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginFailure object:nil userInfo:nil];  
367 - }]; 436 + switch (self.thirdType) {
  437 + case ThirdLoginTypeCommon:
  438 + {
  439 + [CNLiveUserSystemCenter thirdPartyLoginWithThirdPartyPlatType:@"1" thirdPartyId:[dic objectForKey:@"id"] nickName:[dic objectForKey:@"name"] gender:gender location:[dic objectForKey:@"location"] faceUrl:[dic objectForKey:@"avatar_hd"] frmId:nil success:^(id result) {
  440 + NSLog(@"微博登录------%@",result);
  441 +
  442 + [Tools setUserLogin:YES];
  443 + [SVProgressHUD showSuccessWithStatus:@"登录成功"];
  444 + [UserInfoSava saveUserinfoDic:result[@"data"]];
  445 + [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginSuccess object:nil userInfo:nil];
  446 +
  447 + } failure:^(NSDictionary *errorDic) {
  448 + [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginFailure object:nil userInfo:nil];
  449 + }];
  450 + }
  451 + break;
  452 + case ThirdLoginTypeCheckIsRegister:
  453 + {
  454 + [CNLiveUserSystemCenter thirdPartyCheckLoginWithThirdPartyPlatType:@"1" thirdPartyId:[dic objectForKey:@"id"] frmId:@"" success:^(id result) {
  455 + NSLog(@"验证三方微博登录------%@",result);
  456 + [Tools setUserLogin:YES];
  457 + [SVProgressHUD showSuccessWithStatus:@"登录成功"];
  458 + [UserInfoSava saveUserinfoDic:result[@"data"]];
  459 + [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginSuccess object:nil userInfo:nil];
  460 +
  461 + } failure:^(NSDictionary *errorDic) {
  462 + [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginFailure object:nil userInfo:nil];
  463 + }];
  464 + }
  465 + break;
  466 + case ThirdLoginTypeBindMobile:
  467 + {
  468 + [CNLiveUserSystemCenter verificationCodeType:VerificationCodeTypeShortcutLogin mobile:self.bindMobile success:^(id result) {
  469 + NSLog(@"ver %@",result);
  470 + if ([result[@"errorCode"] isEqualToString:@"0"]) {
  471 +
  472 + NSString *location = [dic objectForKey:@"location"];
  473 + NSString *partyId = [dic objectForKey:@"id"];
  474 + NSString *faceUrl = [dic objectForKey:@"avatar_hd"];
  475 + NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:partyId,@"partyId",gender,@"gender",location,@"location",faceUrl,@"faceUrl",@"1",@"platType",self.bindMobile,@"mobile", nil];
  476 + [[NSNotificationCenter defaultCenter] postNotificationName:ThirdLoginSuccess object:nil userInfo:dic];
  477 + }
  478 +
  479 + } failure:^(NSDictionary *errorDic) {
  480 + NSLog(@"%@",errorDic);
  481 + }];
  482 + }
  483 + break;
  484 + default:
  485 + break;
  486 + }
368 } 487 }
369 } 488 }
370 } 489 }
CNLiveUserSystemDemo/CNLiveUserSystemSDK.framework/CNLiveUserSystemSDK
No preview for this file type
CNLiveUserSystemDemo/CNLiveUserSystemSDK.framework/Headers/CNLiveUserSystemCenter.h
@@ -178,8 +178,86 @@ @@ -178,8 +178,86 @@
178 178
179 179
180 /** 180 /**
  181 + 通过邮箱修改密码
  182 +
  183 + @param email 邮箱
  184 + @param newPwd 新密码
  185 + @param success 成功回调
  186 + @param failure 失败回调
  187 + */
  188 ++ (void)modifyPwdWithEmail:(NSString *)email newPwd:(NSString *)newPwd success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure;
  189 +
  190 +
  191 +/**
  192 + 通过原密码修改密码
  193 +
  194 + @param uid 用户ID
  195 + @param pwd 原密码
  196 + @param newPwd 新密码
  197 + @param success 成功回调
  198 + @param failure 失败回调
  199 + */
  200 ++ (void)oldPwdChangePasswordWithUid:(NSString *)uid pwd:(NSString *)pwd newPwd:(NSString *)newPwd success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure;
  201 +
  202 +
  203 +/**
  204 + 注册前校验手机验证码
  205 +
  206 + @param mobile 手机号
  207 + @param verificationCode 验证码
  208 + @param success 成功回调
  209 + @param getVersion 失败回调
  210 + */
  211 ++ (void)registerCheckVerificationCodeWithMobile:(NSString *)mobile verificationCode:(NSString *)verificationCode success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure;
  212 +
  213 +
  214 +/**
  215 + 快捷登录前校验手机验证码
  216 +
  217 + @param mobile 手机号
  218 + @param verificationCode 验证码
  219 + @param success 成功回调
  220 + @param failure 失败回调
  221 + */
  222 ++ (void)shortcutLoginCheckVerificationCodeWithMobile:(NSString *)mobile verificationCode:(NSString *)verificationCode success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure;
  223 +
  224 +
  225 +/**
  226 + 验证第三方账号是否注册,若注册则直接登录返回用户信息,若未注册返回errorCode
  227 +
  228 + @param plat 第三方平台编号(如plat: 1:sina weibo 2:qq 3:weixin 4:renren 注:如qq登录,plat=@"2")
  229 + @param thirdPartyId 第三方用户ID
  230 + @param frmId 渠道ID(非必填)
  231 + @param success 成功回调
  232 + @param failure 失败回调
  233 + */
  234 ++ (void)thirdPartyCheckLoginWithThirdPartyPlatType:(NSString *)plat thirdPartyId:(NSString *)thirdPartyId frmId:(NSString *)frmId success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure;
  235 +
  236 +
  237 +/**
  238 + 第三方注册强制绑定手机号登录: 手机号+密码+验证码+三方账号
  239 +
  240 + @param plat 第三方平台编号(如plat: 1:sina weibo 2:qq 3:weixin 4:renren 注:如qq登录,plat=@"2")
  241 + @param thirdPartyId 第三方用户ID
  242 + @param nickName 用户昵称
  243 + @param gender 性别,m:男、f:女、n:未知(非必填)
  244 + @param location 用户所在地(非必填)
  245 + @param faceUrl 头像,约100*100(非必填)
  246 + @param mobile 手机号
  247 + @param verificationCode 验证码 (验证码类型为快捷登录VerificationCodeTypeShortcutLogin)
  248 + @param pawd 注册密码
  249 + @param frmId 渠道ID(非必填)
  250 + @param success 成功回调
  251 + @param failure 失败回调
  252 + */
  253 ++ (void)thirdPartyBindMobileLoginWithThirdPartyPlatType:(NSString *)plat thirdPartyId:(NSString *)thirdPartyId nickName:(NSString *)nickName gender:(NSString *)gender location:(NSString *)location faceUrl:(NSString *)faceUrl mobile:(NSString *)mobile verificationCode:(NSString *)verificationCode pawd:(NSString *)pawd frmId:(NSString *)frmId success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure;
  254 +
  255 +
  256 +/**
181 * 获取SDK版本号 257 * 获取SDK版本号
182 */ 258 */
183 + (NSString *)getVersion; 259 + (NSString *)getVersion;
184 260
  261 +
  262 +
185 @end 263 @end
CNLiveUserSystemDemo/CNLiveUserSystemSDK.framework/Headers/CNLiveUserSystemTypeDef.h
@@ -24,4 +24,10 @@ typedef NS_ENUM(NSUInteger, UserInfoType) { @@ -24,4 +24,10 @@ typedef NS_ENUM(NSUInteger, UserInfoType) {
24 UserInfoTypeLocation, //联系方式(地址) 24 UserInfoTypeLocation, //联系方式(地址)
25 }; 25 };
26 26
  27 +//校验验证码
  28 +typedef NS_ENUM(NSInteger, CheckVerificationCodeType) {
  29 + CheckVerificationCodeTypeRegister = 0,//注册前校验验证码
  30 + CheckVerificationCodeTypeShortcutLogin //快捷登录前校验验证码
  31 +};
  32 +
27 #endif /* CNLiveUserSystemTypeDef_h */ 33 #endif /* CNLiveUserSystemTypeDef_h */
CNLiveUserSystemDemo/CNLiveUserSystemSDK.framework/Info.plist
No preview for this file type
iOS用户SDK.pdf
No preview for this file type