Parcourir la source

1.修复优化启动时间带来的bug(非计算器版本 第一次扫码 自定义启动页没有消失)

huangxiaodong il y a 1 an
Parent
commit
56f84eb0f3
1 fichiers modifiés avec 8 ajouts et 8 suppressions
  1. 8 8
      创维盒子/双子星云手机/AppDelegate/SceneDelegate.m

+ 8 - 8
创维盒子/双子星云手机/AppDelegate/SceneDelegate.m

@@ -108,8 +108,6 @@
         return;
     }
     
-    [self getDeviceMsgInMainVCWith:deviceDict];
-    
     NSString *SNStr = deviceDict[@"Const_Have_Add_Device_SN"];
     
     //    GuideViewController
@@ -132,6 +130,8 @@
         _customLaunchV = [[customLaunchView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H)];
         [self.window addSubview:_customLaunchV];
     }
+    
+    [self getDeviceMsgInMainVCWith:deviceDict];
 }
 
 - (void)getDeviceMsgInMainVCWith:(NSDictionary*)deviceDict
@@ -166,7 +166,7 @@
     //非扫码进入 进入到这里很可能还没联网拿到设备最新信息
     if(![connectDeviceManager shareInstance].DeviceThirdIdMod){
      
-        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
             mainBlock(^{
                 [self enterMainVCFromScene];
             });
@@ -174,11 +174,6 @@
         
         return;
     }
-   
-    if(_customLaunchV){
-        [_customLaunchV removeFromSuperview];
-        _customLaunchV = nil;
-    }
     
     //是否已经有密码了 有就是输入密码 没有就是设置密码
     NSString *curPwd = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.password;
@@ -195,6 +190,11 @@
         return;
     }
     
+    if(_customLaunchV){
+        [_customLaunchV removeFromSuperview];
+        _customLaunchV = nil;
+    }
+    
     if(curPwd && curPwd.length > 0){
         /*设置密码*/
 //        inputPWDViewController *nextVC = [[inputPWDViewController alloc] init];