瀏覽代碼

备份 -新版本
1、注入ua 2、底部栏取消 3、方法整合

zhengkun 2 年之前
父節點
當前提交
b0da2c7fc7

二進制
ios/JianYuIOS/JianYuIOS.xcworkspace/xcuserdata/zhengkun.xcuserdatad/UserInterfaceState.xcuserstate


+ 6 - 6
ios/JianYuIOS/JianYuIOS.xcworkspace/xcuserdata/zhengkun.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -23,16 +23,16 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "C62474D5-CF97-4B90-9514-2D462F40ED4E"
-            shouldBeEnabled = "Yes"
+            uuid = "0E4EBEF0-D48A-4A39-9337-666E30343E79"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "JianYuIOS/AppDelegate.m"
+            filePath = "JianYuIOS/Classes&#xff08;&#x6a21;&#x5757;&#xff09;/JYNewSubViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "271"
-            endingLineNumber = "271"
-            landmarkName = "-clickNotification:"
+            startingLineNumber = "104"
+            endingLineNumber = "104"
+            landmarkName = "-webView"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 4 - 0
ios/JianYuIOS/JianYuIOS/AppDelegate.m

@@ -151,6 +151,10 @@
     [[TXCommonHandler sharedInstance] setAuthSDKInfo:@"ofSiUlw/wTNRCfGu1m8VGPWVk8G7LfnJEQPaod9peceHQOS46AJkcbON9Xf0Heb4fs3zd7z1aOAYwB0eQRtzJpewigEewvttWIc852nd6dwxgW0N9I9nUqNF3GhVOnWM1aM0nHqjiMycz4PHlDjnLB2V3c7DfUOLQYe9kM9DqnurR0bB/+uqn7mo6/vznGSl5K2wSk8hcf94epFr0c2iWtSlViPlgyPloxELoDkkiSze8J8uWy7Aeuv01TPm5bduze94UkPCuOI=" complete:^(NSDictionary * _Nonnull resultDic) {
         NSLog(@"设置秘钥结果:%@", resultDic);
     }];
+    
+    //    [[TXCommonHandler sharedInstance] accelerateVerifyWithTimeout:3.0 complete:^(NSDictionary * _Nonnull resultDic) {
+    //            NSLog(@"为后面获取本机号码校验Token加个速,加速结果:%@", resultDic);
+    //    }];
 }
 
 - (void)applicationWillResignActive:(UIApplication *)application {

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

@@ -21,9 +21,7 @@
 @property (nonatomic,assign)BOOL mineIsRed;//红点-切换底部栏需要刷新
 @property (nonatomic,assign)BOOL messIsRed;
 
-
 @property (nonatomic,assign)BOOL isClickNotiStatus;
-
 @property (nonatomic,assign)BOOL isSearchToLoad;
 @property (nonatomic,assign)BOOL isSubToLoad;
 @property (nonatomic,assign)BOOL isMessToLoad;
@@ -36,7 +34,6 @@
 
 @property (nonatomic,copy)NSString *isSkipPath;//skip图片路径
 
-
 @property (nonatomic,copy)NSString *rpcPushID;//
 
 //Plist 表相关

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

@@ -61,7 +61,6 @@
     self.mineIsRed = NO;
     self.messIsRed = NO;
     
-    
     self.isClickNotiStatus = NO;
 
     self.isSearchToLoad= NO;
@@ -81,7 +80,6 @@
     }else {
         self.rpcPushID = pushID;
     }
-    
 }
 
 

+ 1 - 1
ios/JianYuIOS/JianYuIOS/BaseClass1/LXUserDefaults.h

@@ -19,7 +19,6 @@
 +(void)saveToken:(NSString *)token;
 +(NSString *)token;
 
-
 // 暂不用
 +(void)saveOpenID:(NSString *)openID;
 +(NSString *)openID;
@@ -31,6 +30,7 @@
 //+(void)saveNotifyState:(int)state;
 //+(int)notifyState;
 
+
 // 微信是否可用
 +(BOOL)isInstallWeiXin;
 +(BOOL)isInstallAli;

+ 2 - 0
ios/JianYuIOS/JianYuIOS/BaseClass1/LXUserDefaults.m

@@ -46,6 +46,8 @@
     return token;
 }
 
