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 5260207

Browse files
手机号码找回密码,填完资料点击"发送验证码",再发送
1 parent 314a9a5 commit 5260207

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

‎Coding_iOS/Controllers/Login/CannotLoginViewController.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@ typedef NS_ENUM(NSInteger, CannotLoginMethodType) {
1717
@interface CannotLoginViewController : BaseViewController
1818
+ (instancetype)vcWithMethodType:(CannotLoginMethodType)methodType stepIndex:(NSUInteger)stepIndex userStr:(NSString *)userStr;
1919

20-
//+ (instancetype)vcWithPurposeType:(PurposeType)purposeType methodType:(CannotLoginMethodType)methodType stepIndex:(NSUInteger)stepIndex userStr:(NSString *)userStr;
21-
2220
@end

‎Coding_iOS/Controllers/Login/CannotLoginViewController.m

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ @interface CannotLoginViewController ()<UITableViewDataSource, UITableViewDelega
1818
@property (strong, nonatomic) TPKeyboardAvoidingTableView *myTableView;
1919
@property (strong, nonatomic) UIButton *footerBtn;
2020
@property (strong, nonatomic) NSString *phoneCodeCellIdentifier;
21-
@property (assign, nonatomic) BOOL isFirstLoadCell;
2221
@end
2322

2423
@implementation CannotLoginViewController
@@ -36,7 +35,6 @@ - (void)viewDidLoad
3635

3736
self.title = @"找回密码";
3837
self.phoneCodeCellIdentifier = [Input_OnlyText_Cell randomCellIdentifierOfPhoneCodeType];
39-
self.isFirstLoadCell = YES;
4038

4139
// 添加myTableView
4240
_myTableView = ({
@@ -198,10 +196,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
198196
cell.phoneCodeBtnClckedBlock = ^(PhoneCodeButton *btn){
199197
[weakSelf phoneCodeBtnClicked:btn];
200198
};
201-
if (_isFirstLoadCell) {
202-
[cell.verify_codeBtn startUpTimer];
203-
_isFirstLoadCell = NO;
204-
}
205199
}
206200
}else{
207201
[cell setPlaceholder:@" 验证码" value:self.j_captcha];
@@ -237,20 +231,8 @@ - (void)phoneCodeBtnClicked:(PhoneCodeButton *)sender{
237231

238232
- (void)footerBtnClicked:(id)sender{
239233
if (_stepIndex == 0) {
240-
if ([_userStr isPhoneNo]) {
241-
[self.footerBtn startQueryAnimate];
242-
[[CodingNetAPIClient sharedJsonClient] requestJsonDataWithPath:@"api/account/password/forget" withParams:@{@"account": _userStr} withMethodType:Post andBlock:^(id data, NSError *error) {
243-
[self.footerBtn stopQueryAnimate];
244-
if (data) {
245-
[NSObject showHudTipStr:@"验证码已发送"];
246-
CannotLoginViewController *vc = [CannotLoginViewController vcWithMethodType:CannotLoginMethodPhone stepIndex:1 userStr:_userStr];
247-
[self.navigationController pushViewController:vc animated:YES];
248-
}
249-
}];
250-
}else{
251-
CannotLoginViewController *vc = [CannotLoginViewController vcWithMethodType:CannotLoginMethodEamil stepIndex:1 userStr:_userStr];
252-
[self.navigationController pushViewController:vc animated:YES];
253-
}
234+
CannotLoginViewController *vc = [CannotLoginViewController vcWithMethodType:[_userStr isPhoneNo]? CannotLoginMethodPhone: CannotLoginMethodEamil stepIndex:1 userStr:_userStr];
235+
[self.navigationController pushViewController:vc animated:YES];
254236
}else{
255237
if (_medthodType == CannotLoginMethodPhone) {
256238
if (![_password isEqualToString:_confirm_password]) {

0 commit comments

Comments
(0)

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