This commit is contained in:
2025-12-03 16:48:25 +08:00
parent c1c4c85bd2
commit 91e2b047eb
3 changed files with 22 additions and 6 deletions

View File

@@ -259,11 +259,24 @@
} }
- (void)onTapSubmit { - (void)onTapSubmit {
// / //
KBLOG(@"onTapSubmit email=%@, password length=%zd", NSString *email = [self.emailTextField.text ?: @"" stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
self.emailTextField.text, NSString *pwd = self.passwordTextField.text ?: @"";
self.passwordTextField.text.length); NSString *repeat = self.repeatPasswordTextField.text ?: @"";
if (email.length == 0 || pwd.length == 0 || repeat.length == 0) {
[KBHUD showInfo:KBLocalized(@"Please complete all fields")];
return;
}
if (![pwd isEqualToString:repeat]) {
[KBHUD showInfo:KBLocalized(@"The two passwords do not match")];
return;
}
KBLOG(@"onTapSubmit email=%@, password length=%zd", email, pwd.length);
KBRegistVerEmailVC *vc = [[KBRegistVerEmailVC alloc] init]; KBRegistVerEmailVC *vc = [[KBRegistVerEmailVC alloc] init];
vc.email = email;
UINavigationController *nav = KB_CURRENT_NAV; UINavigationController *nav = KB_CURRENT_NAV;
if ([nav isKindOfClass:[BaseNavigationController class]]) { if ([nav isKindOfClass:[BaseNavigationController class]]) {
[(BaseNavigationController *)nav kb_pushViewControllerRemovingSameClass:vc animated:YES]; [(BaseNavigationController *)nav kb_pushViewControllerRemovingSameClass:vc animated:YES];

View File

@@ -11,6 +11,9 @@ NS_ASSUME_NONNULL_BEGIN
@interface KBRegistVerEmailVC : BaseViewController @interface KBRegistVerEmailVC : BaseViewController
/// 注册时用于邮箱验证的邮箱地址由上一个页面KBEmailRegistVC传入。
@property (nonatomic, copy) NSString *email;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -149,8 +149,8 @@
// %@ // %@
NSString *template = KBLocalized(@"We have already sent it to the email address %@. Please enter the 6-digit verification code from the email to verify your mailbox."); NSString *template = KBLocalized(@"We have already sent it to the email address %@. Please enter the 6-digit verification code from the email to verify your mailbox.");
// // 使使
NSString *email = @"example@mail.com"; NSString *email = self.email.length > 0 ? self.email : @"example@mail.com";
_descLabel.text = [NSString stringWithFormat:template, email]; _descLabel.text = [NSString stringWithFormat:template, email];
} }
return _descLabel; return _descLabel;