SceneDelegate.m 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. //
  2. // SceneDelegate.m
  3. // 唔即云相册
  4. //
  5. // Created by 余衡武 on 2021/12/8.
  6. //
  7. #import "SceneDelegate.h"
  8. #import "HWWebViewController.h"
  9. #import "CalculatorViewController.h"
  10. #import "SetUsePWDViewController.h"
  11. #import "GuideViewController.h"
  12. #import "BaseNavigationController.h"
  13. #import "MySetViewController.h"
  14. #import "SafeForKey.h"
  15. #import "TipsQRCodeViewController.h"
  16. #import "SetPWDFirstViewController.h"
  17. #import "ConnectTestViewController.h"
  18. #import "PlayerViewController.h"
  19. #import "connectDeviceManager.h"
  20. #import "inputPWDViewController.h"
  21. #import "customLaunchView.h"
  22. #import "RSATool.h"
  23. @interface SceneDelegate ()<SetUsePWDViewControllerDelegate,GuideViewControllerDelegate>
  24. @property(nonatomic, strong) CalculatorViewController *calculatorVC;
  25. @property(nonatomic, strong) HWWebViewController *webVC;
  26. @property(nonatomic, strong) inputPWDViewController *inputVC;
  27. @property(nonatomic, strong) NSTimer *checkSNDataTimer;//
  28. @property(nonatomic, strong) customLaunchView *customLaunchV;//
  29. @property(nonatomic, strong) PlayerViewController *curPlayerVC;
  30. @property(nonatomic, assign) bool isQRCodeType;//第一次 扫码进来的
  31. @property(nonatomic, assign) bool isNeedToShowSecretKey;//扫码进来的SN 没有密码 则需要显示秘钥
  32. @property (nonatomic, assign) BOOL isLoginAgainType;// 单点登录 点重新登录进来的
  33. @end
  34. @implementation SceneDelegate
  35. - (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions API_AVAILABLE(ios(13.0)){
  36. if (scene) {
  37. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(guideOk:) name:GuideOkNotification object:nil];
  38. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showLockViewFun:) name:lockBypwdNotification object:nil];
  39. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setPwdVCFun:) name:setPwdNotification object:nil];
  40. UIWindowScene *windowScene = (UIWindowScene *)scene;
  41. self.window = [[UIWindow alloc] initWithWindowScene:windowScene];
  42. self.window.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height);
  43. // 初始化数据库
  44. [self initBrowserWindow];
  45. // 加载主页面
  46. [self enterMainVCFromScene];
  47. //
  48. [self getNetWorkPopViewFun];
  49. [self.window makeKeyAndVisible];
  50. }
  51. }
  52. /** 进入登录界面 - 内部使用 */
  53. - (void)enterLoginVCFromScene {
  54. // UIViewController *vc = [[UIViewController alloc] init];
  55. // vc.view.backgroundColor = [UIColor redColor];
  56. // UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:vc];
  57. // self.window.rootViewController = nvc;
  58. }
  59. /** 主界面 - 内部使用 */
  60. - (void)enterMainVCFromScene {
  61. // ConnectTestViewController *qrCodeVCNav = [[ConnectTestViewController alloc] init];
  62. // self.window.rootViewController = qrCodeVCNav;
  63. // return;/*临时测试*/
  64. /*先判断本地有无设备 无设备时需要先扫码添加设备*/
  65. NSDictionary *deviceDict = [HWDataManager getObjectWithKey:Const_Have_Add_Device];
  66. if (!deviceDict || ![[deviceDict allKeys] containsObject:Const_Have_Add_Device_SN]){
  67. /*扫码界面*/
  68. TipsQRCodeViewController *qrCodeVC = [[TipsQRCodeViewController alloc] init];
  69. BaseNavigationController *qrCodeVCNav = [[BaseNavigationController alloc] initWithRootViewController:qrCodeVC];
  70. self.window.rootViewController = qrCodeVCNav;
  71. _isQRCodeType = YES;
  72. return;
  73. }
  74. //有设备了先去做链接准备 // 80bec9c5
  75. NSString *SNStr = deviceDict[@"Const_Have_Add_Device_SN"];
  76. NSString *sdnId = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sdnId;
  77. if(SNStr && !sdnId){
  78. [[connectDeviceManager shareInstance] getThridMsgBySN:SNStr needReconnect:YES didNetEnd:^(bool didSuc) {
  79. }];
  80. }
  81. // GuideViewController
  82. BOOL haveGuide = [HWDataManager getBoolWithKey:Const_Have_Show_Guide];
  83. if (haveGuide) {
  84. ;
  85. }else {
  86. GuideViewController *guiDeVC = [[GuideViewController alloc] init];
  87. guiDeVC.delegate = self;
  88. guiDeVC.sn = SNStr;
  89. self.window.rootViewController = guiDeVC;
  90. return;
  91. }
  92. // if (![[deviceDict allKeys] containsObject:Const_Have_Add_Device_PWD]){
  93. // /*没有设置密码*/
  94. // SetPWDFirstViewController *qrCodeVC = [[SetPWDFirstViewController alloc] init];
  95. // BaseNavigationController *qrCodeVCNav = [[BaseNavigationController alloc] initWithRootViewController:qrCodeVC];
  96. // self.window.rootViewController = qrCodeVCNav;
  97. //
  98. // return;
  99. // }
  100. //确保通过SN号拿到密码了
  101. //非扫码进入 进入到这里很可能还没联网拿到设备最新信息
  102. if(![connectDeviceManager shareInstance].DeviceThirdIdMod){
  103. if(!_checkSNDataTimer){
  104. _checkSNDataTimer = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(enterMainVCFromScene) userInfo:nil repeats:YES];
  105. //BOOL haveOpenMask = [HWDataManager getBoolWithKey:Const_Mask_View_Open];
  106. NSInteger maskModel = 1;// [HWDataManager getIntegerWithKey:Const_Mask_View_Model];
  107. //添加默认启动图片
  108. if(!_customLaunchV && maskModel == 0){
  109. _customLaunchV = [[customLaunchView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H)];
  110. [self.window addSubview:_customLaunchV];
  111. }
  112. }
  113. return;
  114. }
  115. if(_checkSNDataTimer){
  116. [_checkSNDataTimer invalidate];
  117. [_customLaunchV removeFromSuperview];
  118. _customLaunchV = nil;
  119. }
  120. //是否已经有密码了 有就是输入密码 没有就是设置密码
  121. NSString *curPwd = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.password;
  122. sdnId = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sdnId;
  123. if(!sdnId){
  124. HLog(@"没有拿到sdnId");
  125. [[connectDeviceManager shareInstance] getThridMsgBySN:SNStr needReconnect:YES didNetEnd:^(bool didSuc) {
  126. if(didSuc){
  127. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  128. mainBlock(^{
  129. [self enterMainVCFromScene];
  130. });
  131. });
  132. }
  133. }];
  134. return;
  135. }
  136. if(curPwd && curPwd.length > 0){
  137. /*设置密码*/
  138. // inputPWDViewController *nextVC = [[inputPWDViewController alloc] init];
  139. // BaseNavigationController *nextVCNav = [[BaseNavigationController alloc] initWithRootViewController:nextVC];
  140. // self.window.rootViewController = nextVCNav;
  141. }
  142. else{
  143. /*没有设置密码*/
  144. SetPWDFirstViewController *qrCodeVC = [[SetPWDFirstViewController alloc] init];
  145. BaseNavigationController *qrCodeVCNav = [[BaseNavigationController alloc] initWithRootViewController:qrCodeVC];
  146. self.window.rootViewController = qrCodeVCNav;
  147. return;
  148. }
  149. if(_curPlayerVC){
  150. [_curPlayerVC disconnectVideoServer];
  151. }
  152. //每次进入
  153. PlayerViewController *playerRootVC = [[PlayerViewController alloc] init];
  154. if(self.isLoginAgainType){
  155. playerRootVC.isLoginAgainType = self.isLoginAgainType;
  156. }
  157. playerRootVC.isPwdVCShow = YES;
  158. _curPlayerVC = playerRootVC;
  159. BaseNavigationController *playerNav = [[BaseNavigationController alloc] initWithRootViewController:playerRootVC];
  160. self.window.rootViewController = playerNav;
  161. self.isLoginAgainType = NO;
  162. if(!_isQRCodeType){
  163. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  164. mainBlock(^{
  165. [playerRootVC setShowImgAndVoiceTypeFun:NO];
  166. });
  167. });
  168. [self showCalculatorVC];
  169. _isQRCodeType = NO;
  170. }
  171. else{
  172. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  173. mainBlock(^{
  174. playerRootVC.isPwdVCShow = NO;
  175. [playerRootVC setShowImgAndVoiceTypeFun:YES];
  176. if(self->_isNeedToShowSecretKey){
  177. [playerRootVC showSecretkeyFun];
  178. }
  179. });
  180. });
  181. }
  182. //test code
  183. //[playerRootVC showSecretkeyFun];
  184. // MySetViewController *playerRootVC = [[MySetViewController alloc] init];
  185. // BaseNavigationController *playerNav = [[BaseNavigationController alloc] initWithRootViewController:playerRootVC];
  186. // self.window.rootViewController = playerNav;
  187. }
  188. - (void)setPwdOk{
  189. [self enterMainVCFromScene];
  190. // NSArray *dataArray = [BaseModel bg_findAll:DB_BrowserWindows_TableName];
  191. //
  192. // if (dataArray.count == 0) { // 浏览器没有窗口
  193. // // 加载首页
  194. // HWWebViewController *vc = [[HWWebViewController alloc] init];
  195. // vc.webUrl = Const_HomeUrl;
  196. // UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:vc];
  197. // self.window.rootViewController = nvc;
  198. //
  199. // }else {
  200. // // 浏览器当前窗口索引ID
  201. // NSInteger ID = [HWDataManager getIntegerWithKey:BrowserWindowsCurrentID];
  202. // NSString *where = [NSString stringWithFormat:@"where %@=%ld",bg_sqlKey(@"ID"),(long)ID];
  203. // NSArray* finfAlls = [BaseModel bg_find:DB_BrowserWindows_TableName where:where];
  204. // BaseModel *model = finfAlls.firstObject;
  205. //
  206. // // 加载网页
  207. // HWWebViewController *vc = [[HWWebViewController alloc] init];
  208. // vc.webUrl = model.webUrl;
  209. // UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:vc];
  210. // self.window.rootViewController = nvc;
  211. // }
  212. }
  213. /** 登录界面 - 外部使用*/
  214. + (void)enterLoginVC {
  215. // SetPWDViewController *vc = [[SetPWDViewController alloc] init];
  216. // UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:vc];
  217. // UIWindow *keyWindow = [iTools getKeyWindow];
  218. // keyWindow.rootViewController = nvc;
  219. }
  220. /** 主界面 - 外部使用 */
  221. + (void)enterMainVC {
  222. // AlbumHomeViewController *vc = [[AlbumHomeViewController alloc] init];
  223. // UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:vc];
  224. // UIWindow *keyWindow = [iTools getKeyWindow];
  225. // keyWindow.rootViewController = nvc;
  226. }
  227. - (void)sceneDidDisconnect:(UIScene *)scene API_AVAILABLE(ios(13.0)){
  228. }
  229. - (void)sceneDidBecomeActive:(UIScene *)scene API_AVAILABLE(ios(13.0)){
  230. BOOL haveGuide = [HWDataManager getBoolWithKey:Const_Have_Show_Guide];
  231. if (haveGuide) {
  232. ;
  233. }else {
  234. return;
  235. }
  236. [self showCalculatorVC];
  237. }
  238. - (void)sceneWillResignActive:(UIScene *)scene API_AVAILABLE(ios(13.0)){
  239. BOOL haveGuide = [HWDataManager getBoolWithKey:Const_Have_Show_Guide];
  240. if (haveGuide) {
  241. ;
  242. }else {
  243. return;
  244. }
  245. [self showCalculatorVC];
  246. }
  247. - (void)sceneWillEnterForeground:(UIScene *)scene API_AVAILABLE(ios(13.0)){
  248. }
  249. - (void)sceneDidEnterBackground:(UIScene *)scene API_AVAILABLE(ios(13.0)){
  250. BOOL haveGuide = [HWDataManager getBoolWithKey:Const_Have_Show_Guide];
  251. if (haveGuide) {
  252. ;
  253. }else {
  254. return;
  255. }
  256. [self showCalculatorVC];
  257. }
  258. #pragma mark 初始化数据库-DB_BrowserWindows_TableName
  259. - (void)initBrowserWindow {
  260. // 浏览器当前所有窗口
  261. NSArray *dataArray = [BaseModel bg_findAll:DB_BrowserWindows_TableName];
  262. // 浏览器当前窗口索引ID
  263. NSInteger ID = [HWDataManager getIntegerWithKey:BrowserWindowsCurrentID];
  264. NSString *IDValue = [NSString stringWithFormat:@"%ld", ID];
  265. NSString *where = [NSString stringWithFormat:@"where %@=%@",bg_sqlKey(@"ID"),bg_sqlValue(IDValue)];
  266. NSArray *modelArr = [BaseModel bg_find:DB_BrowserWindows_TableName where:where];
  267. if (dataArray.count == 0) { // 浏览器没有窗口
  268. BaseModel *model = [[BaseModel alloc] init];
  269. model.ID = 0;
  270. model.name = @"主页";
  271. // model.iconFile = imageUrl;
  272. model.webUrl = Const_HomeUrl;
  273. // 写入数据库
  274. model.bg_tableName = DB_BrowserWindows_TableName;
  275. [model bg_saveOrUpdateAsync:^(BOOL isSuccess) {
  276. HLog(@"BaseModel写入:%@", isSuccess ? @"成功":@"失败");
  277. }];
  278. // 浏览器当前窗口索引ID
  279. [HWDataManager setIntegerWithKey:BrowserWindowsCurrentID value:0];
  280. }else if (modelArr.count == 0) { // 新建窗口
  281. BaseModel *model = [[BaseModel alloc] init];
  282. model.ID = ID;
  283. model.name = @"主页";
  284. // model.iconFile = imageUrl;
  285. model.webUrl = Const_HomeUrl;
  286. // 写入数据库
  287. model.bg_tableName = DB_BrowserWindows_TableName;
  288. [model bg_saveOrUpdateAsync:^(BOOL isSuccess) {
  289. HLog(@"BaseModel写入:%@", isSuccess ? @"成功":@"失败");
  290. }];
  291. }else { // 更新窗口数据
  292. // 浏览器当前窗口索引ID
  293. // NSInteger ID = [HWDataManager getIntegerWithKey:BrowserWindowsCurrentID];
  294. //
  295. // BaseModel *model = [[BaseModel alloc] init];
  296. // model.ID = ID;
  297. // model.name = @"主页";
  298. //// model.iconFile = imageUrl;
  299. // model.webUrl = Const_HomeUrl;
  300. //
  301. // // 更新数据库
  302. // model.bg_tableName = DB_BrowserWindows_TableName;
  303. // [model bg_saveOrUpdateAsync:^(BOOL isSuccess) {
  304. // HLog(@"BaseModel更新: %@", isSuccess ? @"成功":@"失败");
  305. // }];
  306. }
  307. }
  308. #pragma mark 获取当前屏幕的截图
  309. //- (UIImage *)getScreenShotImage {
  310. // CGSize size = [UIScreen mainScreen].bounds.size;
  311. // CGFloat scale = [UIScreen mainScreen].scale;
  312. // UIGraphicsBeginImageContextWithOptions(size, YES, scale);
  313. // [self.window.layer renderInContext:UIGraphicsGetCurrentContext()];
  314. // UIImage * image = UIGraphicsGetImageFromCurrentImageContext();
  315. // UIGraphicsEndImageContext();
  316. // return image;
  317. //}
  318. #pragma mark 计算器伪装视图
  319. /*CalculatorViewController*/
  320. - (void)showCalculatorVC{
  321. /*无有效时长直接返回不加载任何加密界面*/
  322. NSString *PwdStr = nil;
  323. NSDictionary *deviceDict = [HWDataManager getObjectWithKey:Const_Have_Add_Device];
  324. //本地密码本地判断 密码改在服务器保持
  325. if ([[deviceDict allKeys] containsObject:Const_Have_Add_Device_PWD]){
  326. PwdStr = [deviceDict objectForKey:Const_Have_Add_Device_PWD];
  327. }
  328. //实时拿到的密码 (每次打开或者更换设备 通过SN重新拿)
  329. if([connectDeviceManager shareInstance].DeviceThirdIdMod.data.password){
  330. NSString *curPwd = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.password;
  331. NSString*desPwdStr = [RSATool AES128Decrypt:curPwd key:AESCODEKEEYY];
  332. if(desPwdStr){
  333. PwdStr = desPwdStr;
  334. }
  335. }
  336. if (!PwdStr || [PwdStr isEqualToString:@""])
  337. {
  338. return;
  339. }
  340. // BOOL haveOpenMask = [HWDataManager getBoolWithKey:Const_Mask_View_Open];
  341. // if (!haveOpenMask){
  342. // //输入密码界面
  343. // [self closeCalculatorVC];
  344. // _inputVC = [[inputPWDViewController alloc] init];
  345. // [self.window addSubview:_inputVC.view];
  346. // return;
  347. // }
  348. BOOL haveVaildTime = [HWDataManager getBoolWithKey:Const_Have_No_VaildTime];
  349. if (haveVaildTime == YES){/*无有效时间*/
  350. return;
  351. }
  352. NSInteger maskModel = 1;//[HWDataManager getIntegerWithKey:Const_Mask_View_Model];
  353. if (maskModel == 0){
  354. //输入密码界面
  355. [self closeCalculatorVC];
  356. _inputVC = [[inputPWDViewController alloc] init];
  357. [self.window addSubview:_inputVC.view];
  358. }
  359. else if (maskModel == 2){
  360. /*浏览器*/
  361. [self closeCalculatorVC];
  362. _webVC = [[HWWebViewController alloc] init];
  363. _webVC.pwd = PwdStr;
  364. _webVC.webUrl = @"https://baidu.com";
  365. [self.window addSubview:_webVC.view];
  366. }else{
  367. /*计算器*/
  368. [self closeCalculatorVC];
  369. _calculatorVC = [[CalculatorViewController alloc] init];
  370. _calculatorVC.pwd = PwdStr;
  371. [self.window addSubview:_calculatorVC.view];
  372. }
  373. [[NSNotificationCenter defaultCenter] postNotificationName:ShowPwdVCNotification object:nil];
  374. }
  375. - (void)closeCalculatorVC{
  376. if (_calculatorVC){
  377. [_calculatorVC.view removeFromSuperview];
  378. }
  379. /*浏览器*/
  380. if (_webVC){
  381. [_webVC.view removeFromSuperview];
  382. }
  383. if(_inputVC){
  384. [_inputVC.view removeFromSuperview];
  385. }
  386. }
  387. - (NSString *)documentPathForAccount:(NSString *)account fileFolder:(NSString *)fileFolder {
  388. NSString *path = DocumentPath;
  389. if (account.length != 0) {
  390. path = [NSString stringWithFormat:@"%@/%@/",DocumentPath,account];
  391. }
  392. if ([fileFolder containsString:@"/"]) {
  393. NSString *path1 = [path stringByAppendingPathComponent:fileFolder];
  394. path1 = [path1 stringByDeletingLastPathComponent];
  395. NSError *error;
  396. if (![[NSFileManager defaultManager] fileExistsAtPath:path1]) {
  397. [[NSFileManager defaultManager] createDirectoryAtPath:path1 withIntermediateDirectories:YES attributes:nil error:&error];
  398. }
  399. }else{
  400. NSError *error;
  401. if (![[NSFileManager defaultManager] fileExistsAtPath:path]) {
  402. [[NSFileManager defaultManager] createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:&error];
  403. }
  404. }
  405. return [path stringByAppendingPathComponent:fileFolder];
  406. }
  407. - (void)startUseBtnBePressed{
  408. [self enterMainVCFromScene];
  409. // NSString *launchAppPWDPath = [self documentPathForAccount:@"" fileFolder:@"LaunchPWD"];
  410. // NSString *str = [[NSString alloc] initWithContentsOfFile:launchAppPWDPath encoding:(NSUTF8StringEncoding) error:nil];
  411. // if (!str || [str isEqualToString:@"0"])
  412. // {
  413. // SetUsePWDViewController *loginVC = [[SetUsePWDViewController alloc] init];
  414. // loginVC.delegate = self;
  415. // self.window.rootViewController = loginVC;
  416. //
  417. // return;
  418. // }
  419. //
  420. // NSArray *dataArray = [BaseModel bg_findAll:DB_BrowserWindows_TableName];
  421. //
  422. // if (dataArray.count == 0) { // 浏览器没有窗口
  423. // // 加载首页
  424. // HWWebViewController *vc = [[HWWebViewController alloc] init];
  425. // vc.webUrl = Const_HomeUrl;
  426. // UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:vc];
  427. // self.window.rootViewController = nvc;
  428. //
  429. // }else {
  430. // // 浏览器当前窗口索引ID
  431. // NSInteger ID = [HWDataManager getIntegerWithKey:BrowserWindowsCurrentID];
  432. // NSString *where = [NSString stringWithFormat:@"where %@=%ld",bg_sqlKey(@"ID"),(long)ID];
  433. // NSArray* finfAlls = [BaseModel bg_find:DB_BrowserWindows_TableName where:where];
  434. // BaseModel *model = finfAlls.firstObject;
  435. //
  436. // // 加载网页
  437. // HWWebViewController *vc = [[HWWebViewController alloc] init];
  438. // vc.webUrl = model.webUrl;
  439. // UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:vc];
  440. // self.window.rootViewController = nvc;
  441. // }
  442. }
  443. - (void)loginOk{
  444. [self enterMainVCFromScene];
  445. }
  446. - (void)guideOk:(NSNotification*)not{
  447. NSString *object = not.object;
  448. if(object && [object isEqualToString:@"isLoginAgainType"]){
  449. self.isLoginAgainType = YES;
  450. }
  451. [self enterMainVCFromScene];
  452. }
  453. #pragma mark 调起系统网络允许
  454. -(void)getNetWorkPopViewFun
  455. {
  456. NSMutableDictionary *paraDict = [NSMutableDictionary new];
  457. // KWeakSelf
  458. [[netWorkManager shareInstance] CommonGetWithCallBackCode:@"" Parameters:paraDict success:^(id _Nonnull responseObject) {
  459. } failure:^(NSError * _Nonnull error) {
  460. }];
  461. }
  462. #pragma mark 主动上锁
  463. - (void)showLockViewFun:(NSNotification*)not
  464. {
  465. [self showCalculatorVC];
  466. }
  467. #pragma mark 进入设置密码
  468. - (void)setPwdVCFun:(NSNotification*)not
  469. {
  470. _isNeedToShowSecretKey = YES;
  471. }
  472. @end