Commit f6e229728a6bc80f627e23e5f3d12d50ba42d50b

Authored by 朱林
1 parent 4bd7aa4e

网络请求改为https

CNLiveUserSystemDemo.xcodeproj/project.xcworkspace/xcuserdata/iOS.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
CNLiveUserSystemDemo.xcodeproj/xcuserdata/iOS.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
... ... @@ -2,16 +2,4 @@
2 2 <Bucket
3 3 type = "1"
4 4 version = "2.0">
5   - <Breakpoints>
6   - <BreakpointProxy
7   - BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
8   - <BreakpointContent
9   - shouldBeEnabled = "Yes"
10   - ignoreCount = "0"
11   - continueAfterRunningActions = "No"
12   - scope = "0"
13   - stopOnStyle = "0">
14   - </BreakpointContent>
15   - </BreakpointProxy>
16   - </Breakpoints>
17 5 </Bucket>
... ...
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveFeedback.m
... ... @@ -12,7 +12,7 @@
12 12 #import "NSDictionary+Safety.h"
13 13  
14 14 //反馈
15   -static NSString *feedbackURL = @"http://api.cnlive.com/open/api2/user/userReport";
  15 +static NSString *feedbackURL = @"https://api.cnlive.com/open/api2/user/userReport";
16 16  
17 17 @implementation CNLiveFeedback
18 18  
... ...
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveLogin.m
... ... @@ -12,13 +12,13 @@
12 12 #import "NSDictionary+Safety.h"
13 13  
14 14 //快捷登录
15   -static NSString *shortcutLoginURL = @"http://api.cnlive.com/open/api2/user/loginInQuickly";
  15 +static NSString *shortcutLoginURL = @"https://api.cnlive.com/open/api2/user/loginInQuickly";
16 16  
17 17 //登录
18   -static NSString *loginURL = @"http://api.cnlive.com/open/api2/user/loginIn";
  18 +static NSString *loginURL = @"https://api.cnlive.com/open/api2/user/loginIn";
19 19  
20 20 //第三方登录
21   -static NSString *thirdLoginURL = @"http://api.cnlive.com/open/api2/user/loginIn3rd";
  21 +static NSString *thirdLoginURL = @"https://api.cnlive.com/open/api2/user/loginIn3rd";
22 22  
23 23 @implementation CNLiveLogin
24 24  
... ...
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveRegister.m
... ... @@ -12,7 +12,7 @@
12 12 #import "NSDictionary+Safety.h"
13 13  
14 14 //注册
15   -static NSString *registerURL = @"http://api.cnlive.com/open/api2/user/register";
  15 +static NSString *registerURL = @"https://api.cnlive.com/open/api2/user/register";
