Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 52ea818

Browse files
发送验证码 - 错误提示
1 parent 2172068 commit 52ea818

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

‎Coding_iOS/Controllers/Login/CannotLoginViewController.m‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ - (void)phoneCodeBtnClicked:(PhoneCodeButton *)sender withCaptcha:(NSString *)ca
273273
[sender invalidateTimer];
274274
if (error && error.userInfo[@"msg"] && [[error.userInfo[@"msg"] allKeys] containsObject:@"j_captcha_error"]) {
275275
[weakSelf p_showCaptchaAlert:sender];
276+
}else if (captcha.length <= 0){
277+
[NSObject showError:error];
276278
}
277279
}
278280
}];

‎Coding_iOS/Controllers/Login/RegisterViewController.m‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,8 @@ - (void)phoneCodeBtnClicked:(PhoneCodeButton *)sender withCaptcha:(NSString *)ca
407407
[sender invalidateTimer];
408408
if (error && error.userInfo[@"msg"] && [[error.userInfo[@"msg"] allKeys] containsObject:@"j_captcha_error"]) {
409409
[weakSelf p_showCaptchaAlert:sender];
410+
}else if (captcha.length <= 0){
411+
[NSObject showError:error];
410412
}
411413
}
412414
}];

‎Coding_iOS/Util/Manager/Coding_NetAPIManager.m‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2668,6 +2668,8 @@ - (void)request_GeneratePhoneCodeToResetPhone:(NSString *)phone phoneCountryCode
26682668
[[CodingNetAPIClient sharedJsonClient] requestJsonDataWithPath:path withParams:params withMethodType:Post autoShowError:captcha.length > 0 andBlock:^(id data, NSError *error) {
26692669
if (data) {
26702670
[MobClick event:kUmeng_Event_Request_ActionOfServer label:@"生成手机验证码_绑定手机号"];
2671+
}else if (captcha.length <= 0 && error && error.userInfo[@"msg"] && ![[error.userInfo[@"msg"] allKeys] containsObject:@"j_captcha_error"]) {
2672+
[NSObject showError:error];
26712673
}
26722674
block(data, error);
26732675
}];
@@ -3228,6 +3230,9 @@ - (void)post_Close2FAGeneratePhoneCode:(NSString *)phone withCaptcha:(NSString *
32283230
params[@"j_captcha"] = captcha;
32293231
}
32303232
[[CodingNetAPIClient sharedJsonClient] requestJsonDataWithPath:@"api/twofa/close/code" withParams:params withMethodType:Post autoShowError:captcha.length > 0 andBlock:^(id data, NSError *error) {
3233+
if (captcha.length <= 0 && error && error.userInfo[@"msg"] && ![[error.userInfo[@"msg"] allKeys] containsObject:@"j_captcha_error"]) {
3234+
[NSObject showError:error];
3235+
}
32313236
block(data, error);
32323237
}];
32333238
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /