1
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user