Browse Source

备份tabbar

apple 6 years ago
parent
commit
59e2a457ec

+ 0 - 24
ios/JianYuIOS/JianYuIOS.xcodeproj/project.pbxproj

@@ -14,10 +14,6 @@
 		1880371F2193EB25006F9D7B /* JYMineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 188037172193EB25006F9D7B /* JYMineViewController.m */; };
 		188037202193EB25006F9D7B /* JYSubViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1880371B2193EB25006F9D7B /* JYSubViewController.m */; };
 		188037212193EB25006F9D7B /* JYExpViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1880371C2193EB25006F9D7B /* JYExpViewController.m */; };
-		188C47C5219577CF00EE84C7 /* ViewController1.m in Sources */ = {isa = PBXBuildFile; fileRef = 188C47C4219577CF00EE84C7 /* ViewController1.m */; };
-		188C47D12195873900EE84C7 /* ViewController2.m in Sources */ = {isa = PBXBuildFile; fileRef = 188C47D02195873900EE84C7 /* ViewController2.m */; };
-		188C47D42195874100EE84C7 /* ViewController3.m in Sources */ = {isa = PBXBuildFile; fileRef = 188C47D32195874100EE84C7 /* ViewController3.m */; };
-		188C47D72195874900EE84C7 /* ViewController4.m in Sources */ = {isa = PBXBuildFile; fileRef = 188C47D62195874900EE84C7 /* ViewController4.m */; };
 		9ADF6A094C6E01A55F2E47CC /* libPods-JianYuIOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CA962A24EED00910F83394E /* libPods-JianYuIOS.a */; };
 		C519972C2020238D007946E8 /* LXUserDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = C51997232020238D007946E8 /* LXUserDefaults.m */; };
 		C519972D2020238D007946E8 /* LXMD5.m in Sources */ = {isa = PBXBuildFile; fileRef = C51997242020238D007946E8 /* LXMD5.m */; };
@@ -79,14 +75,6 @@
 		1880371B2193EB25006F9D7B /* JYSubViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JYSubViewController.m; sourceTree = "<group>"; };
 		1880371C2193EB25006F9D7B /* JYExpViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JYExpViewController.m; sourceTree = "<group>"; };
 		1880371D2193EB25006F9D7B /* JYSearchViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JYSearchViewController.h; sourceTree = "<group>"; };
-		188C47C3219577CF00EE84C7 /* ViewController1.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController1.h; sourceTree = "<group>"; };
-		188C47C4219577CF00EE84C7 /* ViewController1.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController1.m; sourceTree = "<group>"; };
-		188C47CF2195873900EE84C7 /* ViewController2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController2.h; sourceTree = "<group>"; };
-		188C47D02195873900EE84C7 /* ViewController2.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController2.m; sourceTree = "<group>"; };
-		188C47D22195874100EE84C7 /* ViewController3.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController3.h; sourceTree = "<group>"; };
-		188C47D32195874100EE84C7 /* ViewController3.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController3.m; sourceTree = "<group>"; };
-		188C47D52195874900EE84C7 /* ViewController4.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController4.h; sourceTree = "<group>"; };
-		188C47D62195874900EE84C7 /* ViewController4.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController4.m; sourceTree = "<group>"; };
 		775098970477D1E68FB48E59 /* Pods-JianYuIOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JianYuIOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-JianYuIOS/Pods-JianYuIOS.debug.xcconfig"; sourceTree = "<group>"; };
 		C51997222020238D007946E8 /* LXViewControllerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LXViewControllerManager.h; sourceTree = "<group>"; };
 		C51997232020238D007946E8 /* LXUserDefaults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LXUserDefaults.m; sourceTree = "<group>"; };
@@ -172,14 +160,6 @@
 				1880371C2193EB25006F9D7B /* JYExpViewController.m */,
 				188037182193EB25006F9D7B /* JYMineViewController.h */,
 				188037172193EB25006F9D7B /* JYMineViewController.m */,
