Browse Source

索引相关-调整 , 全局变量修改

zhengkun 3 years ago
parent
commit
d4c625cdd2

+ 12 - 9
ios/JianYuIOS/JianYuIOS/AppDelegate.m

@@ -343,26 +343,26 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{
         }else if ([menuname isEqualToString:@"box"]) {
             if ([LXUserDefaults isExistToken]) {
                 [GlobalData shareInstance].isClickNotiStatus = YES;
-                tab.selectedIndex = 2;//切换底部栏
+                tab.selectedIndex = 3;//切换底部栏
                 if ([GlobalData shareInstance].isBoxToLoad) {
                     [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsThree object:nil userInfo:user_info];
                 }else {
-                    [self waitingToBeClickNoti:user_info withIndex:@"2" isOpenLinke:NO];
+                    [self waitingToBeClickNoti:user_info withIndex:@"3" isOpenLinke:NO];
                 }
             }else {
-                [self waitingToBeClickNoti:user_info withIndex:@"2" isOpenLinke:NO];
+                [self waitingToBeClickNoti:user_info withIndex:@"3" isOpenLinke:NO];
             }
         }else if ([menuname isEqualToString:@"me"]) {
             if ([LXUserDefaults isExistToken]) {
                 [GlobalData shareInstance].isClickNotiStatus = YES;
-                tab.selectedIndex = 3;//切换底部栏
+                tab.selectedIndex = 4;//切换底部栏
                 if ([GlobalData shareInstance].isMineToLoad) {
                     [[NSNotificationCenter defaultCenter] postNotificationName:OpenPushUrlMethodsFour object:nil userInfo:user_info];
                 }else {
-                    [self waitingToBeClickNoti:user_info withIndex:@"3" isOpenLinke:NO];
+                    [self waitingToBeClickNoti:user_info withIndex:@"4" isOpenLinke:NO];
                 }
             }else {
-                [self waitingToBeClickNoti:user_info withIndex:@"3" isOpenLinke:NO];
+                [self waitingToBeClickNoti:user_info withIndex:@"4" isOpenLinke:NO];
             }
 
         }else if ([menuname isEqualToString:@"other"]) {
@@ -497,12 +497,15 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{
             index = @"1";
         }else if ([reddot isEqualToString:@"box"]) {
             [GlobalData shareInstance].boxIsRed = YES;
-            index = @"2";
+            index = @"3";
         }else if ([reddot isEqualToString:@"me"]) {
             [GlobalData shareInstance].mineIsRed = YES;
-            index = @"3";
-        }else {
+            index = @"4";
+        }else if ([reddot isEqualToString:@"mess"]) {
+            [GlobalData shareInstance].messIsRed = YES;
+            index = @"2";
             
+        }else {
             
         }
         

+ 1 - 0
ios/JianYuIOS/JianYuIOS/BaseClass1/GlobalData.h

@@ -26,6 +26,7 @@
 
 @property (nonatomic,assign)BOOL isSearchToLoad;
 @property (nonatomic,assign)BOOL isSubToLoad;
+@property (nonatomic,assign)BOOL isMessToLoad;
 @property (nonatomic,assign)BOOL isBoxToLoad;
 @property (nonatomic,assign)BOOL isMineToLoad;//模块是否加载完毕
 

+ 1 - 0
ios/JianYuIOS/JianYuIOS/BaseClass1/GlobalData.m

@@ -72,6 +72,7 @@
     self.isSubToLoad= NO;
     self.isBoxToLoad= NO;
     self.isMineToLoad = NO;
+    self.isMessToLoad = NO;
     
     self.isReLogin = NO;
     self.isOpen = NO;

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

@@ -490,7 +490,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 
 -(void)bottomThreeListening {
-    if(self.tabBarController.selectedIndex == 2) {
+    if(self.tabBarController.selectedIndex == 3) {
         [self judgeIsHiddenBottom];
     }
 }
@@ -740,7 +740,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 }
 
 -(void)jsHiddenBottom:(NSDictionary *)dict{
-    if(self.tabBarController.selectedIndex == 2) {
+    if(self.tabBarController.selectedIndex == 3) {
         if([[NSString stringWithFormat:@"%@",dict[@"hidden"]] integerValue]==0) {
             [self hideTabBar];
             [self hiddenMethodTabBar];
@@ -810,7 +810,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
     }
     if([menu isEqualToString:@"my"]) {
         kMainQueue(^{
-            [self.tabBarController.tabBar hideBadgeOnItemIndex:3];
+            [self.tabBarController.tabBar hideBadgeOnItemIndex:4];
         });
     }
 }
@@ -824,7 +824,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
     }
     if([menu isEqualToString:@"my"]) {
         kMainQueue(^{
-            [self.tabBarController.tabBar showBadgeOnItemIndex:3];
+            [self.tabBarController.tabBar showBadgeOnItemIndex:4];
         });
     }
 }
@@ -1146,7 +1146,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 //切换模块
 -(void)jsSkipAppointTab:(NSDictionary *)dict {
-    if(self.tabBarController.selectedIndex == 2) {
+    if(self.tabBarController.selectedIndex == 3) {
         AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
         JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
         NSString *name = [NSString stringWithFormat:@"%@",dict[@"name"]];
@@ -1166,7 +1166,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 //刷新模块页面
 -(void)jsRefreshAppointTab:(NSDictionary *)dict {
-    if(self.tabBarController.selectedIndex == 2) {
+    if(self.tabBarController.selectedIndex == 3) {
         [[NSNotificationCenter defaultCenter] postNotificationName:JYRefreshMenusView object:nil userInfo:dict];
     }
 }
@@ -1174,7 +1174,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 #pragma mark   *****其他方法
 -(void)judgeIsHiddenBottom {
-    if(self.tabBarController.selectedIndex == 2) {
+    if(self.tabBarController.selectedIndex == 3) {
         NSString *current_url = [self stringByEvaluatingJavaScriptFromString:@"document.location.href"];
         
         if([current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/jylab/index",kHost]]
@@ -1445,7 +1445,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 #pragma mark  **** 通知相关方法
 -(void)openPushUrlOtherMethods:(NSNotification *)notification{
-    if(self.tabBarController.selectedIndex == 2) {
+    if(self.tabBarController.selectedIndex == 3) {
         NSDictionary *infoDict = notification.userInfo;
         NSLog(@"%@",infoDict);
         if (!infoDict) {return;}
@@ -1469,13 +1469,13 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
     if (!infoDict) {return;}
     NSString * urlStr = [NSString stringWithFormat:@"%@",infoDict[@"url"]];
     if ([urlStr isEqualToString:kHost]) {return;}
-    if (self.tabBarController.selectedIndex == 2) {
+    if (self.tabBarController.selectedIndex == 3) {
         [self JsOpenExternalLink:@{@"url":urlStr,@"title":@"消息通知"}];
     }
 }
 
 -(void)alipayWXpayStatus:(NSNotification *)notification{
-     if(self.tabBarController.selectedIndex == 2) {
+     if(self.tabBarController.selectedIndex == 3) {
          NSString * status = [notification object];
          [self performSelector:@selector(payStatus:) withObject:status afterDelay:2];
      }
@@ -1484,7 +1484,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 {
     //目前延时两秒
     NSLog(@"支付状态:%@",status);
-    if(self.tabBarController.selectedIndex == 2) {
+    if(self.tabBarController.selectedIndex == 3) {
         [self isExitCallToJS:[NSString stringWithFormat:@"payCallBack('%@')", status] withMethodName:@"payCallBack"];
     }
     
@@ -1492,7 +1492,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 // 再次加载页面
 -(void)notNetReloadWebVIew:(NSNotification *)notification{
-    if(self.tabBarController.selectedIndex == 2) {
+    if(self.tabBarController.selectedIndex == 3) {
         if (![self.webView canGoBack]) {
             [self webViewFirstRequest];
         }else{
@@ -1505,7 +1505,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 // 返回上一页面- 防止
 -(void)popWebView:(NSNotification *)notification{
-    if(self.tabBarController.selectedIndex == 2) {
+    if(self.tabBarController.selectedIndex == 3) {
         if ([self.webView canGoBack]) {
             [self.webView goBack];
         }
@@ -1542,7 +1542,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 -(void)jyReceiveNewsRedPoint:(NSNotification *)notificaition {
     NSDictionary *dict = notificaition.userInfo;
-    if(self.tabBarController.selectedIndex == 2) {
+    if(self.tabBarController.selectedIndex == 3) {
         NSString *textJS =  [NSString stringWithFormat:@"afterReceivePushMessage('%@','%@')",dict[@"typeMsg"],dict[@"url"]];
         [self isExitCallToJS:textJS withMethodName:@"afterReceivePushMessage"];
     }
@@ -1564,7 +1564,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 //刷新页面相关
 -(void)refreshNonCurVC:(NSNotification *)notificaition{
-    if(self.tabBarController.selectedIndex != 2) {
+    if(self.tabBarController.selectedIndex != 3) {
         [self webViewFirstRequest];
     }
 }
@@ -1578,7 +1578,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 //内购相关
 -(void)receiptData:(NSNotification *)notificaition{
-    if(self.tabBarController.selectedIndex == 2) {
+    if(self.tabBarController.selectedIndex == 3) {
         NSDictionary *infoDict = notificaition.userInfo;
         if (infoDict) {
             NSString *receipt = [NSString stringWithFormat:@"%@", infoDict[@"receipt"]];
@@ -1589,7 +1589,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 #pragma mark   ****粘贴板相关-梳理
 -(void)updateClipboard:(NSNotification *)notificaition{
-    if(self.tabBarController.selectedIndex == 2) {
+    if(self.tabBarController.selectedIndex == 3) {
         NSString *current_url = [self stringByEvaluatingJavaScriptFromString:@"document.location.href"];
         NSDictionary *dict = notificaition.userInfo;
         NSString *content = [NSString stringWithFormat:@"%@",dict[@"content"]];
@@ -1602,7 +1602,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 }
     
 -(void)openTheClipboard:(NSNotification *)notificaition{
-    if(self.tabBarController.selectedIndex == 2) {
+    if(self.tabBarController.selectedIndex == 3) {
         NSLog(@"菜单三打开指定粘贴板url");
         NSDictionary *dict = notificaition.userInfo;
         NSString *tmpUrl = [NSString stringWithFormat:@"%@%@", kHost, dict[@"url"]];

+ 5 - 5
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYNewMessViewController.m

@@ -481,7 +481,7 @@ NSString *const new_AesKey_5 = @"mGlAgnIBB8bx2nch";
     [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(bottomTwoListening) userInfo:nil repeats:YES];
 
     
-    [GlobalData shareInstance].isSubToLoad = YES;
+    [GlobalData shareInstance].isMessToLoad = YES;
 }
 -(void)bottomTwoListening {
     if(self.tabBarController.selectedIndex == 2) {
@@ -495,8 +495,8 @@ NSString *const new_AesKey_5 = @"mGlAgnIBB8bx2nch";
    
     NSLog(@"-----页面加载完成%@",webView.URL.absoluteString);
     //正常的网页加载
-    if (![GlobalData shareInstance].isSubToLoad) {
-        [GlobalData shareInstance].isSubToLoad = YES;
+    if (![GlobalData shareInstance].isMessToLoad) {
+        [GlobalData shareInstance].isMessToLoad = YES;
     }
     [self judgeIsHiddenBottom];//是否隐藏
     [self removeNoNetViews];
@@ -812,7 +812,7 @@ NSString *const new_AesKey_5 = @"mGlAgnIBB8bx2nch";
     }
     if([menu isEqualToString:@"my"]) {
         kMainQueue(^{
-            [self.tabBarController.tabBar hideBadgeOnItemIndex:3];
+            [self.tabBarController.tabBar hideBadgeOnItemIndex:4];
         });
     }
 }
@@ -826,7 +826,7 @@ NSString *const new_AesKey_5 = @"mGlAgnIBB8bx2nch";
     }
     if([menu isEqualToString:@"my"]) {
         kMainQueue(^{
-            [self.tabBarController.tabBar showBadgeOnItemIndex:3];
+            [self.tabBarController.tabBar showBadgeOnItemIndex:4];
         });
     }
 }

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

@@ -498,7 +498,7 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 }
 
 -(void)bottomFourListening {
-    if(self.tabBarController.selectedIndex == 3) {
+    if(self.tabBarController.selectedIndex == 4) {
         [self judgeIsHiddenBottom];
     }
 }
@@ -747,7 +747,7 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 }
 
 -(void)jsHiddenBottom:(NSDictionary *)dict{
-    if(self.tabBarController.selectedIndex == 3) {
+    if(self.tabBarController.selectedIndex == 4) {
         if([[NSString stringWithFormat:@"%@",dict[@"hidden"]] integerValue]==0) {
             [self hideTabBar];
             [self hiddenMethodTabBar];
@@ -819,7 +819,7 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
     }
     if([menu isEqualToString:@"my"]) {
         kMainQueue(^{
-            [self.tabBarController.tabBar hideBadgeOnItemIndex:3];
+            [self.tabBarController.tabBar hideBadgeOnItemIndex:4];
         });
     }
 }
@@ -833,7 +833,7 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
     }
     if([menu isEqualToString:@"my"]) {
         kMainQueue(^{
-            [self.tabBarController.tabBar showBadgeOnItemIndex:3];
+            [self.tabBarController.tabBar showBadgeOnItemIndex:4];
         });
     }
 }
@@ -1168,7 +1168,7 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 }
 //切换模块
 -(void)jsSkipAppointTab:(NSDictionary *)dict {
-    if(self.tabBarController.selectedIndex == 3) {
+    if(self.tabBarController.selectedIndex == 4) {
         AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
         JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
         NSString *name = [NSString stringWithFormat:@"%@",dict[@"name"]];
@@ -1188,14 +1188,14 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 
 //刷新模块页面
 -(void)jsRefreshAppointTab:(NSDictionary *)dict {
-    if(self.tabBarController.selectedIndex == 3) {
+    if(self.tabBarController.selectedIndex == 4) {
         [[NSNotificationCenter defaultCenter] postNotificationName:JYRefreshMenusView object:nil userInfo:dict];
     }
 }
 
 #pragma mark   *****其他方法
 -(void)judgeIsHiddenBottom {
-    if(self.tabBarController.selectedIndex == 3) {
+    if(self.tabBarController.selectedIndex == 4) {
         NSString *current_url = [self stringByEvaluatingJavaScriptFromString:@"document.location.href"];
         
         if([current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/free/me",kHost]]){
@@ -1461,7 +1461,7 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 
 #pragma mark  **** 通知相关方法
 -(void)openPushUrlOtherMethods:(NSNotification *)notification{
-    if(self.tabBarController.selectedIndex == 3) {
+    if(self.tabBarController.selectedIndex == 4) {
         NSDictionary *infoDict = notification.userInfo;
         NSLog(@"%@",infoDict);
         if (!infoDict) {return;}
@@ -1484,13 +1484,13 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
     if (!infoDict) {return;}
     NSString * urlStr = [NSString stringWithFormat:@"%@",infoDict[@"url"]];
     if ([urlStr isEqualToString:kHost]) {return;}
-    if (self.tabBarController.selectedIndex == 3) {
+    if (self.tabBarController.selectedIndex == 4) {
         [self JsOpenExternalLink:@{@"url":urlStr,@"title":@"消息通知"}];
     }
 }
 
 -(void)alipayWXpayStatus:(NSNotification *)notification{
-     if(self.tabBarController.selectedIndex == 3) {
+     if(self.tabBarController.selectedIndex == 4) {
          NSString * status = [notification object];
          [self performSelector:@selector(payStatus:) withObject:status afterDelay:2];
      }
@@ -1498,7 +1498,7 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 -(void)payStatus:(NSString *)status
 {
     NSLog(@"支付状态:%@",status);//目前延时两秒
-    if(self.tabBarController.selectedIndex == 3) {
+    if(self.tabBarController.selectedIndex == 4) {
         [self isExitCallToJS:[NSString stringWithFormat:@"payCallBack('%@')", status] withMethodName:@"payCallBack"];
     }
     
@@ -1506,7 +1506,7 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 
 // 再次加载页面
 -(void)notNetReloadWebVIew:(NSNotification *)notification{
-    if(self.tabBarController.selectedIndex == 3) {
+    if(self.tabBarController.selectedIndex == 4) {
         if (![self.webView canGoBack]) {
             [self webViewFirstRequest];
         }else{
@@ -1517,7 +1517,7 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 
 // 返回上一页面- 防止
 -(void)popWebView:(NSNotification *)notification{
-    if(self.tabBarController.selectedIndex == 3) {
+    if(self.tabBarController.selectedIndex == 4) {
         if ([self.webView canGoBack]) {
             [self.webView goBack];
         }
@@ -1554,7 +1554,7 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 
 -(void)jyReceiveNewsRedPoint:(NSNotification *)notificaition {
     NSDictionary *dict = notificaition.userInfo;
-    if(self.tabBarController.selectedIndex == 3) {
+    if(self.tabBarController.selectedIndex == 4) {
         NSString *textJS =  [NSString stringWithFormat:@"afterReceivePushMessage('%@','%@')",dict[@"typeMsg"],dict[@"url"]];
         [self isExitCallToJS:textJS withMethodName:@"afterReceivePushMessage"];
     }
@@ -1575,7 +1575,7 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 
 //刷新页面相关
 -(void)refreshNonCurVC:(NSNotification *)notificaition{
-    if(self.tabBarController.selectedIndex != 3) {
+    if(self.tabBarController.selectedIndex != 4) {
         [self webViewFirstRequest];
     }
 }
@@ -1589,7 +1589,7 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 
 //内购相关
 -(void)receiptData:(NSNotification *)notificaition{
-    if(self.tabBarController.selectedIndex == 3) {
+    if(self.tabBarController.selectedIndex == 4) {
         NSDictionary *infoDict = notificaition.userInfo;
         if (infoDict) {
             NSString *receipt = [NSString stringWithFormat:@"%@", infoDict[@"receipt"]];
@@ -1600,7 +1600,7 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 
 #pragma mark   ****粘贴板相关-梳理
 -(void)updateClipboard:(NSNotification *)notificaition{
-    if(self.tabBarController.selectedIndex == 3) {
+    if(self.tabBarController.selectedIndex == 4) {
         NSString *current_url = [self stringByEvaluatingJavaScriptFromString:@"document.location.href"];
         NSDictionary *dict = notificaition.userInfo;
         NSString *content = [NSString stringWithFormat:@"%@",dict[@"content"]];
@@ -1613,7 +1613,7 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 }
     
 -(void)openTheClipboard:(NSNotification *)notificaition{
-    if(self.tabBarController.selectedIndex == 3) {
+    if(self.tabBarController.selectedIndex == 4) {
         NSLog(@"菜单四打开指定粘贴板url");
         NSDictionary *dict = notificaition.userInfo;
         NSString *tmpUrl = [NSString stringWithFormat:@"%@%@", kHost, dict[@"url"]];

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

@@ -705,12 +705,12 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
                 //显示
                 [GlobalData shareInstance].mineIsRed = YES;
                 kMainQueue(^{
-                    [self.tabBarController.tabBar showBadgeOnItemIndex:3];
+                    [self.tabBarController.tabBar showBadgeOnItemIndex:4];
                 });
             }else {
                 [GlobalData shareInstance].mineIsRed = NO;
                 kMainQueue(^{
-                    [self.tabBarController.tabBar hideBadgeOnItemIndex:3];
+                    [self.tabBarController.tabBar hideBadgeOnItemIndex:4];
                 });
             }
             
@@ -748,6 +748,7 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
         [GlobalData shareInstance].isOpen = YES;
         [self performSelector:@selector(pasteboard) withObject:nil afterDelay:1.5];
     }
+    
 }
 -(void)pasteboard {
     NSString  *content = [UIPasteboard generalPasteboard].string;
@@ -1058,7 +1059,7 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
     }
     if([menu isEqualToString:@"my"]) {
         kMainQueue(^{
-            [self.tabBarController.tabBar hideBadgeOnItemIndex:3];
+            [self.tabBarController.tabBar hideBadgeOnItemIndex:4];
         });
     }
 }
@@ -1072,7 +1073,7 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
     }
     if([menu isEqualToString:@"my"]) {
         kMainQueue(^{
-            [self.tabBarController.tabBar showBadgeOnItemIndex:3];
+            [self.tabBarController.tabBar showBadgeOnItemIndex:4];
         });
     }
 }

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

@@ -756,7 +756,7 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
 
 //js方法登录成功
 -(void)jsLoginSuccess:(NSDictionary *)dict {
-    NSLog(@"sub登录成功提示");
+    NSLog(@"mes登录成功提示");
     NSString *status = [NSString stringWithFormat:@"%@",dict[@"status"]];
     [GlobalData shareInstance].isReLogin = YES;
     if([status isEqualToString:@"S"]) {
@@ -812,7 +812,7 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
     }
     if([menu isEqualToString:@"my"]) {
         kMainQueue(^{
-            [self.tabBarController.tabBar hideBadgeOnItemIndex:3];
+            [self.tabBarController.tabBar hideBadgeOnItemIndex:4];
         });
     }
 }
@@ -826,7 +826,7 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
     }
     if([menu isEqualToString:@"my"]) {
         kMainQueue(^{
-            [self.tabBarController.tabBar showBadgeOnItemIndex:3];
+            [self.tabBarController.tabBar showBadgeOnItemIndex:4];
         });
     }
 }

+ 1 - 1
ios/JianYuIOS/JianYuIOS/UITabBar+badge.m

@@ -23,7 +23,7 @@
     CGRect tabFrame = self.frame;
     
     //确定小红点的位置
-    float percentX = (index +0.6) * 0.25;
+    float percentX = (index +0.6) * 0.2;
     CGFloat x = ceilf(percentX * tabFrame.size.width);
     CGFloat y = ceilf(0.1 * tabFrame.size.height);
     badgeView.frame = CGRectMake(x, y, 8, 8);