+
+
 +(void)saveOpenID:(NSString *)openID{
     [[NSUserDefaults standardUserDefaults] setObject:openID forKey:@"openID"];
 }

+ 9 - 1
ios/JianYuIOS/JianYuIOS/BaseClass1/PrefixHeader.pch

@@ -176,14 +176,22 @@ _Pragma("clang diagnostic pop")\
 #import "LoadDocViewController.h"
 
 //测试1
-#define kHost @"https://app-jytest.jydev.jianyu360.com/"
+//#define kHost @"https://app-jytest.jydev.jianyu360.com/"
 //测试2
 //#define kHost @"https://app2-jytest.jydev.jianyu360.com/"
 //测试5
 //#define kHost @"https://app5-jytest.jydev.jianyu360.com/"
 
+
+//测试
+#define kHost @"https://webdev-webtest.jydev.jianyu360.com/"
+
+
+//正式
 //#define kHost @"https://ios.jianyu360.cn/"   //正式版
 
+
+
 /*
  18613717801    123456
  */

+ 58 - 185
ios/JianYuIOS/JianYuIOS/Classes(新模块)/JYBaseViewController.m

@@ -7,11 +7,11 @@
 //
 
 #import "JYBaseViewController.h"
-
 #import <WebKit/WebKit.h>
 #import <CoreLocation/CoreLocation.h>
 #import <GRPCClient/GRPCCall+ChannelArg.h>
 #import <GRPCClient/GRPCCall+Tests.h>
+#import "MBProgressHUD.h"
 
 @interface JYBaseViewController ()<WKNavigationDelegate,WKUIDelegate,WKScriptMessageHandler,CLLocationManagerDelegate,UINavigationControllerDelegate,UIImagePickerControllerDelegate,CLLocationManagerDelegate,SKProductsRequestDelegate,SKPaymentTransactionObserver,ZKClipboardViewDelegate,UIDocumentPickerDelegate>
 {
@@ -102,6 +102,8 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
         config.preferences.javaScriptEnabled = YES;
         config.preferences.javaScriptCanOpenWindowsAutomatically = YES;
         //添加消息处理,注意:self指代的是需要遵守WKScriptMessageHandler协议,结束时需要移除
+        NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
+        config.applicationNameForUserAgent = [NSString stringWithFormat:@" jianyuapp %@",version];
         config.userContentController = [[WKUserContentController alloc] init];
         //声明协议
         NSArray *jsArr = @[@"loginByWeixin",
@@ -130,12 +132,11 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
                            @"wirteRight",
                            @"clearRight",
                            @"savePic",
-                           @"ocrVerifyService",
-                           @"faceVerifyService",
                            @"skipAppointTab",
                            @"refreshAppointTab",
                            @"sendMsgCount",
-                           @"downLoadFile"
+                           @"downLoadFile",
+                           @"clearHistory"
                 
         ];
         for (NSString*jsName in jsArr) {
@@ -160,18 +161,9 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
     return _webView;
 }
 
--(void)webViewFirstRequest
-{
+-(void)webViewFirstRequest{
     //去时间戳-拼接
-    NSString *tmpUrl = @"";
-    if ([LXUserDefaults isExistToken]) {
-        NSString *token = [LXUserDefaults token];
-        tmpUrl = [[NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/login"] stringByAppendingString:[NSString stringWithFormat:@"?sign=%@&url=/jyapp/jylab/mainSearch&from=restart", token]];
-    }else {
-        tmpUrl = [[NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/index"] stringByAppendingString:[NSString stringWithFormat:@"?deviceid=%@", [LXUserDefaults getDeviceID]]];
-    }
-    NSLog(@"111 :第一次加载:%@",tmpUrl);
-    tmpUrl =  [tmpUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
+    NSString *tmpUrl = [[NSString stringWithFormat:@"%@%@", kHost, @"jyapp/jylab/mainSearch"] stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];;
     kMainQueue(^{
         [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:tmpUrl]]];
     })
@@ -211,17 +203,12 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
 
 -(void)initNotification {
     //加载通知
-
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(openPushUrlOtherMethods:) name:OpenPushUrlOtherMethods object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(openPushLinkUrlMethods:) name:OpenPushLinkUrlMethods object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jyReceiveNewsRedPoint:) name:JYReceiveNewsRedPoint object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jyRefreshMenusView:) name:JYRefreshMenusView object:nil];
-    
-    
-    
+
     //支付状态通知
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(alipayWXpayStatus:) name:AlipayWXpayStatus object:nil];
-    
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(notNetReloadWebVIew:) name:NotNetReloadWebVIew object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(popWebView:) name:PopWebView object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginOut:) name:kLoginOut object:nil];
@@ -230,18 +217,13 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(isLoginTabBar:) name:LoginIndexTabBar object:nil];
     //展示底部红的通知
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jyReceiveNewsRedPoint:) name:JYReceiveNewsRedPoint object:nil];
-    //接收全新通知
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshNonCurVC:) name:RefreshNonCurVC object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshAllVC:) name:RefreshAllVC object:nil];
     //粘贴板-
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateClipboard:) name:UpdateClipboard object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(openTheClipboard:) name:OpenTheClipboard object:nil];
-    
 }
 
 #pragma mark – Gesture Recognizer –