-				188C47C3219577CF00EE84C7 /* ViewController1.h */,
-				188C47C4219577CF00EE84C7 /* ViewController1.m */,
-				188C47CF2195873900EE84C7 /* ViewController2.h */,
-				188C47D02195873900EE84C7 /* ViewController2.m */,
-				188C47D22195874100EE84C7 /* ViewController3.h */,
-				188C47D32195874100EE84C7 /* ViewController3.m */,
-				188C47D52195874900EE84C7 /* ViewController4.h */,
-				188C47D62195874900EE84C7 /* ViewController4.m */,
 			);
 			path = "Classes(模块)";
 			sourceTree = "<group>";
@@ -529,17 +509,13 @@
 				C519972D2020238D007946E8 /* LXMD5.m in Sources */,
 				C555EC282047DC5E0084642F /* LXNetworkManager.m in Sources */,
 				C519972F2020238D007946E8 /* LXDataBaseManager.m in Sources */,
-				188C47D72195874900EE84C7 /* ViewController4.m in Sources */,
-				188C47D12195873900EE84C7 /* ViewController2.m in Sources */,
 				C550BEFA20180AF000F0BC2A /* main.m in Sources */,
 				188036FC2193EA09006F9D7B /* JYTabBarController.m in Sources */,
 				188036FB2193EA09006F9D7B /* JYNavigationController.m in Sources */,
-				188C47C5219577CF00EE84C7 /* ViewController1.m in Sources */,
 				C5321C76202BD89B0023CFEA /* LXProgressView.m in Sources */,
 				C519972C2020238D007946E8 /* LXUserDefaults.m in Sources */,
 				C5FE4B5720468BC900CC8A2F /* NoNetView.m in Sources */,
 				C519972E2020238D007946E8 /* LXViewControllerManager.m in Sources */,
-				188C47D42195874100EE84C7 /* ViewController3.m in Sources */,
 				188037202193EB25006F9D7B /* JYSubViewController.m in Sources */,
 				188037212193EB25006F9D7B /* JYExpViewController.m in Sources */,
 				1880371F2193EB25006F9D7B /* JYMineViewController.m in Sources */,

+ 1 - 1
ios/JianYuIOS/JianYuIOS.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/JianYuIOS.xcscheme

@@ -85,7 +85,7 @@
          <EnvironmentVariable
             key = "OS_ACTIVITY_MODE"
             value = "disable"
-            isEnabled = "NO">
+            isEnabled = "YES">
          </EnvironmentVariable>
       </EnvironmentVariables>
       <AdditionalOptions>

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


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

@@ -3,38 +3,6 @@
    type = "0"
    version = "2.0">
    <Breakpoints>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "JianYuIOS/ViewController.m"
-            timestampString = "556165451.798265"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "508"
-            endingLineNumber = "508"
-            landmarkName = "-jsShare:title:content:link:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "JianYuIOS/AppDelegate.m"
-            timestampString = "563448151.15987"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "415"
-            endingLineNumber = "415"
-            landmarkName = "-application:handleOpenURL:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
@@ -42,28 +10,12 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "JianYuIOS/Classes&#xff08;&#x6a21;&#x5757;&#xff09;/JYMineViewController.m"
-            timestampString = "563446397.612505"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "277"
-            endingLineNumber = "277"
-            landmarkName = "-loginOut:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "JianYuIOS/AppDelegate.m"
-            timestampString = "563448151.160089"
+            timestampString = "563707136.916556"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "407"
-            endingLineNumber = "407"
-            landmarkName = "-networkDidReceiveMessage:"
+            startingLineNumber = "817"
+            endingLineNumber = "817"
+            landmarkName = "-jsLoginSuccess:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 3 - 2
ios/JianYuIOS/JianYuIOS/BaseClass1/PrefixHeader.pch

@@ -14,6 +14,7 @@
 #import "LXDataBaseManager.h"
 #import "LXProgressView.h"
 #import "LXNetworkManager.h"
+#import "AppDelegate.h"
 
 #define LocalStr_None @""//空字符串
 #define KIsiPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
@@ -92,10 +93,10 @@ _Pragma("clang diagnostic pop")\
 #define kLoginOut @"kLoginOut"
 #define kNewsTable @"kNewsTable"
 
-#define kHost @"https://www.jianyu360.com/"
+//#define kHost @"https://www.jianyu360.com/"
 
 //#define kHost @"http://weblxl.qmx.top/" //小璐
-//#define kHost @"http://webws.qmx.top/" //王山
+#define kHost @"http://webws.qmx.top/" //王山
 //#define kHost @"http://webwcj.qmx.top/"//王传近
 //#define kHost @"http://w2blmjy.qmx.top/"//测试环境
 //#define kHost @"123.56.103.12/"

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

@@ -317,8 +317,11 @@ NSString *const AesKey_2 = @"mGlAgnIBB8bx2nch";
 
 -(void)dealTabBar
 {
-    NSLog(@"刷新第二个页面");
-    [self webViewFirstRequest];
+    NSLog(@"刷新第三个页面");
+    kMainQueue(^{
+        
+        [self webViewFirstRequest];
+    });
 }
 
 -(void)judgeIsHidden

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

@@ -7,6 +7,7 @@
 //
 
 #import "JYMineViewController.h"
+#import "JYTabBarController.h"
 
 @protocol JYMineViewControllerJSExport<JSExport>
 
@@ -36,8 +37,9 @@ JSExportAs(getCipherText, -(NSString *)jsGGetCipherText:(NSString *)phone);
 
 JSExportAs(business, -(NSInteger)jsBusiness:(NSInteger)shooID shopType:(NSInteger )shopType);
 
+JSExportAs(loginSuccess, -(void)jsLoginSuccess:(NSString*)status);
 
-
+JSExportAs(backUrl, -(void)jsBackUrl:(NSString*)str);
 
 @end
 
@@ -323,8 +325,11 @@ NSString *const AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 -(void)dealTabBar
 {
-    NSLog(@"刷新第二个页面");
-    [self webViewFirstRequest];
+    NSLog(@"刷新第四个页面");
+    kMainQueue(^{
+        [self webViewFirstRequest];
+    });
+    
 }
 
 -(void)judgeIsHidden
@@ -574,6 +579,7 @@ NSString *const AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 // 退出时 清空用户数据
 -(void)jsRemoveUserToken:(NSString *)str{
+    NSLog(@"Mine移除数据");
     [LXUserDefaults clearAll];
     //    [[LXDataBaseManager shareDataBaseManager] clearAll];
     
@@ -780,6 +786,52 @@ NSString *const AesKey_3 = @"mGlAgnIBB8bx2nch";
     free(encryptedBytes);
     return nil;
 }
