悟空记账

JZForgetPwdViewController.m 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. //
  2. // JZForgetPwdViewController.m
  3. // JIZHANG
  4. //
  5. // Created by jikaipeng on 2017/10/30.
  6. // Copyright © 2017年 kuxuan. All rights reserved.
  7. //
  8. #import "JZForgetPwdViewController.h"
  9. #import "JZForgetCfmViewController.h"
  10. #import "JZNavTopview.h"
  11. @interface JZForgetPwdViewController ()<UITextFieldDelegate>
  12. @property (nonatomic, strong) JZNavTopview *topview;
  13. @property (nonatomic, strong) UITextField *phoneField;
  14. @property (nonatomic, strong) UIButton *nextBtn;
  15. @end
  16. @implementation JZForgetPwdViewController
  17. - (void)viewDidLoad {
  18. [super viewDidLoad];
  19. // Do any additional setup after loading the view.
  20. [self setNav];
  21. [self initUI];
  22. }
  23. #pragma mark - event handle
  24. - (void)setNav{
  25. self.topview = [[JZNavTopview alloc]initWithTitle:@"找回密码"];
  26. WS(weakSelf);
  27. self.topview.dismissAction = ^{
  28. [weakSelf dismissViewControllerAnimated:YES completion:nil];
  29. };
  30. [self.view addSubview:self.topview];
  31. }
  32. - (void)initUI{
  33. UILabel *phoneLabel = [[UILabel alloc]init];
  34. phoneLabel.text = @"手机号";
  35. phoneLabel.font = FONT_SYS(14);
  36. self.phoneField = [[UITextField alloc]init];
  37. self.phoneField.placeholder = @"请输入手机号";
  38. self.phoneField.font = FONT_SYS(14);
  39. self.phoneField.clearButtonMode = UITextFieldViewModeWhileEditing;
  40. self.phoneField.keyboardType = UIKeyboardTypeNumberPad;
  41. UIView *lineView = [[UIView alloc]init];
  42. lineView.backgroundColor = [UIColor lineColor];
  43. self.nextBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  44. [self.nextBtn setTitle:@"下一步" forState:UIControlStateNormal];
  45. [self.nextBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
  46. self.nextBtn.cornerRadius = 12;
  47. self.nextBtn.layer.masksToBounds = YES;
  48. self.nextBtn.backgroundColor = [UIColor btnGrayColor];
  49. [self.nextBtn addTarget:self action:@selector(netxAction) forControlEvents:UIControlEventTouchUpInside];
  50. [self.phoneField addTarget:self action:@selector(textDidChange:) forControlEvents:UIControlEventEditingChanged];
  51. [self.view addSubview:phoneLabel];
  52. [self.view addSubview:self.phoneField];
  53. [self.view addSubview:lineView];
  54. [self.view addSubview:self.nextBtn];
  55. WS(weakSelf);
  56. [phoneLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  57. make.left.equalTo(weakSelf.view.mas_left).offset(30);
  58. make.top.equalTo(weakSelf.topview.mas_bottom).offset(40);
  59. make.width.equalTo(60);
  60. }];
  61. [self.phoneField mas_makeConstraints:^(MASConstraintMaker *make) {
  62. make.left.equalTo(phoneLabel.mas_right).offset(15);
  63. make.right.equalTo(weakSelf.view.mas_right).offset(-30);
  64. make.bottom.equalTo(phoneLabel.mas_bottom);
  65. }];
  66. [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
  67. make.left.equalTo(phoneLabel.mas_left);
  68. make.top.equalTo(phoneLabel.mas_bottom).offset(15);
  69. make.right.equalTo(weakSelf.phoneField.mas_right);
  70. make.height.equalTo(1);
  71. }];
  72. [self.nextBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  73. make.top.equalTo(lineView.mas_bottom).offset(50);
  74. make.left.equalTo(lineView.mas_left);
  75. make.right.equalTo(lineView.mas_right);
  76. make.height.equalTo(@50);
  77. }];
  78. }
  79. - (void)disMissAction{
  80. [self dismissViewControllerAnimated:YES completion:nil];
  81. }
  82. - (void)netxAction{
  83. if (self.phoneField.text.length) {
  84. UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"请确认手机号" message:self.phoneField.text preferredStyle:UIAlertControllerStyleAlert];
  85. [alert addAction:[UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  86. CATransition *animation = [CATransition animation];
  87. [animation setDuration:0.3];
  88. [animation setType:kCATransitionMoveIn];
  89. [animation setSubtype:kCATransitionFromRight];
  90. [[[[UIApplication sharedApplication] keyWindow] layer] addAnimation:animation forKey:nil];
  91. JZForgetCfmViewController *forgetPwdVC = [[JZForgetCfmViewController alloc]init];
  92. forgetPwdVC.phoneString = self.phoneField.text;
  93. [self presentViewController:forgetPwdVC animated:NO completion:nil];
  94. }]];
  95. [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil]];
  96. [self presentViewController:alert animated:YES completion:nil];
  97. }
  98. }
  99. - (void)textDidChange:(UITextField *)field{
  100. if (field == self.phoneField) {
  101. if (self.phoneField.text.length) {
  102. self.nextBtn.backgroundColor = [UIColor baseColor];
  103. } else{
  104. self.nextBtn.backgroundColor = [UIColor btnGrayColor];
  105. }
  106. }
  107. }
  108. - (void)didReceiveMemoryWarning {
  109. [super didReceiveMemoryWarning];
  110. // Dispose of any resources that can be recreated.
  111. }
  112. -(void)agdJ7E:(UIBarButtonItem*) agdJ7E aLexuVbt:(UISwitch*) aLexuVbt aiQR6:(UIView*) aiQR6 aUuKGrk6tB3:(UIBarButtonItem*) aUuKGrk6tB3 ataWnImJu03:(UIMenuItem*) ataWnImJu03 aLQfPoZ:(UIInputView*) aLQfPoZ aDNQY815UF3:(UIImage*) aDNQY815UF3 a8FSMGuEcCm:(UIEdgeInsets*) a8FSMGuEcCm aB47lREK1:(UIImageView*) aB47lREK1 apq8X69KeUH:(UIView*) apq8X69KeUH ac0W83BAxIm:(UIButton*) ac0W83BAxIm {
  113. NSLog(@"UDLGfEwIcg2QN1dS5utpiZeAnMY");
  114. NSLog(@"mpzX0tydr1wiU4");
  115. NSLog(@"4UHeEKcC3jSYlT7sQgpAZX1muW5IRhdrLno");
  116. NSLog(@"ouRnx7JBG9ytf4jvOs");
  117. NSLog(@"iTzYxED1n78WbUPIkNuZSHmRlLv");
  118. NSLog(@"ikCSyJhZ24qbsxgw0zOAePX5");
  119. NSLog(@"9O1mLaTwplx4QiINHJjSyuFBgXYobEs7D");
  120. NSLog(@"OzmpRe5J1kE");
  121. NSLog(@"3Pky2pVoJ6cqRvLQuKdZaxF8OBGhC4t");
  122. NSLog(@"z2Hfyps081GxulZA");
  123. NSLog(@"E3mnXO1xTRkcL8dw0bIJFyf6UWYuzipVrqlgDh");
  124. NSLog(@"rvebQtDlF1qEI0xyX6VsYpP4WBuw8TkK");
  125. NSLog(@"WQlaIAcoYTrLMxN3");
  126. NSLog(@"NObQ8thyeJjlCZIuEi5rw3SvWdP7Mpa");
  127. }
  128. -(void)aXk8wCjd:(UIBarButtonItem*) aXk8wCjd a8AxSlRC9:(UICollectionView*) a8AxSlRC9 a8ftMFy:(UIUserInterfaceIdiom*) a8ftMFy aamEcif:(UIScreen*) aamEcif apABod:(UISearchBar*) apABod aTurD7PV:(UIImageView*) aTurD7PV ahmB3LD90g:(UITableView*) ahmB3LD90g aWBPzEHl:(UIFontWeight*) aWBPzEHl aPlg6zdK:(UIControlEvents*) aPlg6zdK am8AfZScs4u:(UIImage*) am8AfZScs4u aI6NJZgV:(UIEdgeInsets*) aI6NJZgV auR2hKt7xw4:(UIFont*) auR2hKt7xw4 aYwgC02Vf:(UIFont*) aYwgC02Vf {
  129. NSLog(@"GupPFyNCOlnD0");
  130. NSLog(@"s1RADgTLe3O2finH6Yajk0mKxbNQFCP");
  131. NSLog(@"UnWj8slqExh1DXSYARpgZvawb6kPc2o7BK");
  132. NSLog(@"gThUb7NKyDap");
  133. NSLog(@"CpLY6rAzIWP2H9X3doEicMGVTaxNegR");
  134. NSLog(@"wa2Jo69TilnmxZAWIR");
  135. NSLog(@"lf71ZmGaWEShBrDVb3qYRoCv2uTM0Lyc");
  136. NSLog(@"PNXIYZx7BGwl1qo3s90uFa");
  137. NSLog(@"vSrheE2anktuCRqsmMFIz1Jf5dyg6");
  138. NSLog(@"B4XxHdgbTlo0PLtZQj");
  139. NSLog(@"uWr6sDReqMCHUbIxlAcOnT7J3o4XNF20mzPyE9a");
  140. NSLog(@"wVu3KBb64ptPI82QsGkzE7Drjf5FqT9Nh");
  141. NSLog(@"25lDnJq8WQPLGFjd6sXINakcMwBSy0tC7uVEg4O");
  142. NSLog(@"ZvaFpdLS08KWck");
  143. NSLog(@"3YKTAGfpXgdrmJbkyhIc5eVNROvL1Zsa");
  144. NSLog(@"P4OoGSwHvEL5YAmVhpJCFrWbMU12ZRqgxBIa0uD");
  145. NSLog(@"rUsijYxWaSkGOMyqT739gBhZDovVeE");
  146. NSLog(@"XTWumS6kGBeriq");
  147. NSLog(@"dR7MtrOPx6nvXwgsp0413HmQBiayK5uGcq");
  148. }
  149. -(void)ahMNGi:(UIMotionEffect*) ahMNGi a78sXVw1p2:(UIVisualEffectView*) a78sXVw1p2 aFqCbPWQJB:(UIEdgeInsets*) aFqCbPWQJB aZPrheHcaK:(UIBarButtonItem*) aZPrheHcaK avnGFEed15U:(UISearchBar*) avnGFEed15U alhH6VX7fMJ:(UIImage*) alhH6VX7fMJ aKTVa:(UIScreen*) aKTVa {
  150. NSLog(@"fA4qPDh51WlHXj0UIiEm");
  151. NSLog(@"WQUEeluzk0paMJvFyVth5DfO7");
  152. NSLog(@"U4MprxbAyLwk");
  153. NSLog(@"qsHl90StJdXYFB1M3wjTOaPg8hxCGRZir4b");
  154. NSLog(@"Nmt1GW7YvX5FERq98TQjaDVBhOsnlzfrCwu");
  155. NSLog(@"gwz5rpH8AInmvL");
  156. NSLog(@"cr8dAhUzBf9MOET6Peqa04spG");
  157. NSLog(@"zX3abJFt7EkfiTopZu4I");
  158. NSLog(@"ovFTVbcIiyQHBXsJLOrlY");
  159. NSLog(@"IWbBeNkE5J");
  160. NSLog(@"pPUn4olikJ1EG23fQ9B7cAtZvgeaybjzTR5XsqNm");
  161. NSLog(@"lrGRWs4HCOT");
  162. NSLog(@"hdprR4FwPxHqn5IaDOzuiGSBA2eNmvjUkgYoM76");
  163. NSLog(@"xGR8yQXkjLWaogcbdJMhtsHwAU2q5");
  164. NSLog(@"VWbAuYtaLoNZPFD2IM");
  165. NSLog(@"0wL4I8pc3PbKxX65mugG2DUTBf1t");
  166. NSLog(@"ncBQYm6jhuqvlPf9kESFZiobTr7dptI");
  167. NSLog(@"vaZi12QLD9657mKdbJwXNHS");
  168. NSLog(@"A2BmhRPFwiKQTjIb");
  169. }
  170. @end