--(void)paningGestureReceive:(UIPanGestureRecognizer *)recoginzer
-{
+-(void)paningGestureReceive:(UIPanGestureRecognizer *)recoginzer{
     NSString *current_url = [self stringByEvaluatingJavaScriptFromString:@"document.location.href"];
     NSLog(@"%@",current_url);
     CGRect rect = self.view.bounds;
@@ -250,7 +232,11 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
         NSLog(@"不可返回");
         return;
     }
-    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/swordfish/historypush",kHost]]||[current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/jylab/mainSearch",kHost]]||[current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/frontPage/messageCenter/sess/index",kHost]]){
+    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/swordfish/historypush",kHost]]||
+       [current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/jylab/mainSearch",kHost]]||
+       [current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/frontPage/messageCenter/sess/index",kHost]]){
         
         return;
     }
@@ -325,6 +311,14 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
         [self JsOpenExternalLink:message.body];
     }else if ([message.name isEqualToString:@"alert"]) {
         [self jsAlert:message.body];
+    }else if ([message.name isEqualToString:@"hiddenBottom"]) {
+//        [self jsHiddenBottom:message.body];
+    }else if ([message.name isEqualToString:@"checkLab"]) {
+//        [self jsCheckLab:message.body];
+    }else if ([message.name isEqualToString:@"chooseTab"]) {
+//        [self jsChooseTab:message.body];
+    }else if ([message.name isEqualToString:@"clearHistory"]) {
+//        [self jsClearHistory:message.body];
     }else if ([message.name isEqualToString:@"loginSuccess"]) {
         [self jsLoginSuccess:message.body];
     }else if ([message.name isEqualToString:@"backUrl"]) {
@@ -332,15 +326,13 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
     }else if ([message.name isEqualToString:@"clearPushMessage"]) {
         [self jsClearPushMessage:message.body];
     }else if ([message.name isEqualToString:@"hideRedSpotOnMenu"]) {
-        [self jsHideRedSpotOnMenu:message.body];
+//        [self jsHideRedSpotOnMenu:message.body];
     }else if ([message.name isEqualToString:@"showRedSpotOnMenu"]) {
-        [self jsShowRedSpotOnMenu:message.body];
+//        [self jsShowRedSpotOnMenu:message.body];
     }else if ([message.name isEqualToString:@"wxPay"]) {
         [self jsWxPay:message.body];
     }else if ([message.name isEqualToString:@"aliPay"]) {
         [self jsAliPay:message.body];
-    }else if ([message.name isEqualToString:@"chooseTab"]) {
-        [self jsChooseTab:message.body];
     }else if ([message.name isEqualToString:@"skipCameraWithParam"]) {
        [self jsSkipCameraWithParam:message.body];
     }else if ([message.name isEqualToString:@"skipAlbumWithParam"]) {
@@ -360,18 +352,17 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
     }else if ([message.name isEqualToString:@"savePic"]) {
         [self jsSavePic:message.body];
     }else if ([message.name isEqualToString:@"skipAppointTab"]) {
-        [self jsSkipAppointTab:message.body];
+//        [self jsSkipAppointTab:message.body];
     }else if ([message.name isEqualToString:@"refreshAppointTab"]) {
-        [self jsRefreshAppointTab:message.body];
+//        [self jsRefreshAppointTab:message.body];
     }else if ([message.name isEqualToString:@"sendMsgCount"]) {
-        [self jsSendMsgCount:message.body];
+//        [self jsSendMsgCount:message.body];
     }else if ([message.name isEqualToString:@"downLoadFile"]) {
         [self jsDownLoadFile:message.body];
     }else {
         
     }
 }