+
+
+
+-(void)jsBackUrl:(NSString*)str
+{
+    NSLog(@"Mine返回首页%@",str);
+    if([str isEqualToString:@"H"]) {
+        //测试返回首页
+        kMainQueue(^{
+            AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+            JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
+            tab.selectedIndex = 0;
+            
+            [[NSNotificationCenter defaultCenter] postNotificationName:@"changeItems" object:nil userInfo:@{@"item_index":@"0"}];
+            
+            [self dealTabBar];
+        });
+     
+    }
+ 
+    
+}
+
+
+
+-(void)jsLoginSuccess:(NSString*)status
+{
+    NSLog(@"Mine登录成功提示");
+    if([status isEqualToString:@"S"]) {
+        kMainQueue(^{
+            AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+            JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
+            tab.selectedIndex = 0;
+            
+            [[NSNotificationCenter defaultCenter] postNotificationName:@"changeItems" object:nil userInfo:@{@"item_index":@"5"}];
+        });
+    }else {
+    
+    }
+}
+
+
+
+
+
+
 /*
  #pragma mark - Navigation
  

+ 39 - 9
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYSearchViewController.m

@@ -7,6 +7,7 @@
 //
 
 #import "JYSearchViewController.h"
+#import "JYTabBarController.h"
 
 @protocol JYSearchViewControllerJSExport<JSExport>
 
@@ -43,6 +44,9 @@ JSExportAs(hiddenBottom, -(void)jsHiddenBottom:(NSString*)hidden);
 
 JSExportAs(loginSuccess, -(void)jsLoginSuccess:(NSString*)status);
 
+JSExportAs(backUrl, -(void)jsBackUrl:(NSString*)str);
+
+
 @end
 
 
@@ -312,25 +316,40 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
     
 }
 
+//js返回首页
+-(void)jsBackUrl:(NSString*)str
+{
+    NSLog(@"search返回首页,search返回首页,search返回首页,search返回首页,search返回首页,search返回首页");
+    if([str isEqualToString:@"H"]) {
+        pushIndex = 0;
+        [self webViewFirstRequest];
+    }
+    
+    
+}
 
 //js方法登录成功
 -(void)jsLoginSuccess:(NSString*)status
 {
-    NSLog(@"登录成功提示");
+    NSLog(@"Search登录成功提示;;;%@当前下标:%ld",status,(long)pushIndex);
     if([status isEqualToString:@"S"]) {
-//        NSString *index = [NSString stringWithFormat:@"%ld",pushIndex];
-//        [[NSNotificationCenter defaultCenter] postNotificationName:@"isLoginTabBar" object:nil userInfo:@{@"item_index":@"0"}];
-        //搜索页面过来  我刷新
-        
-        
         if(pushIndex!=0) {
-            //tabbar点击登录
+            NSLog(@"SSSSSS");
             NSString *index = [NSString stringWithFormat:@"%ld",pushIndex];
             [[NSNotificationCenter defaultCenter] postNotificationName:@"changeItems" object:nil userInfo:@{@"item_index":index}];
+            kMainQueue(^{
+                AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+                JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
+                tab.selectedIndex = pushIndex;
+            });
+            
+            
+            
             pushIndex = 0;
         }else {
-            [self.webView reload];
+            [self webViewFirstRequest];
         }
+        
     }else if ([status isEqualToString:@""]) {
         //手动tabbar点击
         NSString *index = [NSString stringWithFormat:@"%ld",pushIndex];
@@ -343,12 +362,20 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
 
 -(void)dealTabBar
 {
+    NSLog(@"刷新第一个页面");
+    kMainQueue(^{
+//        [self showTabBar];
+//        self.webView.frame = CGRectMake(0, -STATUS_BAR_HEIGHT, WIDTH, HEIGHT-TAB_BAR_HEIGHT+STATUS_BAR_HEIGHT);
+        [self webViewFirstRequest];
+    });
+
+    
     
 }
 
 
 - (void)hideTabBar {
-    
+    NSLog(@"隐藏tabbar");
     kMainQueue(^{
     if (self.tabBarController.tabBar.hidden == YES) {
         return;
@@ -383,7 +410,10 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
 
 -(void)jsHiddenBottom:(NSString *)hidden
 {
+    
+    NSLog(@"让我展示隐藏bottom==%@",hidden);
     if([hidden integerValue]==0) {
+        
         [self hideTabBar];
         self.webView.frame = CGRectMake(0, -STATUS_BAR_HEIGHT, WIDTH, HEIGHT+STATUS_BAR_HEIGHT);
     }else {

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

@@ -319,7 +319,9 @@ NSString *const AesKey_1 = @"mGlAgnIBB8bx2nch";
 -(void)dealTabBar
 {
     NSLog(@"刷新第二个页面");
-    [self webViewFirstRequest];
+    kMainQueue(^{
+        [self webViewFirstRequest];
+    });
 }
 
 -(void)judgeIsHidden

+ 0 - 13
ios/JianYuIOS/JianYuIOS/Classes(模块)/ViewController1.h

@@ -1,13 +0,0 @@
-//
-//  ViewController1.h
-//  JianYuIOS
-//
-//  Created by apple on 2018/11/9.
-//  Copyright © 2018年 lixianglan. All rights reserved.
-//
-
-#import "ViewController.h"
-
-@interface ViewController1 : ViewController
-
-@end

+ 0 - 49
ios/JianYuIOS/JianYuIOS/Classes(模块)/ViewController1.m

@@ -1,49 +0,0 @@
-//
-//  ViewController1.m
-//  JianYuIOS
-//
-//  Created by apple on 2018/11/9.
-//  Copyright © 2018年 lixianglan. All rights reserved.
-//
-
-#import "ViewController1.h"
-
-@interface ViewController1 ()
-
-@end
-
-@implementation ViewController1
-
--(void)viewWillAppear:(BOOL)animated
-{
-    [super viewWillAppear:animated];
-    [self.navigationController setNavigationBarHidden:YES animated:animated];
-}
-
--(void)viewDidAppear:(BOOL)animated
-{
-    [super viewDidAppear:animated];
-//    [self.view addSubview:self.webView];
-}
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    // Do any additional setup after loading the view.
-    
-}
-
-- (void)didReceiveMemoryWarning {
-    [super didReceiveMemoryWarning];
-    // Dispose of any resources that can be recreated.
-}
-
-/*
-#pragma mark - Navigation
-
-// In a storyboard-based application, you will often want to do a little preparation before navigation
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
-    // Get the new view controller using [segue destinationViewController].
-    // Pass the selected object to the new view controller.
-}
-*/
-
-@end