16 16  
17 17 @implementation CNLiveRegister
18 18  
... ... @@ -50,6 +50,13 @@ static NSString *registerURL = @&quot;http://api.cnlive.com/open/api2/user/register&quot;
50 50 [[CNLiveNetworkManager manager] requestPostURL:registerURL parameters:param success:^(NSURLResponse * _Nullable response, id _Nullable responseObject) {
51 51  
52 52 responseObject = [responseObject validatedDictionary];
  53 + if ([[responseObject allKeys] containsObject:@"errorCode"] && [responseObject[@"errorCode"] isEqualToString:@"0"]) {
  54 +
  55 + NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
  56 + [userDefaults setObject:responseObject[@"data"][@"token"] forKey:@"CNLiveAuthToken"];
  57 + [userDefaults synchronize];
  58 +
  59 + }
53 60 success(responseObject);
54 61  
55 62 } failure:^(NSURLResponse * _Nullable response, NSError * _Nullable error) {
... ...
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUploadIcon.m
... ... @@ -12,10 +12,10 @@
12 12 #import "NSDictionary+Safety.h"
13 13  
14 14 //获取access_token
15   -static NSString *accessTokenURL = @"http://api.cnlive.com/open/api2/token";
  15 +static NSString *accessTokenURL = @"https://api.cnlive.com/open/api2/token";
16 16  
17 17 //上传头像
18   -static NSString *uploadIconURL = @"http://api.cnlive.com/open/api2/user/updateUserFaceById";
  18 +static NSString *uploadIconURL = @"https://api.cnlive.com/open/api2/user/updateUserFaceById";
19 19  
20 20 @implementation CNLiveUploadIcon
21 21  
... ...
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUserInfo.m
... ... @@ -12,19 +12,19 @@
12 12 #import "NSDictionary+Safety.h"
13 13  
14 14 //更新手机号
15   -static NSString *updateMobileURL = @"http://api.cnlive.com/open/api2/user/updateMobileById";
  15 +static NSString *updateMobileURL = @"https://api.cnlive.com/open/api2/user/updateMobileById";
16 16  
17 17 //查询用户信息
18   -static NSString *queryUserInfoURL = @"http://api.cnlive.com/open/api2/user/readUserById";
  18 +static NSString *queryUserInfoURL = @"https://api.cnlive.com/open/api2/user/readUserById";
19 19  
20 20 //修改用户单项信息
21   -static NSString *updateUserByIdURL = @"http://api.cnlive.com/open/api2/user/updateUserById";
  21 +static NSString *updateUserByIdURL = @"https://api.cnlive.com/open/api2/user/updateUserById";
22 22  
23 23 //更新用户附加信息
24   -static NSString *updateOtherInfoURL = @"http://api.cnlive.com/open/api2/user/updateUserExtInfo";
  24 +static NSString *updateOtherInfoURL = @"https://api.cnlive.com/open/api2/user/updateUserExtInfo";
25 25  
26 26 //修改密码
27   -static NSString *updatePwdURL = @"http://api.cnlive.com/open/api2/user/updatePwdByMobile";
  27 +static NSString *updatePwdURL = @"https://api.cnlive.com/open/api2/user/updatePwdByMobile";
28 28  
29 29 @implementation CNLiveUserInfo
30 30  
... ... @@ -164,6 +164,7 @@ static NSString *updatePwdURL = @&quot;http://api.cnlive.com/open/api2/user/updatePw
164 164  
165 165 - (void)requestWithURL:(NSString *)URL parameter:(NSDictionary *)param success:(void(^)(id result))success failure :(void (^)(NSError * error))failure
166 166 {
  167 +
167 168 [[CNLiveNetworkManager manager] requestPostURL:URL parameters:param success:^(NSURLResponse * _Nullable response, id _Nullable responseObject) {
168 169  
169 170 responseObject = [responseObject validatedDictionary];
... ...
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUserSystemCenter.h
... ... @@ -35,7 +35,7 @@
35 35  
36 36 /**
37 37 @abstract 第三方登录
38   - @param plat 第三方平台编号(如platform: 1:sina weibo 2:qq weibo 3:weixin 4:renren 注:如qq登录,plat=@"2")
  38 + @param plat 第三方平台编号(如plat: 1:sina weibo 2:qq weibo 3:weixin 4:renren 注:如qq登录,plat=@"2")
39 39 @param thirdPartyId 第三方用户ID
40 40 @param nickName 用户昵称
41 41 @param gender 性别,m:男、f:女、n:未知(非必填)
... ... @@ -89,7 +89,7 @@
89 89 @abstract 修改用户单项信息
90 90 @param type 修改类型(nickName-昵称,gender-性别,email-邮箱, location-联系方式)
91 91 @param uid 用户ID
92   - @param info 对应的信息(注gender对应f/m
  92 + @param info 对应的信息(注gender对应f/m/n
93 93 @param success 成功回调
94 94 @param failure 失败回调
95 95 */
... ...
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveVerificationCode.m
... ... @@ -12,13 +12,13 @@
12 12 #import "NSDictionary+Safety.h"
13 13  
14 14 //快捷登录前发手机验证码
15   -static NSString *shortcutLoginURL = @"http://api.cnlive.com/open/api2/user/sendVerifyCode";
  15 +static NSString *shortcutLoginURL = @"https://api.cnlive.com/open/api2/user/sendVerifyCode";
16 16  
17 17 //注册或修改手机号前发手机验证码
18   -static NSString *registerOrModifyURL = @"http://api.cnlive.com/open/api2/user/sendVerifyCodeForUnRegistered";
  18 +static NSString *registerOrModifyURL = @"https://api.cnlive.com/open/api2/user/sendVerifyCodeForUnRegistered";
19 19  
20 20 //找回或修改密码前发手机验证码
21   -static NSString *passwordURL = @"http://api.cnlive.com/open/api2/user/sendVerifyCodeForRegistered";
  21 +static NSString *passwordURL = @"https://api.cnlive.com/open/api2/user/sendVerifyCodeForRegistered";
22 22  
23 23 @implementation CNLiveVerificationCode
24 24  
... ...
CNLiveUserSystemDemo/Conreollers/LoginViewController.m
... ... @@ -65,11 +65,13 @@
65 65  
66 66 } else {
67 67 [Tools toast:result[@"errorMessage"]];
  68 + [SVProgressHUD dismiss];
68 69 }
69 70  
70 71 } failure:^(NSError *error) {
71 72  
72 73 [Tools toast:error.localizedDescription];
  74 + [SVProgressHUD dismiss];
73 75  
74 76 }];
75 77 }
... ...
CNLiveUserSystemDemo/Conreollers/ModifyUserInfoViewController.m
... ... @@ -52,10 +52,12 @@
52 52  
53 53 } else {
54 54 [Tools toast:result[@"errorMessage"]];
  55 + [SVProgressHUD dismiss];
55 56 }
56 57  
57 58 } failure:^(NSError *error) {
58 59 [Tools toast:error.localizedDescription];
  60 + [SVProgressHUD dismiss];
59 61 }];
60 62 } else {
61 63 [CNLiveUserSystemCenter modifyUserInfoType:_modifyType uid:model.uid modifyInfo:_textField1.text success:^(id result) {
... ... @@ -67,10 +69,13 @@
67 69  
68 70 } else {
69 71 [Tools toast:result[@"errorMessage"]];
  72 + [SVProgressHUD dismiss];
70 73 }
71 74  
72 75 } failure:^(NSError *error) {
73 76 [Tools toast:error.localizedDescription];
  77 + [SVProgressHUD dismiss];
  78 +
74 79 }];
75 80 }
76 81  
... ...
CNLiveUserSystemDemo/Conreollers/RegisterViewController.m
... ... @@ -95,11 +95,14 @@
95 95  
96 96 } else {
97 97 [Tools toast:result[@"errorMessage"]];
  98 + [SVProgressHUD dismiss];
  99 +
98 100 }
99 101  
100 102 } failure:^(NSError *error) {
101 103  
102 104 [Tools toast:error.localizedDescription];
  105 + [SVProgressHUD dismiss];
103 106  
104 107 }];
105 108  
... ... @@ -115,11 +118,13 @@
115 118  
116 119 } else {
117 120 [Tools toast:result[@"errorMessage"]];
  121 + [SVProgressHUD dismiss];
118 122 }
119 123  
120 124 } failure:^(NSError *error) {
121 125  
122 126 [Tools toast:error.localizedDescription];
  127 + [SVProgressHUD dismiss];
123 128  
124 129 }];
125 130  
... ... @@ -131,9 +136,11 @@
131 136  
132 137 } else {
133 138 [Tools toast:result[@"errorMessage"]];
  139 + [SVProgressHUD dismiss];
134 140 }
135 141 } failure:^(NSError *error) {
136 142 [Tools toast:error.localizedDescription];
  143 + [SVProgressHUD dismiss];
137 144  
138 145 }];
139 146 }
... ...
CNLiveUserSystemDemo/Conreollers/UserInfoViewController.m
... ... @@ -196,11 +196,12 @@
196 196  
197 197 } else {
198 198 [Tools toast:result[@"errorMessage"]];
  199 + [SVProgressHUD dismiss];
199 200 }
200 201  
201 202 } failure:^(NSError *error) {
202 203 [Tools toast:error.localizedDescription];
203   -
  204 + [SVProgressHUD dismiss];
204 205 }];
205 206 }
206 207  
... ...
CNLiveUserSystemDemo/Conreollers/ViewController.m
... ... @@ -135,10 +135,12 @@
135 135  
136 136 } else {
137 137 [Tools toast:result[@"errorMessage"]];
  138 + [SVProgressHUD dismiss];
138 139 }
139 140  
140 141 } failure:^(NSError *error) {
141 142 [Tools toast:error.localizedDescription];
  143 + [SVProgressHUD dismiss];
142 144 }];
143 145 }
144 146  
... ...
CNLiveUserSystemDemo/Views/RegistBasicInformationView.m
... ... @@ -55,7 +55,7 @@ static BOOL isPhone;
55 55 - (UITextField *)verificationTF
56 56 {
57 57 if (!_verificationTF) {
58   - _verificationTF = [[UITextField alloc] initWithFrame:CGRectMake(10, 57, 170, 57)];
  58 + _verificationTF = [[UITextField alloc] initWithFrame:CGRectMake(10, 57, KScreenWidth - 20, 57)];
59 59 _verificationTF.placeholder = @"请输入您收到的验证码";
60 60 _verificationTF.keyboardType = UIKeyboardTypeNumberPad;
61 61 _verificationTF.font = [UIFont systemFontOfSize:17];
... ...