12345678910111213141516171819202122232425262728293031 |
- //
- // AppDelegate+login.m
- // Overseas Watch
- //
- // Created by 刘振兴 on 2023/11/28.
- // Copyright © 2023 BaH Cy. All rights reserved.
- //
- #import "AppDelegate+login.h"
- @implementation AppDelegate (login)
- + (void)checkLogin {
- int area = [UserDataHelper getSelectArea];
- if (area == -1) {
- [[DataManager shared] showSKSelectAreaViewController];
- } else {
- NSDictionary* loginData = [UserDataHelper getLastLoginInfo];
- LogInModel* loginModel = [LogInModel mj_objectWithKeyValues:loginData];
-
- if(loginData && loginModel && loginModel.uid.length > 0 && [UserDataHelper hasLogin]) {
- [DataManager shared].loginModel = loginModel;
- [[DataManager shared] showTabBarController];
- } else {
- [DataManager shared].loginModel = nil;
- [[DataManager shared] showSKLoginViewController];
- }
- }
- }
- @end
|