+ 0 - 13
ios/JianYuIOS/JianYuIOS/Classes(模块)/ViewController2.h

@@ -1,13 +0,0 @@
-//
-//  ViewController2.h
-//  JianYuIOS
-//
-//  Created by apple on 2018/11/9.
-//  Copyright © 2018年 lixianglan. All rights reserved.
-//
-
-#import "ViewController1.h"
-
-@interface ViewController2 : ViewController1
-
-@end

+ 0 - 42
ios/JianYuIOS/JianYuIOS/Classes(模块)/ViewController2.m

@@ -1,42 +0,0 @@
-//
-//  ViewController2.m
-//  JianYuIOS
-//
-//  Created by apple on 2018/11/9.
-//  Copyright © 2018年 lixianglan. All rights reserved.
-//
-
-#import "ViewController2.h"
-
-@interface ViewController2 ()
-
-@end
-
-@implementation ViewController2
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    // Do any additional setup after loading the view.
-    
-    NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/wxkeyset/keyset/index"];
-    
-    url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-}
-
-- (void)didReceiveMemoryWarning {
-    [super didReceiveMemoryWarning];
-    // Dispose of any resources that can be recreated.
-}
-
-/*
-#pragma mark - Navigation
-
-// In a storyboard-based application, you will often want to do a little preparation before navigation
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
-    // Get the new view controller using [segue de stinationViewController].
-    // Pass the selected object to the new view controller.
-}
-*/
-
-@end

+ 0 - 13
ios/JianYuIOS/JianYuIOS/Classes(模块)/ViewController3.h

@@ -1,13 +0,0 @@
-//
-//  ViewController3.h
-//  JianYuIOS
-//
-//  Created by apple on 2018/11/9.
-//  Copyright © 2018年 lixianglan. All rights reserved.
-//
-
-#import "ViewController2.h"
-
-@interface ViewController3 : ViewController2
-
-@end

+ 0 - 45
ios/JianYuIOS/JianYuIOS/Classes(模块)/ViewController3.m

@@ -1,45 +0,0 @@
-//
-//  ViewController3.m
-//  JianYuIOS
-//
-//  Created by apple on 2018/11/9.
-//  Copyright © 2018年 lixianglan. All rights reserved.
-//
-
-#import "ViewController3.h"
-
-@interface ViewController3 ()
-
-@end
-
-@implementation ViewController3
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    // Do any additional setup after loading the view.
-    
-    NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/jylab/index"];
-    //    NSString *token = [LXUserDefaults token];
-    //    if (token) {
-    //        url = [url stringByAppendingString:[NSString stringWithFormat:@"?sign=%@&url=/jyapp/jylab/mainSearch&from=restart", token]];
-    //    }
-    url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-}
-
-- (void)didReceiveMemoryWarning {
-    [super didReceiveMemoryWarning];
-    // Dispose of any resources that can be recreated.
-}
-
-/*
-#pragma mark - Navigation
-
-// In a storyboard-based application, you will often want to do a little preparation before navigation
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
-    // Get the new view controller using [segue destinationViewController].
-    // Pass the selected object to the new view controller.
-}
-*/
-
-@end

