This commit is contained in:
2025-12-08 16:39:47 +08:00
parent 0a1c30f669
commit fd8c08316b
30 changed files with 306 additions and 85 deletions

View File

@@ -6,7 +6,8 @@
//
#import "KBForgetPwdNewPwdVC.h"
#import "KBLoginVM.h"
#import "KBEmailRegistVC.h"
@interface KBForgetPwdNewPwdVC () <UITextFieldDelegate>
@property (nonatomic, strong) UILabel *titleLabel; // Reset Password
@@ -124,6 +125,25 @@
KBLOG(@"KBForgetPwdNewPwdVC next step, pwdLen=%zd", pwd.length);
// TODO:
NSString *rEmail = self.email ? self.email : @"";
[[KBLoginVM shared] resetPassWord:rEmail password:pwd confirmPassword:pwd withCompletion:^(BOOL success, NSError * _Nullable error) {
///
if (success) {
UIViewController *targetVC = nil;
for (UIViewController *vc in KB_CURRENT_NAV.viewControllers) {
if ([vc isKindOfClass:[KBEmailRegistVC class]]) {
targetVC = vc;
break;
}
}
if (targetVC) {
[KB_CURRENT_NAV popToViewController:targetVC animated:YES];
} else {
// popToRootViewController
[KB_CURRENT_NAV popToRootViewControllerAnimated:YES];
}
}
}];
}
#pragma mark - UITextFieldDelegate