2 Commits 3d25c29d33 ... 293d89e4bc

Author SHA1 Message Date
  jikaipeng 293d89e4bc Merge branch 'master' of http://101.200.220.49:8001/liuxueli/KDProject 5 years ago
  jikaipeng be62033fa2 手机登录提示bug 5 years ago

BIN
KuDianProject.xcworkspace/xcuserdata/kaipeng.xcuserdatad/UserInterfaceState.xcuserstate


+ 6 - 1
KuDianProject/Login/controller/KDPPhoneLoginViewController.m

21
 @property (nonatomic, strong) UIButton *sendCodeBtn;
21
 @property (nonatomic, strong) UIButton *sendCodeBtn;
22
 
22
 
23
 @property (nonatomic, strong) NSTimer *timer;
23
 @property (nonatomic, strong) NSTimer *timer;
24
+// 保存的手机验证码
25
+@property (nonatomic, strong) NSString *saveCode;
24
 
26
 
25
 @end
27
 @end
26
 
28
 
67
     phoneField.textColor = [UIColor colorWithHex:0x333333];
69
     phoneField.textColor = [UIColor colorWithHex:0x333333];
68
     phoneField.font = FONT_SYS(16);
70
     phoneField.font = FONT_SYS(16);
69
     phoneField.placeholder = @"请输入手机号";
71
     phoneField.placeholder = @"请输入手机号";
72
+    phoneField.clearButtonMode = UITextFieldViewModeWhileEditing;
70
     [phoneField addTarget:self action:@selector(valueChanged:) forControlEvents:UIControlEventValueChanged];
73
     [phoneField addTarget:self action:@selector(valueChanged:) forControlEvents:UIControlEventValueChanged];
71
     self.phoneTextField = phoneField;
74
     self.phoneTextField = phoneField;
72
     [self.view addSubview:self.phoneTextField];
75
     [self.view addSubview:self.phoneTextField];
85
     phoneLine.backgroundColor = [UIColor colorWithHex:0xD1D1D1];
88
     phoneLine.backgroundColor = [UIColor colorWithHex:0xD1D1D1];
86
     [self.view addSubview:phoneLine];
89
     [self.view addSubview:phoneLine];
87
     
90
     
88
-    self.codeField = [[UITextField alloc] initWithFrame:CGRectMake(32, phoneLine.bottom + 27, self.phoneTextField.width, self.phoneTextField.height)];
91
+    self.codeField = [[UITextField alloc] initWithFrame:CGRectMake(32, phoneLine.bottom + 27, phoneLine.width, self.phoneTextField.height)];
89
     self.codeField.keyboardType = UIKeyboardTypePhonePad;
92
     self.codeField.keyboardType = UIKeyboardTypePhonePad;
90
     self.codeField.textColor = [UIColor colorWithHex:0x333333];
93
     self.codeField.textColor = [UIColor colorWithHex:0x333333];
91
     self.codeField.font = FONT_SYS(16);
94
     self.codeField.font = FONT_SYS(16);
92
     self.codeField.placeholder = @"请输入验证码";
95
     self.codeField.placeholder = @"请输入验证码";
96
+    self.codeField.clearButtonMode = UITextFieldViewModeWhileEditing;
93
     [self.view addSubview:self.codeField];
97
     [self.view addSubview:self.codeField];
94
     
98
     
95
     UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(32, self.codeField.bottom + 12, SCREEN_WIDTH-64, 1)];
99
     UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(32, self.codeField.bottom + 12, SCREEN_WIDTH-64, 1)];
150
                 [vc dismissViewControllerAnimated:YES completion:nil];
154
                 [vc dismissViewControllerAnimated:YES completion:nil];
151
             }
155
             }
152
         } failure:^(NSError * _Nonnull error) {
156
         } failure:^(NSError * _Nonnull error) {
157
+            [MBProgressHUD showError:@"验证码输入错误"];
153
             [LoadingView dismiss];
158
             [LoadingView dismiss];
154
         }];
159
         }];
155
 
160