@@ -18,7 +18,6 @@ @interface CannotLoginViewController ()<UITableViewDataSource, UITableViewDelega |
18 | 18 | @property (strong, nonatomic) TPKeyboardAvoidingTableView *myTableView; |
19 | 19 | @property (strong, nonatomic) UIButton *footerBtn; |
20 | 20 | @property (strong, nonatomic) NSString *phoneCodeCellIdentifier; |
21 | | -@property (assign, nonatomic) BOOL isFirstLoadCell; |
22 | 21 | @end |
23 | 22 |
|
24 | 23 | @implementation CannotLoginViewController |
@@ -36,7 +35,6 @@ - (void)viewDidLoad |
36 | 35 |
|
37 | 36 | self.title = @"找回密码"; |
38 | 37 | self.phoneCodeCellIdentifier = [Input_OnlyText_Cell randomCellIdentifierOfPhoneCodeType]; |
39 | | - self.isFirstLoadCell = YES; |
40 | 38 |
|
41 | 39 | // 添加myTableView |
42 | 40 | _myTableView = ({ |
@@ -198,10 +196,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N |
198 | 196 | cell.phoneCodeBtnClckedBlock = ^(PhoneCodeButton *btn){ |
199 | 197 | [weakSelf phoneCodeBtnClicked:btn]; |
200 | 198 | }; |
201 | | - if (_isFirstLoadCell) { |
202 | | - [cell.verify_codeBtn startUpTimer]; |
203 | | - _isFirstLoadCell = NO; |
204 | | - } |
205 | 199 | } |
206 | 200 | }else{ |
207 | 201 | [cell setPlaceholder:@" 验证码" value:self.j_captcha]; |
@@ -237,20 +231,8 @@ - (void)phoneCodeBtnClicked:(PhoneCodeButton *)sender{ |
237 | 231 |
|
238 | 232 | - (void)footerBtnClicked:(id)sender{ |
239 | 233 | 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]; |
254 | 236 | }else{ |
255 | 237 | if (_medthodType == CannotLoginMethodPhone) { |
256 | 238 | if (![_password isEqualToString:_confirm_password]) { |
|