Selaa lähdekoodia

1.iOS输入密码页面会弹出被挤下线提示

huangxiaodong 2 vuotta sitten
vanhempi
commit
4ec2aa6441

+ 19 - 4
创维盒子/双子星云手机/CloudPlayer/PlayerViewController.mm

@@ -141,6 +141,8 @@ ComontAlretViewControllerDelegate>
 //音频和图片是否可以刷新
 @property (nonatomic, assign) BOOL canShowImgAndVoiceType;
 
+@property (nonatomic, copy)   NSString*LogoutTimerStr;//单点登出时间
+@property (nonatomic, assign) BOOL needShowLogoutDelayType;//是否是延时显示单点登出
 @end
 
 @implementation PlayerViewController
@@ -1496,8 +1498,7 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
 #pragma mark 单点登录被挤下线弹框
 - (void)LogoutByOtherFun
 {
-    //测试用
-    //return;
+    //
     
     _canShowImgAndVoiceType = NO;
     
@@ -1507,11 +1508,21 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
         dateStr = [dateStr substringWithRange:NSMakeRange(11, 5)];
     }
     
-    NSString *tipStr = [[NSString alloc] initWithFormat:@"%@%@%@",NSLocalizedString(@"single_sign_on_Tips_one",nil),dateStr,NSLocalizedString(@"single_sign_on_Tips_two",nil)];
+    if(!_needShowLogoutDelayType){
+        _LogoutTimerStr = [[NSString alloc] initWithFormat:@"%@%@%@",NSLocalizedString(@"single_sign_on_Tips_one",nil),dateStr,NSLocalizedString(@"single_sign_on_Tips_two",nil)];
+    }
+    
+    
+    if(_isPwdVCShow){
+        _needShowLogoutDelayType = YES;
+        return;
+    }
+    
+    _needShowLogoutDelayType = NO;
     
     /*弹窗提示重启*/
     ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"single_sign_on_Tips_logout",nil)
-                                                                                     msg:tipStr
+                                                                                     msg:_LogoutTimerStr
                                                                              cancelTitle:NSLocalizedString(@"single_sign_on_exit",nil)
                                                                                  okTitle:NSLocalizedString(@"single_sign_on_login_again",nil) isOkBtnHighlight:YES];
     nextVC.modalPresentationStyle = UIModalPresentationCustom;
@@ -1531,6 +1542,10 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
 {
     _isPwdVCShow = NO;
     [self setShowImgAndVoiceTypeFun:YES];
+    
+    if(_needShowLogoutDelayType){
+        [self LogoutByOtherFun];
+    }
 }
 
 #pragma mark 判断是否为密码界面登