Explorar el Código

手机登录提示bug

jikaipeng %!s(int64=5) %!d(string=hace) años
padre
commit
be62033fa2

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


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

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