1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- //
- // SKLoginViewController.m
- // SikeyComm
- //
- // Created by 刘振兴 on 2024/2/5.
- // Copyright © 2024 BaH Cy. All rights reserved.
- //
- #import "SKLoginViewController.h"
- #import "SKLoginViewController+guide.h"
- #import "SKLoginViewController+thirdparty.h"
- #import "BlackDoorManager+click.h"
- #import "UserDataHelper.h"
- @interface SKLoginViewController ()
- @end
- @implementation SKLoginViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- [self createGoogleFacebook];
- [BlackDoorManager addBlackDoorButtons:self.view];
- [self createGuideView];
-
- [self initAccountType];
-
- [UserDataHelper setHasLogin:NO];
- [self autoAccount];
- }
- - (void)autoAccount {
- NSString *account = [UserDataHelper getUserName];
- NSString *passWord = [UserDataHelper getUserPassword:account];
- [self.mPhoneNumTextField setText:account];
- [self.mPwdTextField setText:passWord];
- [self.mEmailNumTextField setText:account];
- [self.mPwdTextField setText:passWord];
-
- #ifdef SK_DEBUG_ACCOUNT
- self.mEmailNumTextField.text = @"131459421@163.com";
- self.mPwdTextField.text = @"liu123456";
- self.mPhoneNumTextField.text = @"18616012216";
- self.mPhoneNumTextField.text = @"liu123456";
- #endif
- }
- - (void)viewWillAppear:(BOOL)animated {
- [super viewWillAppear:animated];
- [self.navigationController setNavigationBarHidden:YES];
- self.title = @"";
-
- //防止自动登陆时,联网屏蔽界面,但是未知原因,退出到登陆界面,导致屏幕不能点击问题//
- [[[UIApplication sharedApplication] delegate].window setUserInteractionEnabled:YES];
- }
- - (void)viewWillDisappear:(BOOL)animated {
- [super viewWillDisappear:animated];
- self.title = @"";
- }
- - (IBAction)onForgetPassWord:(id)sender {
- [MobClick event:@"ClickForgetPassWord"];
- UIViewController *controller = [[self storyboard] instantiateViewControllerWithIdentifier:@"ForgetPassWordVC"];
- [self pushViewController:controller animated:YES];
- }
- - (IBAction)onRegister:(id)sender {
- [MobClick event:@"ClickRegister"];
- UIViewController *controller = [[self storyboard] instantiateViewControllerWithIdentifier:@"RegisterVC"];
- [self pushViewController:controller animated:YES];
- }
- - (IBAction)confirmAction:(id)sender{
- [[UIApplication sharedApplication].keyWindow endEditing:YES];
- if ([self checkAccount] == NO)
- return;
-
- [self confirmActionEx];
- }
- - (void)confirmActionEx {
- int area = [UserDataHelper getLoginType];
- if (area == 0) {
- [self phoneLoginRequest];
- } else {
- [self emailLoginRequest];
- }
- }
- @end
|