apple 4 éve
szülő
commit
9631988c02

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


+ 2 - 2
ios/JianYuIOS/JianYuIOS.xcworkspace/xcuserdata/apple.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -26,8 +26,8 @@
             filePath = "JianYuIOS/Classes(模块)/JYNewExpViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1496"
-            endingLineNumber = "1496"
+            startingLineNumber = "1497"
+            endingLineNumber = "1497"
             landmarkName = "-popWebView:"
             landmarkType = "7">
          </BreakpointContent>

+ 68 - 44
ios/JianYuIOS/JianYuIOS/AppDelegate.m

@@ -298,42 +298,55 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{
             if ([GlobalData shareInstance].isSearchToLoad) {
                 [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsOne object:nil userInfo:user_info];
             }else {
-                [self waitingToBeClickNoti:user_info withIndex:@"0" isLinke:@"0"];
+                [self waitingToBeClickNoti:user_info withIndex:@"0" isOpenLinke:NO];
             }
         }else if ([menuname isEqualToString:@"subscribe"]) {
-            [GlobalData shareInstance].isClickNotiStatus = YES;
-            tab.selectedIndex = 1;//切换底部栏
-            if ([GlobalData shareInstance].isSubToLoad) {
-                [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsTwo object:nil userInfo:user_info];
+            if ([LXUserDefaults isExistToken]) {
+                [GlobalData shareInstance].isClickNotiStatus = YES;
+                tab.selectedIndex = 1;//切换底部栏
+                if ([GlobalData shareInstance].isSubToLoad) {
+                    [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsTwo object:nil userInfo:user_info];
+                }else {
+                    [self waitingToBeClickNoti:user_info withIndex:@"1" isOpenLinke:NO];
+                }
             }else {
-                [self waitingToBeClickNoti:user_info withIndex:@"1" isLinke:@"0"];
+                [self waitingToBeClickNoti:user_info withIndex:@"1" isOpenLinke:NO];
             }
         }else if ([menuname isEqualToString:@"box"]) {
-            [GlobalData shareInstance].isClickNotiStatus = YES;
-            tab.selectedIndex = 2;//切换底部栏
-            if ([GlobalData shareInstance].isBoxToLoad) {
-                [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsThree object:nil userInfo:user_info];
+            if ([LXUserDefaults isExistToken]) {
+                [GlobalData shareInstance].isClickNotiStatus = YES;
+                tab.selectedIndex = 2;//切换底部栏
+                if ([GlobalData shareInstance].isBoxToLoad) {
+                    [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsThree object:nil userInfo:user_info];
+                }else {
+                    [self waitingToBeClickNoti:user_info withIndex:@"2" isOpenLinke:NO];
+                }
             }else {
-                [self waitingToBeClickNoti:user_info withIndex:@"2" isLinke:@"0"];
+                [self waitingToBeClickNoti:user_info withIndex:@"2" isOpenLinke:NO];
             }
         }else if ([menuname isEqualToString:@"me"]) {
-            [GlobalData shareInstance].isClickNotiStatus = YES;
-            tab.selectedIndex = 3;//切换底部栏
-            if ([GlobalData shareInstance].isMineToLoad) {
-                [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsFour object:nil userInfo:user_info];
+            if ([LXUserDefaults isExistToken]) {
+                [GlobalData shareInstance].isClickNotiStatus = YES;
+                tab.selectedIndex = 3;//切换底部栏
+                if ([GlobalData shareInstance].isMineToLoad) {
+                    [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsFour object:nil userInfo:user_info];
+                }else {
+                    [self waitingToBeClickNoti:user_info withIndex:@"3" isOpenLinke:NO];
+                }
             }else {
-                [self waitingToBeClickNoti:user_info withIndex:@"3" isLinke:@"0"];
+                [self waitingToBeClickNoti:user_info withIndex:@"3" isOpenLinke:NO];
             }
+
         }else if ([menuname isEqualToString:@"other"]) {
             //打开外链
             if ([GlobalData shareInstance].isWakeUpStatus) {
-                [self waitingToBeClickNoti:user_info withIndex:@"0" isLinke:@"1"];
+                [self waitingToBeClickNoti:user_info withIndex:@"0" isOpenLinke:YES];
             }else {
                 [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushLinkUrlMethods object:nil userInfo:user_info];
             }
         }else {
             if ([GlobalData shareInstance].isWakeUpStatus) {
-                [self waitingToBeClickNoti:user_info withIndex:@"0" isLinke:@"0"];
+                [self waitingToBeClickNoti:user_info withIndex:@"0" isOpenLinke:NO];
             }else {
                 [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlOtherMethods object:nil userInfo:user_info];
             }
@@ -369,12 +382,13 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{
     [GlobalData shareInstance].isWakeUpStatus = NO;
 }
 
--(void)waitingToBeClickNoti:(NSDictionary *)userInfo withIndex:(NSString *)index isLinke:(NSString *)links{
+-(void)waitingToBeClickNoti:(NSDictionary *)userInfo withIndex:(NSString *)index isOpenLinke:(BOOL)isLinks {
     NSLog(@"点击通知-延迟监听处理");
+    NSString *linksStr = isLinks?@"0":@"1";
     NSDictionary *dict = @{
         @"userInfo":userInfo,
         @"index":index,
-        @"links":links,
+        @"links":linksStr,
     };
     self.timerClick = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(timerClickMethod:) userInfo:dict repeats:YES];
     [self.timerClick fire];
@@ -384,37 +398,47 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{
     self.timerIndex++;
     NSDictionary *infoDict = [timer userInfo];
     NSInteger index = [infoDict[@"index"] integerValue];
-    NSInteger links = [infoDict[@"index"] integerValue];
+    BOOL isLinks = [infoDict[@"links"] integerValue]==0?NO:YES;
     NSDictionary *userInfo = infoDict[@"userInfo"];
-//    NSLog(@"执行一次:%@~%ld",userInfo,(long)index);
-    if (index==0) {
-        if ([GlobalData shareInstance].isSearchToLoad) {
-            if (links==1) {
-                [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushLinkUrlMethods object:nil userInfo:userInfo];
-            }else {
-                [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsOne object:nil userInfo:userInfo];
+    
+    if ([LXUserDefaults isExistToken]) {//登录正常状态
+        if (index==0) {
+            if ([GlobalData shareInstance].isSearchToLoad) {
+                if (isLinks) {
+                    [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushLinkUrlMethods object:nil userInfo:userInfo];
+                }else {
+                    [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsOne object:nil userInfo:userInfo];
+                }
+                [self clearTimer];
             }
-            [self clearTimer];
-        }
-    }else if (index==1) {
-        if ([GlobalData shareInstance].isSubToLoad) {
-            [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsTwo object:nil userInfo:userInfo];
-            [self clearTimer];
-        }
-    }else if (index==2) {
-        if ([GlobalData shareInstance].isBoxToLoad) {
-            [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsThree object:nil userInfo:userInfo];
-            [self clearTimer];
+        }else if (index==1) {
+            if ([GlobalData shareInstance].isSubToLoad) {
+                [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsTwo object:nil userInfo:userInfo];
+                [self clearTimer];
+            }
+        }else if (index==2) {
+            if ([GlobalData shareInstance].isBoxToLoad) {
+                [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsThree object:nil userInfo:userInfo];
+                [self clearTimer];
+            }
+        }else if (index==3) {
+            if ([GlobalData shareInstance].isMineToLoad) {
+                [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsFour object:nil userInfo:userInfo];
+                [self clearTimer];
+            }
+        }else {
+           
         }
-    }else if (index==3) {
-        if ([GlobalData shareInstance].isMineToLoad) {
-            [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsFour object:nil userInfo:userInfo];
+    }else { //未登录异常状态
+        if ([GlobalData shareInstance].isSearchToLoad) {
+            NSLog(@"未登录状态-等待:%@",infoDict[@"index"]);
+            [[NSNotificationCenter defaultCenter] postNotificationName:LoginIndexTabBar object:nil userInfo:@{@"item_index":infoDict[@"index"]}];
             [self clearTimer];
         }
-    }else {
-       
     }
     
+    
+    
     if (self.timerIndex>10) {
         [self clearTimer];
     }

+ 2 - 1
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYNewExpViewController.m

@@ -1435,11 +1435,12 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
     }
 }
 -(void)openPushUrlMethodsThree:(NSNotification *)notification{
+
     NSDictionary *infoDict = notification.userInfo;
     NSLog(@"%@",infoDict);
     if (!infoDict) {return;}
     NSString * urlStr = [NSString stringWithFormat:@"%@",infoDict[@"url"]];
-    if ([urlStr isEqualToString:kHost]) {return;}
+    if ([urlStr isEqualToString:kHost]||![LXUserDefaults token]) {return;}
     [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlStr]]];
 }
 -(void)openPushLinkUrlMethods:(NSNotification *)notification{

+ 1 - 1
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYNewMineViewController.m

@@ -1451,7 +1451,7 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
     NSLog(@"%@",infoDict);
     if (!infoDict) {return;}
     NSString * urlStr = [NSString stringWithFormat:@"%@",infoDict[@"url"]];
-    if ([urlStr isEqualToString:kHost]) {return;}
+    if ([urlStr isEqualToString:kHost]||![LXUserDefaults token]) {return;}
     [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlStr]]];
 }
 -(void)openPushLinkUrlMethods:(NSNotification *)notification{

+ 1 - 1
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYNewSearchViewController.m

@@ -1870,7 +1870,7 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
     NSLog(@"%@",infoDict);
     if (!infoDict) {return;}
     NSString * urlStr = [NSString stringWithFormat:@"%@",infoDict[@"url"]];
-    if ([urlStr isEqualToString:kHost]) {return;}
+    if ([urlStr isEqualToString:kHost]||![LXUserDefaults token]) {return;}
     [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlStr]]];
 }
 -(void)openPushLinkUrlMethods:(NSNotification *)notification{

+ 1 - 1
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYNewSubViewController.m

@@ -1428,7 +1428,7 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
     if (!infoDict) {return;}
     NSLog(@"点击订阅通知:%@",infoDict);
     NSString * urlStr = [NSString stringWithFormat:@"%@",infoDict[@"url"]];
-    if ([urlStr isEqualToString:kHost]) {return;}
+    if ([urlStr isEqualToString:kHost]||![LXUserDefaults token]) {return;}
     [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlStr]]];
 }
 -(void)openPushLinkUrlMethods:(NSNotification *)notification{

+ 0 - 2
ios/JianYuIOS/JianYuIOS/JYTabBarController.m

@@ -74,12 +74,10 @@
 //    if(tabBarController.tabBar.selectedItem.tag==0) {
 //        return NO;
 //    }
-    
     if (![ZKMethod judegeNetworkIsAvailable]) {//无网络状态-不让点击
         return NO;
     }
     if (![LXUserDefaults isExistToken]) {
-    
         if(tabBarController.tabBar.selectedItem.tag!=0) {
             NSLog(@"没有token前往登录");
             NSString *index = [NSString stringWithFormat:@"%ld",(long)tabBarController.tabBar.selectedItem.tag];

+ 1 - 1
ios/JianYuIOS/JianYuIOS/JYgRPC/JYgRPCClient.m

@@ -88,7 +88,7 @@
 }
 
 -(void)registeredHost:(NSString *)host {
-//    host = @"192.168.3.207:5565";
+
     [GRPCCall useInsecureConnectionsForHost:host];
     self.service =  [PushService serviceWithHost:host];
     NSString *uidStr = [self getUID];