1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- #import "SKForgetPassWordViewController.h"
- #import "SKEnterPassWordViewController.h"
- @implementation SKForgetPassWordViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
- [self.navigationController setNavigationBarHidden:NO];
- if (@available(iOS 11.0, *)) {
- [self.navigationItem setLargeTitleDisplayMode:UINavigationItemLargeTitleDisplayModeAlways];
- self.edgesForExtendedLayout = UIRectEdgeAll;
- }
- [self setNavigationBarColor:1];
-
- [self initAccountType];
-
- #ifdef SK_DEBUG_ACCOUNT
- self.mEmailNumTextField.text = @"131459421@163.com";
- self.mPwdNewTextField.text = @"liu1234567";
- self.mPhoneNumTextField.text = @"18616012216";
- self.mPhoneNumTextField.text = @"liu1234567";
- #endif
- }
- - (void)viewWillAppear:(BOOL)animated {
- [super viewWillAppear:animated];
- [self.navigationController setNavigationBarHidden:NO];
- self.title = NSLocalizedString(@"Reset.Passcode.Title", nil);//@"重置密码";
- }
- - (void)viewWillDisappear:(BOOL)animated {
- [super viewWillDisappear:animated];
- self.title = @"";
- }
- - (IBAction)phoneCaptchaCodeAction:(id)sender {
- if (![self checkPhoneNumTextField]) {
- return;
- }
- [self requstPhoneCaptchaCode];
- [self startTimer];
- }
- - (IBAction)emailCaptchaCodeAction:(id)sender {
- if (![self checkEmailNumTextField]) {
- return;
- }
- [self requstEmailCaptchaCode];
- [self startTimer];
- }
- - (IBAction)confirmAction:(id)sender{
- [[UIApplication sharedApplication].keyWindow endEditing:YES];
- if ([self checkAccount] == NO)
- return;
-
- int area = [UserDataHelper getLoginType];
- SKEnterPassWordViewController* controller = [[self storyboard] instantiateViewControllerWithIdentifier:@"EnterPassWordVC"];
- if (area == 0) {
- NSString* areaCode = [self.mPhoneCountryLabel.text stringByReplacingOccurrencesOfString:@"+" withString:@""];
- controller.mAreaCode = areaCode;
- controller.mAccount = self.mPhoneNumTextField.text;
- controller.mCaptcha = self.mPhoneCaptchaTextField.text;
- } else {
- controller.mAccount = self.mEmailNumTextField.text;
- controller.mCaptcha = self.mEmailCaptchaLocalTextField.text;
- }
- [self pushViewController:controller animated:YES];
- }
- #pragma mark -
- - (void)onTimerCallback:(NSInteger)timeLeft {
- [self refreshCaptchaButton:timeLeft];
- }
- @end
|