+ 0 - 13
ios/JianYuIOS/JianYuIOS/Classes(模块)/ViewController4.h

@@ -1,13 +0,0 @@
-//
-//  ViewController4.h
-//  JianYuIOS
-//
-//  Created by apple on 2018/11/9.
-//  Copyright © 2018年 lixianglan. All rights reserved.
-//
-
-#import "ViewController3.h"
-
-@interface ViewController4 : ViewController3
-
-@end

+ 0 - 41
ios/JianYuIOS/JianYuIOS/Classes(模块)/ViewController4.m

@@ -1,41 +0,0 @@
-//
-//  ViewController4.m
-//  JianYuIOS
-//
-//  Created by apple on 2018/11/9.
-//  Copyright © 2018年 lixianglan. All rights reserved.
-//
-
-#import "ViewController4.h"
-
-@interface ViewController4 ()
-
-@end
-
-@implementation ViewController4
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    // Do any additional setup after loading the view.
-    
-    NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/me"];
-    url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-}
-
-- (void)didReceiveMemoryWarning {
-    [super didReceiveMemoryWarning];
-    // Dispose of any resources that can be recreated.
-}
-
-/*
-#pragma mark - Navigation
-
-// In a storyboard-based application, you will often want to do a little preparation before navigation
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
-    // Get the new view controller using [segue destinationViewController].
-    // Pass the selected object to the new view controller.
-}
-*/
-
-@end

+ 40 - 29
ios/JianYuIOS/JianYuIOS/JYTabBarController.m

@@ -13,10 +13,6 @@
 #import "JYExpViewController.h"
 #import "JYMineViewController.h"
 
-#import "ViewController1.h"
-#import "ViewController2.h"
-#import "ViewController3.h"
-#import "ViewController4.h"
 
 @interface JYTabBarController ()<UITabBarControllerDelegate>
 
@@ -25,11 +21,6 @@
 @property (nonatomic,strong)JYExpViewController *V3;
 @property (nonatomic,strong)JYMineViewController *V4;
 
-@property (nonatomic,strong)ViewController1 *VV1;
-@property (nonatomic,strong)ViewController2 *VV2;
-@property (nonatomic,strong)ViewController3 *VV3;
-@property (nonatomic,strong)ViewController4 *VV4;
-
 
 @end
 
@@ -69,7 +60,7 @@
     [super viewDidLoad];
     // Do any additional setup after loading the view.
     self.delegate = self;
-    self.tabBarController.tabBar.delegate = self;
+//    self.tabBarController.tabBar.delegate = self;
     [self setUpAllChildVc];
     [self setSelectedIndex:0];
     
@@ -80,11 +71,15 @@
 //判断是否跳转
 - (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController{
     NSLog(@"点击了第几个item:%ld",tabBarController.tabBar.selectedItem.tag);
-//    if (![LXUserDefaults token]) {
-//        NSString *index = [NSString stringWithFormat:@"%ld",tabBarController.tabBar.selectedItem.tag];
-//        [[NSNotificationCenter defaultCenter] postNotificationName:@"isLoginTabBar" object:nil userInfo:@{@"item_index":index}];
+//    if(tabBarController.tabBar.selectedItem.tag==0) {
 //        return NO;
 //    }
+    if (![LXUserDefaults token]) {
+        NSLog(@"没有token前往登录");
+        NSString *index = [NSString stringWithFormat:@"%ld",tabBarController.tabBar.selectedItem.tag];
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"isLoginTabBar" object:nil userInfo:@{@"item_index":index}];
+        return NO;
+    }
     return YES;
     
 }