-
 #pragma mark - WKUIDelegate
 - (void)webView:(WKWebView *)webView runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(nullable NSString *)defaultText initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSString * _Nullable result))completionHandler
 {
@@ -437,23 +428,46 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
     }
 }
 
+-(WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures{
+    //假如是重新打开窗口的话
+    if (!navigationAction.targetFrame.isMainFrame) {
 
+        [webView loadRequest:navigationAction.request];
+
+    }
+    return nil;
+}
 
 // 在发送请求之前,决定是否跳转
 - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {
     //如果当前页面是三级页面-
     NSString *curUrl = [webView.URL absoluteString];
-    
+    if (navigationAction.targetFrame==nil) {
+       [webView loadRequest:navigationAction.request];
+    }
     if ([curUrl containsString:@"jyapp/article/content"]) {
         //当前页面是三级页面--判断待跳转页面是否符合内置跳转
         NSString *nextUrl = [navigationAction.request.URL absoluteString];
-        if ([nextUrl containsString:@"jianyu360.com"]||[nextUrl containsString:@"jianyu360.cn"]||[nextUrl containsString:@"qmx.top"]) {
-            // 允许跳转
+        if ([nextUrl containsString:@"jianyu360.com"]||
+            [nextUrl containsString:@"jianyu360.cn"]||
+            [nextUrl containsString:@"qmx.top"]) {//允许跳转
             decisionHandler(WKNavigationActionPolicyAllow);
         }else {
             NSLog(@"不允许内部跳转:-%@",nextUrl);
             //筛选拦截-压缩包等格式不允许跳转
-            if ([nextUrl hasSuffix:@".rar"]||[nextUrl hasSuffix:@".zip"]||[nextUrl hasSuffix:@".7z"]||[nextUrl hasSuffix:@".CAB"]||[nextUrl hasSuffix:@".ARJ"]||[nextUrl hasSuffix:@".LZH"]||[nextUrl hasSuffix:@".TAR"]||[nextUrl hasSuffix:@".GZ"]||[nextUrl hasSuffix:@".ACE"]||[nextUrl hasSuffix:@".UUE"]||[nextUrl hasSuffix:@".BZ2"]||[nextUrl hasSuffix:@".JAR"]||[nextUrl hasSuffix:@".ISO"]) {
+            if ([nextUrl hasSuffix:@".rar"]||
+                [nextUrl hasSuffix:@".zip"]||
+                [nextUrl hasSuffix:@".7z"]||
+                [nextUrl hasSuffix:@".CAB"]||
+                [nextUrl hasSuffix:@".ARJ"]||
+                [nextUrl hasSuffix:@".LZH"]||
+                [nextUrl hasSuffix:@".TAR"]||
+                [nextUrl hasSuffix:@".GZ"]||
+                [nextUrl hasSuffix:@".ACE"]||
+                [nextUrl hasSuffix:@".UUE"]||
+                [nextUrl hasSuffix:@".BZ2"]||
+                [nextUrl hasSuffix:@".JAR"]||
+                [nextUrl hasSuffix:@".ISO"]) {
                 // 不允许跳转
                 decisionHandler(WKNavigationActionPolicyCancel);
             }else {
@@ -474,13 +488,8 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
         // 允许跳转
         decisionHandler(WKNavigationActionPolicyAllow);
     }
-    
-    
-    
 }
 
-
-
 #pragma mark  ****WKUIDelegate
 //通过js alert 显示一个警告面板,调用原生会走此方法。
 - (void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(void))completionHandler
@@ -551,32 +560,19 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
     [self.recognizer delaysTouchesBegan];
     [self.view addGestureRecognizer:self.recognizer];
     
-    //监听购买结果
-    [[SKPaymentQueue defaultQueue] addTransactionObserver:self];
     
+//
     
-//    UIButton *btn = [ZKControl createButtonWithFrame:CGRectMake(100, 100, 100, 100) title:@"点我" imageName:nil bgImageName:nil target:self method:@selector(cccccc)];
-//    [self.view addSubview:btn];
+    //监听购买结果
+    [[SKPaymentQueue defaultQueue] addTransactionObserver:self];
     
 }
--(void)cccccc{
-    //调用一键登录
-    [[TXCommonHandler sharedInstance] getLoginTokenWithTimeout:3.0
-    controller:self model:nil complete:^(NSDictionary * _Nonnull resultDic) {
-        NSLog(@"一键登录结果:%@", resultDic);
-    }];
-
-}
 
 
 #pragma mark - WKNavigationDelegate
 /* 页面加载完成 */
 - (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation{
     NSLog(@"-----页面加载完成%@",webView.URL.absoluteString);
-    if (![GlobalData shareInstance].isSearchToLoad) {
-        [GlobalData shareInstance].isSearchToLoad = YES;
-    }
-    
     //第一次加载小红点
     [self.webView evaluateJavaScript:@"document.documentElement.style.webkitTouchCallout='none';" completionHandler:nil];
     [self.webView evaluateJavaScript:@"document.documentElement.style.webkitUserSelect='none';"completionHandler:nil];
@@ -584,8 +580,6 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
     [self removeFailNetViews];
     [[LXViewControllerManager shareViewControllerManager] hideHud];
     //写数据
-//    [self writeWKWebData:webView.URL];
-    
     if (![GlobalData shareInstance].isOpen) {//第一次打开
         [GlobalData shareInstance].isOpen = YES;
         [self performSelector:@selector(pasteboard) withObject:nil afterDelay:1.5];
@@ -824,11 +818,6 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
     return nil;
 }
 
-
--(void)jsCheckLab:(NSDictionary *)dict {
-    [[NSNotificationCenter defaultCenter] postNotificationName:RefreshNonCurVC object:nil userInfo:nil];
-}
-
 //js方法登录成功
 -(void)jsLoginSuccess:(NSDictionary *)dict {
     NSLog(@"search登录成功提示:%@",dict);
@@ -869,34 +858,6 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
     });
 }
 
--(void)jsHideRedSpotOnMenu:(NSDictionary *)dict {
-    NSString *menu = [NSString stringWithFormat:@"%@",dict[@"menu"]];
-    if([menu isEqualToString:@"subscribe"]) {
-        kMainQueue(^{
-            [self.tabBarController.tabBar hideBadgeOnItemIndex:1];
-        });
-    }
-    if([menu isEqualToString:@"my"]) {
-        kMainQueue(^{
-            [self.tabBarController.tabBar hideBadgeOnItemIndex:4];
-        });
-    }
-}
-
--(void)jsShowRedSpotOnMenu:(NSDictionary *)dict {
-    NSString *menu = [NSString stringWithFormat:@"%@",dict[@"menu"]];
-    if([menu isEqualToString:@"subscribe"]) {
-        kMainQueue(^{
-            [self.tabBarController.tabBar showBadgeOnItemIndex:1];
-        });
-    }
-    if([menu isEqualToString:@"my"]) {
-        kMainQueue(^{
-            [self.tabBarController.tabBar showBadgeOnItemIndex:4];
-        });
-    }
-}
-
 -(void)jsWxPay:(NSDictionary *)dict {
     if (![LXUserDefaults isInstallWeiXin]) {         [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"请先安装微信再进行支付!" delay:1.5];
         return;
@@ -992,19 +953,6 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
     return self.placeLli;
 }
 
-
-
-
--(void)jsChooseTab:(NSDictionary *)dict {
-//    NSInteger indexTab = [dict[@"indexTab"] integerValue];
-//    kMainQueue((^{
-//        AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
-//        JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
-//        tab.selectedIndex = indexTab;
-//        pushIndex = indexTab;
-//    }));
-}
-
 //拍照上传图片
 -(void)jsSkipCameraWithParam:(NSDictionary *)dict {
     [GlobalData shareInstance].isSkipPath = [NSString stringWithFormat:@"%@",dict[@"type"]];
@@ -1016,8 +964,6 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
     dispatch_async(dispatch_get_main_queue(), ^{
         [self presentViewController:picker animated:YES completion:nil];
     });
-    
-    
 }
 //相册选择照片
 -(void)jsSkipAlbumWithParam:(NSDictionary *)dict {
@@ -1031,7 +977,6 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
         [self presentViewController:picker animated:YES completion:nil];
     });
 }
-
 //统计点击推送
 -(void)jsOpenActivityPage:(NSDictionary *)dict {
     NSDictionary * infoDic = @{@"url":[NSString stringWithFormat:@"%@",dict[@"url"]],
@@ -1048,7 +993,6 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
         NSLog(@"error=%@",error);
 
     }];
-    
 }
 
 
@@ -1120,11 +1064,6 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
     [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:msg delay:1];
 }
 
-
-
-
-
-
 #pragma mark  粘贴板
 -(void)jsWirteRight:(NSDictionary *)dict {
     NSString *txt = [NSString stringWithFormat:@"%@",dict[@"txt"]];
@@ -1257,45 +1196,6 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
      [[SKPaymentQueue defaultQueue] finishTransaction: transaction];
 }
 
-//切换模块
--(void)jsSkipAppointTab:(NSDictionary *)dict {
-//    if(self.tabBarController.selectedIndex == 0) {
-//        AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
-//        JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
-//        NSString *name = [NSString stringWithFormat:@"%@",dict[@"name"]];
-//        if ([name isEqualToString:@"search"]) {
-//            tab.selectedIndex = 0;//切换底部栏
-//        }else if ([name isEqualToString:@"subscribe"]) {
-//            tab.selectedIndex = 1;//切换底部栏
-//        }else if ([name isEqualToString:@"message"]) {
-//            tab.selectedIndex = 2;//切换底部栏
-//        }else if ([name isEqualToString:@"box"]) {
-//            tab.selectedIndex = 3;//切换底部栏
-//        }else if ([name isEqualToString:@"me"]) {
-//            tab.selectedIndex = 4;//切换底部栏
-//        }else {
-//
-//        }
-//    }
-}
-
-//刷新模块页面
--(void)jsRefreshAppointTab:(NSDictionary *)dict {
-    if(self.tabBarController.selectedIndex == 0) {
-        [[NSNotificationCenter defaultCenter] postNotificationName:JYRefreshMenusView object:nil userInfo:dict];
-    }
-}
-
-
-//展示消息模块红点数量
--(void)jsSendMsgCount:(NSDictionary *)dict {
-    NSString *count = [NSString stringWithFormat:@"%@",dict[@"num"]];
-    if(self.tabBarController.selectedIndex == 0) {
-        [self.tabBarController.tabBar showBadgeOnItemIndex:2 withCount:[count intValue]];
-    }
-
-}
-
 
 -(void)jsDownLoadFile:(NSDictionary *)dict {
     NSString *filename = [NSString stringWithFormat:@"%@",dict[@"filename"]];
@@ -1340,7 +1240,7 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
 
 - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script
 {
-    __block NSString *resultString = nil;
+    __block NSString *resultString = @"";
     __block BOOL finished = NO;
 
     [self.webView evaluateJavaScript:script completionHandler:^(id result, NSError *error) {
@@ -1686,11 +1586,9 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
 
 //前往登录页面
 -(void)isLoginTabBar:(NSNotification *)notification{
-   
     NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/login"];
     url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
     [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-    
 }
 -(void)jyReceiveNewsRedPoint:(NSNotification *)notificaition {
     NSDictionary *dict = notificaition.userInfo;
@@ -1698,31 +1596,6 @@ NSString *const new_AesKey = @"mGlAgnIBB8bx2nch";
     [self isExitCallToJS:textJS withMethodName:@"afterReceivePushMessage"];
 }
 
--(void)jyRefreshMenusView:(NSNotification *)notificaition {
-    NSDictionary *dict = notificaition.userInfo;
-    NSString *name = [NSString stringWithFormat:@"%@",dict[@"name"]];
-    NSString *type = [NSString stringWithFormat:@"%@",dict[@"type"]];
-    if ([name isEqualToString:@"search"]) {
-        if ([type isEqualToString:@"0"]) {
-            [self.webView reload];
-        }else {
-            [self webViewFirstRequest];
-        }
-    }
-}
-
-
-
-
-
-//刷新页面相关
--(void)refreshNonCurVC:(NSNotification *)notificaition{
-    [self webViewFirstRequest];
-}
--(void)refreshAllVC:(NSNotification *)notificaition{
-    [self webViewFirstRequest];
-}
-
 #pragma mark   ****粘贴板相关-梳理
 -(void)updateClipboard:(NSNotification *)notificaition{
     NSString *current_url = [self stringByEvaluatingJavaScriptFromString:@"document.location.href"];