Эх сурвалжийг харах

grpc透传消息,注释底部栏判断

zhengkun 1 жил өмнө
parent
commit
8b8bdda408

BIN
ios/JianYuIOS/JianYuIOS.xcworkspace/xcuserdata/zhengkun.xcuserdatad/UserInterfaceState.xcuserstate


+ 0 - 3
ios/JianYuIOS/JianYuIOS/Classes(新模块)/JYBaseViewController.m

@@ -1787,9 +1787,6 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
 
 // 收到退出登录消息
 -(void)loginOut:(NSNotification *)notification{
-    if([notification.userInfo[@"item_index"] integerValue]!=0) {
-        return;
-    }
     NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/login?back=index&isios=t&flag=kicked"];
     url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
     [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];

+ 3 - 12
ios/JianYuIOS/JianYuIOS/JYgRPC/JYgRPCClient.m

@@ -169,20 +169,13 @@
     int msgType =  [pushDict[@"msgType"] intValue];
     if (msgType==2) {//透传退出登录
         //1、登录 2、判断url是否存在-跳转 3、不存在url判断类型
-        
-        
-        
-        
-        
-        
-        
         NSString *type = [NSString stringWithFormat:@"%@",pushDict[@"type"]];
         if ([LXUserDefaults isExistToken] && [type isEqualToString:@"signOut"]) {
-            AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
-            JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
+//            AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+//            JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
 //            NSLog(@"%lu",(unsigned long)tab.selectedIndex);
             //判断第几个底部栏
-            [[NSNotificationCenter defaultCenter] postNotificationName:kLoginOut object:[NSString stringWithFormat:@"%@",pushDict[@"info"][@"body"]] userInfo:@{@"item_index":[NSString stringWithFormat:@"%lu",(unsigned long)tab.selectedIndex]}];
+            [[NSNotificationCenter defaultCenter] postNotificationName:kLoginOut object:[NSString stringWithFormat:@"%@",pushDict[@"info"][@"body"]] userInfo:@{}];
         }
         
     }else if (msgType==1){
@@ -219,8 +212,6 @@
     
 }
 
-
-
 //推送回调
 -(void)grpcCallbackServer:(NSDictionary *)dict {
     MsgPushReq *req = [[MsgPushReq alloc]init];