@@ -171,22 +166,38 @@
     NSLog(@"收到改变tabbar的通知");
     NSDictionary *dict = notification.userInfo;
     NSInteger index = [dict[@"item_index"] integerValue];
-    [self setSelectedIndex:index];
-    
-//    [self.V1 dealTabBar];
-//    [self.V1 dealTabBar];
-//    [self.V1 dealTabBar];
-//    [self.V1 dealTabBar];
-    
-    if(index==1) {
-        [self.V2 dealTabBar];
-    }else if (index==2) {
-        [self.V3 dealTabBar];
-    }else if (index==3) {
-        [self.V4 dealTabBar];
-    }else {
-        
-    }
+//    if(index==1) {
+//        [self setSelectedIndex:1];
+//    }else if (index==2) {
+//        [self setSelectedIndex:2];
+//    }else if (index==3) {
+//        [self setSelectedIndex:3];
+//    }else {
+//
+//    }
+    [self.V1 dealTabBar];
+    [self.V2 dealTabBar];
+    [self.V3 dealTabBar];
+    [self.V4 dealTabBar];
+//    if(index==1) {
+//        [self.V2 dealTabBar];
+//    }else if (index==2) {
+//        [self.V3 dealTabBar];
+//    }else if (index==3) {
+//        [self.V4 dealTabBar];
+//    }else if (index==0){
+//        //返回首页
+//        NSLog(@"回到首页处理tabbar");
+//        [self.V1 dealTabBar];
+//    }else if (index==5){
+//        //登录 刷新其他页面新的数据
+//        NSLog(@"刷新其他页面的数据");
+////        [self.V1 dealTabBar];
+//        [self.V2 dealTabBar];
+//        [self.V3 dealTabBar];
+//        [self.V4 dealTabBar];
+//
+//    }
     
 }
 - (void)didReceiveMemoryWarning {

+ 2 - 10
ios/JianYuIOS/JianYuIOS/ViewController.m

@@ -55,7 +55,7 @@ JSExportAs(isInstallWeixin, -(int)jsIsInstallWeixin:(NSString *)str);// 是否
 JSExportAs(changeMessageType, -(void)jsChangeMessageType:(NSString *)link);//已读操作处理
 JSExportAs(openActivityPage, -(void)jsOpenActivityPage:(NSString *)url rectype:(NSString *)rectype openid:(NSString *)openid);
 
-JSExportAs(getCipherText, -(NSString *)jsGGetCipherText:(NSString *)phone);
+JSExportAs(getCipherText, -(NSString *)jsGetCipherText:(NSString *)phone);
 
 JSExportAs(business, -(NSInteger)jsBusiness:(NSInteger)shooID shopType:(NSInteger )shopType);
 
@@ -383,14 +383,6 @@ NSString *const AesKey = @"mGlAgnIBB8bx2nch";
 -(void)judgeIsHidden
 {
     NSString *current_url = [self.webView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
-    //    if([current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/jylab/mainSearch",kHost]]){
-    //        [self showTabBar];
-    //        self.webView.frame = CGRectMake(0, -STATUS_BAR_HEIGHT, WIDTH, HEIGHT-TAB_BAR_HEIGHT+STATUS_BAR_HEIGHT);
-    //    }else {
-    //        [self hideTabBar];
-    //        self.webView.frame = CGRectMake(0, -STATUS_BAR_HEIGHT, WIDTH, HEIGHT+STATUS_BAR_HEIGHT);
-    //    }
-    
     
     if([current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/free/me",kHost]]||[current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/jylab/index",kHost]]||[current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/wxkeyset/keyset/index",kHost]]||[current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/jylab/mainSearch",kHost]]){
         [self showTabBar];
@@ -802,7 +794,7 @@ NSString *const AesKey = @"mGlAgnIBB8bx2nch";
 
 
 
--(NSString *)jsGGetCipherText:(NSString *)phone
+-(NSString *)jsGetCipherText:(NSString *)phone
 {
     
     NSDate *date=[NSDate date];