소스 검색

1.弹框逻辑优化

huangxiaodong 1 년 전
부모
커밋
dc974e5c3a
2개의 변경된 파일43개의 추가작업 그리고 9개의 파일을 삭제
  1. 38 9
      创维盒子/双子星云手机/NAS/NASViewController.m
  2. 5 0
      创维盒子/双子星云手机/NAS/view/errorAlertTool.m

+ 38 - 9
创维盒子/双子星云手机/NAS/NASViewController.m

@@ -581,9 +581,6 @@
     if(ksharedAppDelegate.isNeedShowImageNewType){//强制盒子更新弹窗
         [self showImageViewRenewTipViewFun];
     }
-    else{//APP版本更新弹窗
-        [self checkVersionFun];
-    }
 }
 
 - (void)viewWillAppear:(BOOL)animated{
@@ -596,9 +593,7 @@
         [self checkFileTransferTask];
     });
     
-    if(!didGetSysInfoType){
-        [[webSocketManager shareInstance] getSysInfoFun];
-    }
+    [self beginShowAlertFun];
 }
 
 - (void)viewWillDisappear:(BOOL)animated{
@@ -757,14 +752,43 @@
     });
 }
 
-#pragma mark 弹框流程 优先级:强制盒子更新弹窗 > APP版本更新弹窗 > 新手引导弹窗 > 通知公告弹窗
+#pragma mark 弹框流程 
+//优先级:1.强制盒子更新弹窗
+//       2.APP版本更新弹窗 > 新手引导弹窗 > 通知公告弹窗
+
+- (void)beginShowAlertFun
+{
+    //1.隐私模式密码界面 3秒检测一次是否输入完成密码了
+    if(![connectDeviceManager shareInstance].isFirstInputPwdDone){
+        KWeakSelf
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+            [weakSelf beginShowAlertFun];
+        });
+        
+        return;
+    }
+    
+    //2. 强制盒子更新弹窗
+    if(!didGetSysInfoType){
+        [[webSocketManager shareInstance] getSysInfoFun];
+    }
+    
+    //3. APP版本更新弹窗
+    [self checkVersionFun];
+}
 
 #pragma mark 弹框流程 1 强制盒子更新弹窗
 - (void)showImageViewRenewTipViewFun
 {
+    //密码框界面 拦着 不给弹出
+    if(![connectDeviceManager shareInstance].isFirstInputPwdDone){
+        didGetSysInfoType = NO;
+        return;
+    }
+    
     imageVersionRenewTipView * RenewTipView = [[imageVersionRenewTipView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H)];
-    [self.view addSubview:RenewTipView];
-    [self.view bringSubviewToFront:RenewTipView];
+    [[iTools getKeyWindow] addSubview:RenewTipView];
+    //[self.view bringSubviewToFront:RenewTipView];
 }
 
 #pragma mark 弹框流程 2 APP版本更新弹窗
@@ -776,6 +800,11 @@
 #pragma mark- 网络请求
 - (void)getVersion {
     
+    //密码框界面 拦着 不给弹出
+    if(![connectDeviceManager shareInstance].isFirstInputPwdDone){
+        return;
+    }
+    
     NSMutableDictionary *paraDict = [NSMutableDictionary dictionary];
     [paraDict setValue:@"ios" forKey:@"type"];
     [paraDict setValue:@"skyworth" forKey:@"source"];

+ 5 - 0
创维盒子/双子星云手机/NAS/view/errorAlertTool.m

@@ -98,6 +98,11 @@ static errorAlertTool *shareInstance = nil;
         return;
     }
     
+    //被挤下线
+    if([webSocketManager shareInstance].isLogoutByOtherType){
+        return;
+    }
+    
 //    if([self isPlayerViewIsTopVCFun]){
 //        
 //        //等下再发