apple 6 роки тому
батько
коміт
0d58195749

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

@@ -7,9 +7,6 @@
 	objects = {
 	objects = {
 
 
 /* Begin PBXBuildFile section */
 /* Begin PBXBuildFile section */
-<<<<<<< HEAD
-		1876C3EA2199044700BC23DE /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1876C3E92199044700BC23DE /* ViewController.m */; };
-=======
 		1876C3FC219920DE00BC23DE /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1876C3FB219920DE00BC23DE /* ViewController.m */; };
 		1876C3FC219920DE00BC23DE /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1876C3FB219920DE00BC23DE /* ViewController.m */; };
 		187B4EE321EC356100A9368D /* UIView+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = 187B4EE221EC356100A9368D /* UIView+Extension.m */; };
 		187B4EE321EC356100A9368D /* UIView+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = 187B4EE221EC356100A9368D /* UIView+Extension.m */; };
 		187B4EE621EC635700A9368D /* GlobalData.m in Sources */ = {isa = PBXBuildFile; fileRef = 187B4EE521EC635700A9368D /* GlobalData.m */; };
 		187B4EE621EC635700A9368D /* GlobalData.m in Sources */ = {isa = PBXBuildFile; fileRef = 187B4EE521EC635700A9368D /* GlobalData.m */; };
@@ -20,7 +17,6 @@
 		188037202193EB25006F9D7B /* JYSubViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1880371B2193EB25006F9D7B /* JYSubViewController.m */; };
 		188037202193EB25006F9D7B /* JYSubViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1880371B2193EB25006F9D7B /* JYSubViewController.m */; };
 		188037212193EB25006F9D7B /* JYExpViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1880371C2193EB25006F9D7B /* JYExpViewController.m */; };
 		188037212193EB25006F9D7B /* JYExpViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1880371C2193EB25006F9D7B /* JYExpViewController.m */; };
 		18C9D8E7219A5F9F001AC829 /* UITabBar+badge.m in Sources */ = {isa = PBXBuildFile; fileRef = 18C9D8E6219A5F9F001AC829 /* UITabBar+badge.m */; };
 		18C9D8E7219A5F9F001AC829 /* UITabBar+badge.m in Sources */ = {isa = PBXBuildFile; fileRef = 18C9D8E6219A5F9F001AC829 /* UITabBar+badge.m */; };
->>>>>>> origin/developPay
 		9ADF6A094C6E01A55F2E47CC /* libPods-JianYuIOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CA962A24EED00910F83394E /* libPods-JianYuIOS.a */; };
 		9ADF6A094C6E01A55F2E47CC /* libPods-JianYuIOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CA962A24EED00910F83394E /* libPods-JianYuIOS.a */; };
 		C519972C2020238D007946E8 /* LXUserDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = C51997232020238D007946E8 /* LXUserDefaults.m */; };
 		C519972C2020238D007946E8 /* LXUserDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = C51997232020238D007946E8 /* LXUserDefaults.m */; };
 		C519972D2020238D007946E8 /* LXMD5.m in Sources */ = {isa = PBXBuildFile; fileRef = C51997242020238D007946E8 /* LXMD5.m */; };
 		C519972D2020238D007946E8 /* LXMD5.m in Sources */ = {isa = PBXBuildFile; fileRef = C51997242020238D007946E8 /* LXMD5.m */; };
@@ -69,9 +65,6 @@
 /* Begin PBXFileReference section */
 /* Begin PBXFileReference section */
 		0CA962A24EED00910F83394E /* libPods-JianYuIOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-JianYuIOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
 		0CA962A24EED00910F83394E /* libPods-JianYuIOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-JianYuIOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
 		10D9BC27D00CB4DF3F791728 /* Pods-JianYuIOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JianYuIOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-JianYuIOS/Pods-JianYuIOS.release.xcconfig"; sourceTree = "<group>"; };
 		10D9BC27D00CB4DF3F791728 /* Pods-JianYuIOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JianYuIOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-JianYuIOS/Pods-JianYuIOS.release.xcconfig"; sourceTree = "<group>"; };
-<<<<<<< HEAD
-		1876C3E92199044700BC23DE /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
-=======
 		1876C3FB219920DE00BC23DE /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
 		1876C3FB219920DE00BC23DE /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
 		187B4EE121EC356100A9368D /* UIView+Extension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+Extension.h"; sourceTree = "<group>"; };
 		187B4EE121EC356100A9368D /* UIView+Extension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+Extension.h"; sourceTree = "<group>"; };
 		187B4EE221EC356100A9368D /* UIView+Extension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIView+Extension.m"; sourceTree = "<group>"; };
 		187B4EE221EC356100A9368D /* UIView+Extension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIView+Extension.m"; sourceTree = "<group>"; };
@@ -92,7 +85,6 @@
 		18B2DF4021ACDA5D00B5C93F /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
 		18B2DF4021ACDA5D00B5C93F /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
 		18C9D8E5219A5F9F001AC829 /* UITabBar+badge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UITabBar+badge.h"; sourceTree = "<group>"; };
 		18C9D8E5219A5F9F001AC829 /* UITabBar+badge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UITabBar+badge.h"; sourceTree = "<group>"; };
 		18C9D8E6219A5F9F001AC829 /* UITabBar+badge.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UITabBar+badge.m"; sourceTree = "<group>"; };
 		18C9D8E6219A5F9F001AC829 /* UITabBar+badge.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UITabBar+badge.m"; sourceTree = "<group>"; };
->>>>>>> origin/developPay
 		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>"; };
 		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>"; };
 		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>"; };
 		C51997232020238D007946E8 /* LXUserDefaults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LXUserDefaults.m; sourceTree = "<group>"; };
@@ -288,9 +280,6 @@
 				C550BEF420180AB700F0BC2A /* JianYuIOS.entitlements */,
 				C550BEF420180AB700F0BC2A /* JianYuIOS.entitlements */,
 				188037092193EAD1006F9D7B /* Classes(模块) */,
 				188037092193EAD1006F9D7B /* Classes(模块) */,
 				C5BE6E3D2011D99100F28B36 /* ViewController.h */,
 				C5BE6E3D2011D99100F28B36 /* ViewController.h */,
-<<<<<<< HEAD
-				1876C3E92199044700BC23DE /* ViewController.m */,
-=======
 				1876C3FB219920DE00BC23DE /* ViewController.m */,
 				1876C3FB219920DE00BC23DE /* ViewController.m */,
 				188036FA2193EA09006F9D7B /* JYNavigationController.h */,
 				188036FA2193EA09006F9D7B /* JYNavigationController.h */,
 				188036F72193EA08006F9D7B /* JYNavigationController.m */,
 				188036F72193EA08006F9D7B /* JYNavigationController.m */,
@@ -298,7 +287,6 @@
 				188036F92193EA09006F9D7B /* JYTabBarController.m */,
 				188036F92193EA09006F9D7B /* JYTabBarController.m */,
 				18C9D8E5219A5F9F001AC829 /* UITabBar+badge.h */,
 				18C9D8E5219A5F9F001AC829 /* UITabBar+badge.h */,
 				18C9D8E6219A5F9F001AC829 /* UITabBar+badge.m */,
 				18C9D8E6219A5F9F001AC829 /* UITabBar+badge.m */,
->>>>>>> origin/developPay
 				C55FF3BC20230E7E0088AECC /* NewWebController.h */,
 				C55FF3BC20230E7E0088AECC /* NewWebController.h */,
 				C55FF3BD20230E7E0088AECC /* NewWebController.m */,
 				C55FF3BD20230E7E0088AECC /* NewWebController.m */,
 				C55FF3BE20230E7E0088AECC /* NewWebController.xib */,
 				C55FF3BE20230E7E0088AECC /* NewWebController.xib */,
@@ -526,10 +514,7 @@
 			isa = PBXSourcesBuildPhase;
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
-<<<<<<< HEAD
-=======
 				1876C3FC219920DE00BC23DE /* ViewController.m in Sources */,
 				1876C3FC219920DE00BC23DE /* ViewController.m in Sources */,
->>>>>>> origin/developPay
 				C55FF3BF20230E7E0088AECC /* NewWebController.m in Sources */,
 				C55FF3BF20230E7E0088AECC /* NewWebController.m in Sources */,
 				C519972D2020238D007946E8 /* LXMD5.m in Sources */,
 				C519972D2020238D007946E8 /* LXMD5.m in Sources */,
 				18C9D8E7219A5F9F001AC829 /* UITabBar+badge.m in Sources */,
 				18C9D8E7219A5F9F001AC829 /* UITabBar+badge.m in Sources */,
@@ -537,12 +522,8 @@
 				C519972F2020238D007946E8 /* LXDataBaseManager.m in Sources */,
 				C519972F2020238D007946E8 /* LXDataBaseManager.m in Sources */,
 				187B4EE321EC356100A9368D /* UIView+Extension.m in Sources */,
 				187B4EE321EC356100A9368D /* UIView+Extension.m in Sources */,
 				C550BEFA20180AF000F0BC2A /* main.m in Sources */,
 				C550BEFA20180AF000F0BC2A /* main.m in Sources */,
-<<<<<<< HEAD
-				1876C3EA2199044700BC23DE /* ViewController.m in Sources */,
-=======
 				188036FC2193EA09006F9D7B /* JYTabBarController.m in Sources */,
 				188036FC2193EA09006F9D7B /* JYTabBarController.m in Sources */,
 				188036FB2193EA09006F9D7B /* JYNavigationController.m in Sources */,
 				188036FB2193EA09006F9D7B /* JYNavigationController.m in Sources */,
->>>>>>> origin/developPay
 				C5321C76202BD89B0023CFEA /* LXProgressView.m in Sources */,
 				C5321C76202BD89B0023CFEA /* LXProgressView.m in Sources */,
 				C519972C2020238D007946E8 /* LXUserDefaults.m in Sources */,
 				C519972C2020238D007946E8 /* LXUserDefaults.m in Sources */,
 				C5FE4B5720468BC900CC8A2F /* NoNetView.m in Sources */,
 				C5FE4B5720468BC900CC8A2F /* NoNetView.m in Sources */,

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


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

@@ -9,35 +9,8 @@
             shouldBeEnabled = "Yes"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
-<<<<<<< HEAD
-            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 = "563679027.2465791"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "407"
-            endingLineNumber = "407"
-            landmarkName = "-application:openURL:sourceApplication:annotation:"
-            landmarkType = "7">
-=======
             scope = "0"
             scope = "0"
             stopOnStyle = "0">
             stopOnStyle = "0">
->>>>>>> origin/developPay
          </BreakpointContent>
          </BreakpointContent>
       </BreakpointProxy>
       </BreakpointProxy>
    </Breakpoints>
    </Breakpoints>

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

@@ -98,14 +98,6 @@ _Pragma("clang diagnostic pop")\
 #define ClickSubNotiMethods @"ClickSubNotiMethods"
 #define ClickSubNotiMethods @"ClickSubNotiMethods"
 
 
 
 
-<<<<<<< HEAD
-#define kHost @"https://www.jianyu360.com/"
-
-//#define kHost @"http://weblxl.qmx.top/" //小璐
-//#define kHost @"http://webws.qmx.top/" //王山
-//#define kHost @"http://webwcj.qmx.top/"//王传近
-//#define kHost @"http://w2blmjy.qmx.top/"//测试环境
-=======
 
 
 //微信SDK头文件 支付
 //微信SDK头文件 支付
 #import "WXApi.h"
 #import "WXApi.h"
@@ -118,7 +110,6 @@ _Pragma("clang diagnostic pop")\
 #define kHost @"http://webwcj.qmx.top/"//王传近
 #define kHost @"http://webwcj.qmx.top/"//王传近
 //#define kHost @"http://w2blmjy.qmx.top/"//测试环境
 //#define kHost @"http://w2blmjy.qmx.top/"//测试环境
 //#define kHost @"http://w4blmjy.qmx.top/"//测试环境2
 //#define kHost @"http://w4blmjy.qmx.top/"//测试环境2
->>>>>>> origin/developPay
 //#define kHost @"123.56.103.12/"
 //#define kHost @"123.56.103.12/"
 
 
 //#define kHost @"https://app1.jianyu360.com/"
 //#define kHost @"https://app1.jianyu360.com/"

+ 1 - 28
ios/JianYuIOS/JianYuIOS/ViewController.m

@@ -55,19 +55,12 @@ JSExportAs(isInstallWeixin, -(int)jsIsInstallWeixin:(NSString *)str);// 是否
 JSExportAs(changeMessageType, -(void)jsChangeMessageType:(NSString *)link);//已读操作处理
 JSExportAs(changeMessageType, -(void)jsChangeMessageType:(NSString *)link);//已读操作处理
 JSExportAs(openActivityPage, -(void)jsOpenActivityPage:(NSString *)url rectype:(NSString *)rectype openid:(NSString *)openid);
 JSExportAs(openActivityPage, -(void)jsOpenActivityPage:(NSString *)url rectype:(NSString *)rectype openid:(NSString *)openid);
 
 
-<<<<<<< HEAD
-JSExportAs(getCipherText, -(NSString *)jsGGetCipherText:(NSString *)phone);
-=======
 JSExportAs(getCipherText, -(NSString *)jsGetCipherText:(NSString *)phone);
 JSExportAs(getCipherText, -(NSString *)jsGetCipherText:(NSString *)phone);
 
 
 JSExportAs(business, -(NSInteger)jsBusiness:(NSInteger)shooID shopType:(NSInteger )shopType);
 JSExportAs(business, -(NSInteger)jsBusiness:(NSInteger)shooID shopType:(NSInteger )shopType);
->>>>>>> origin/developPay
-
-JSExportAs(business, -(NSInteger)jsBusiness:(NSInteger)shooID shopType:(NSInteger )shopType);
 
 
 
 
 
 
-@end
 
 
 @end
 @end
 
 
@@ -77,11 +70,8 @@ JSExportAs(business, -(NSInteger)jsBusiness:(NSInteger)shooID shopType:(NSIntege
     CGPoint startTouch;
     CGPoint startTouch;
     BOOL _isMoving;
     BOOL _isMoving;
     
     
-<<<<<<< HEAD
-=======
     
     
     BOOL _isFirstLogin;
     BOOL _isFirstLogin;
->>>>>>> origin/developPay
 }
 }
 
 
 
 
@@ -139,15 +129,9 @@ NSString *const AesKey = @"mGlAgnIBB8bx2nch";
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(netReachChanged:) name:AFNetworkingReachabilityDidChangeNotification object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(netReachChanged:) name:AFNetworkingReachabilityDidChangeNotification object:nil];
     
     
     
     
-<<<<<<< HEAD
-    
-    
-//    [self clearWeb];
-=======
     
     
     
     
     [self clearWeb];
     [self clearWeb];
->>>>>>> origin/developPay
     
     
     UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(paningGestureReceive:)];
     UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(paningGestureReceive:)];
     [recognizer delaysTouchesBegan];
     [recognizer delaysTouchesBegan];
@@ -339,18 +323,11 @@ NSString *const AesKey = @"mGlAgnIBB8bx2nch";
     NSString *url = [NSString stringWithFormat:@"%@%@?sign=%@", kHost, @"jyapp/free/signOut", [LXUserDefaults token]];
     NSString *url = [NSString stringWithFormat:@"%@%@?sign=%@", kHost, @"jyapp/free/signOut", [LXUserDefaults token]];
     url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
     url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
     
     
-<<<<<<< HEAD
-    UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
-    webView.delegate = self;
-    [self.view addSubview:webView];
-    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-=======
     [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
     [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
 //    UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
 //    UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
 //    webView.delegate = self;
 //    webView.delegate = self;
 //    [self.view addSubview:webView];
 //    [self.view addSubview:webView];
 //    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
 //    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
->>>>>>> origin/developPay
     
     
     //    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
     //    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
     [self jsRemoveUserToken:nil];
     [self jsRemoveUserToken:nil];
@@ -482,7 +459,7 @@ NSString *const AesKey = @"mGlAgnIBB8bx2nch";
 
 
 - (void)didReceiveMemoryWarning {
 - (void)didReceiveMemoryWarning {
     [super didReceiveMemoryWarning];
     [super didReceiveMemoryWarning];
-//    [self clearWeb];
+    [self clearWeb];
     // Dispose of any resources that can be recreated.
     // Dispose of any resources that can be recreated.
     
     
     //当前页面:http://jianyu360.mikecrm.com/9Li9dpM
     //当前页面:http://jianyu360.mikecrm.com/9Li9dpM
@@ -822,11 +799,7 @@ NSString *const AesKey = @"mGlAgnIBB8bx2nch";
 
 
 
 
 
 
-<<<<<<< HEAD
--(NSString *)jsGGetCipherText:(NSString *)phone
-=======
 -(NSString *)jsGetCipherText:(NSString *)phone
 -(NSString *)jsGetCipherText:(NSString *)phone
->>>>>>> origin/developPay
 {
 {
     
     
     NSDate *date=[NSDate date];
     NSDate *date=[NSDate date];

+ 0 - 895
ios/JianYuIOS/JianYuIOS/ViewController_BACKUP_16982.m

@@ -1,895 +0,0 @@
-//
-//  ViewController.m
-//  JianYuIOS
-//
-//  Created by lixianglan on 2018/1/19.
-//  Copyright © 2018年 lixianglan. All rights reserved.
-//
-
-#import "ViewController.h"
-#import <JavaScriptCore/JavaScriptCore.h>
-#import <UShareUI/UShareUI.h>
-#import <UMSocialCore/UMSocialCore.h>
-#import "NewWebController.h"
-#import <UMSocialCore/UMSocialCore.h>
-#import <AFNetworking.h>
-#import "NoNetView.h"
-//#import <WebKit/WebKit.h>
-#import  <CommonCrypto/CommonCryptor.h>
-
-
-
-#define LocalStr_None @""//空字符串
-#define KIsiPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
-
-@protocol ViewControllerMain<JSExport>
-
-//测试
-
-
-@end
-
-
-
-@protocol ViewControllerJSExport<JSExport>
-
-JSExportAs(loginByWeixin, -(NSString *)jsLoginByWeixin:(NSString *)str);// 微信登录 openid
-JSExportAs(share, -(void)jsShare:(NSString *)type title:(NSString *)title content:(NSString *)content link:(NSString *)link); // 调用分享
-JSExportAs(saveUserToken, -(void)jsSaveUserToken:(NSString *)token);// 登录时获取令牌 保存
-JSExportAs(getUserToken, -(NSString *)jsGetUserToken:(NSString *)str);// 取本地存的令牌
-JSExportAs(removeUserToken, -(void)jsRemoveUserToken:(NSString *)str); // 退出时清空数据
-JSExportAs(checkNoticePermission, -(int)jsCheckNoticePermission:(NSString *)str); // 查询手机通知是否打开
-JSExportAs(openSystemNotification, -(void)jsOpenSystemNotification:(NSString *)str);// 跳转到系统设置
-JSExportAs(getPushRid, -(NSString *)jsGetPushRid:(NSString *)str);// 返回极光id
-JSExportAs(getMessageList, -(NSString *)jsGetMessageList:(NSString *)openid);// 按通知接收时间倒排,取前100条
-JSExportAs(updateMessageState, -(void)jsUpdateMessageState:(NSString *)lxID state:(NSString *)state);// 更新状态
-JSExportAs(deleteMessageById, -(void)jsDeleteMessageById:(NSString *)lxID);// 删除一条消息
-JSExportAs(getMessage, -(NSString *)jsGetMessage:(NSString *)lxID);// 取单条数据
-JSExportAs(getUnReadMessageCount, -(int)jsGetUnReadMessageCount:(NSString *)openid);// 获取未读消息总数
-JSExportAs(updateAllUnReadMessage, -(void)jsUpdateAllUnReadMessage:(NSString *)openid);// 全部置为已读
-JSExportAs(lightStatusBar, -(void)jsLightStatusBar:(NSString *)status);// 导航栏文字颜色
-JSExportAs(openExternalLink, -(void)jsOpenExternalLink:(NSString *)url title:(NSString *)title);// 打开新控制器 加载新web
-JSExportAs(getVersion, -(NSString *)jsGetVersion:(NSString *)str);// 获取当前版本号
-JSExportAs(alert, -(void)jsAlert:(NSString *)content);// 弹框
-JSExportAs(isInstallWeixin, -(int)jsIsInstallWeixin:(NSString *)str);// 是否安装微信
-JSExportAs(changeMessageType, -(void)jsChangeMessageType:(NSString *)link);//已读操作处理
-JSExportAs(openActivityPage, -(void)jsOpenActivityPage:(NSString *)url rectype:(NSString *)rectype openid:(NSString *)openid);
-
-<<<<<<< HEAD
-JSExportAs(getCipherText, -(NSString *)jsGGetCipherText:(NSString *)phone);
-=======
-JSExportAs(getCipherText, -(NSString *)jsGetCipherText:(NSString *)phone);
-
-JSExportAs(business, -(NSInteger)jsBusiness:(NSInteger)shooID shopType:(NSInteger )shopType);
->>>>>>> origin/developPay
-
-JSExportAs(business, -(NSInteger)jsBusiness:(NSInteger)shooID shopType:(NSInteger )shopType);
-
-
-
-@end
-
-@end
-
-
-@interface ViewController ()<UIWebViewDelegate, ViewControllerJSExport>
-{
-    CGPoint startTouch;
-    BOOL _isMoving;
-    
-<<<<<<< HEAD
-=======
-    
-    BOOL _isFirstLogin;
->>>>>>> origin/developPay
-}
-
-
-
-
-
-@end
-
-NSString *const kInitVector = @"1389461544135476";
-size_t const kKeySize = kCCKeySizeAES128;
-NSString *const AesKey = @"mGlAgnIBB8bx2nch";
-
-@implementation ViewController
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    
-    
-    NSLog(@"viewDidLoadviewDidLoad   初始化");
-    
-    [LXDataBaseManager shareDataBaseManager];
-    if ([[UIDevice currentDevice].systemVersion floatValue] >= 11.0) {
-        //        if(KIsiPhoneX) {
-        //            self.topC.constant = -44;
-        //            [self.webView updateConstraints];
-        //        }else {
-        //            self.topC.constant = -20;
-        //            [self.webView updateConstraints];
-        //        }
-        self.topC.constant = -20;
-        [self.webView updateConstraints];
-    }
-    
-    
-    self.view.backgroundColor = [UIColor whiteColor];
-    
-    
-    self.webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, -STATUS_BAR_HEIGHT, WIDTH, HEIGHT-TAB_BAR_HEIGHT+STATUS_BAR_HEIGHT)];
-    [self.view addSubview: self.webView];
-    self.webView.scrollView.bounces = NO;
-    self.webView.delegate = self;
-    
-    
-    
-    
-    [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-    [self webViewFirstRequest];//请求页面数据
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(requestWebView:) name:kRequestWebViewWithUrl object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateNotifyState) name:kUpdateNotifyState object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(afterReceiveNewMsg) name:kAfterReceiveNewMsg object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadWebView) name:kReloadWebVIew object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginOut:) name:kLoginOut object:nil];
-    
-    [[AFNetworkReachabilityManager sharedManager] startMonitoring];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(netReachChanged:) name:AFNetworkingReachabilityDidChangeNotification object:nil];
-    
-    
-<<<<<<< HEAD
-    
-    
-//    [self clearWeb];
-=======
-    
-    
-    [self clearWeb];
->>>>>>> origin/developPay
-    
-    UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(paningGestureReceive:)];
-    [recognizer delaysTouchesBegan];
-    [self.view addGestureRecognizer:recognizer];
-    
-    
-}
-
--(void)moveViewWithX:(float)x
-{
-    CGRect rect = self.view.bounds;
-    CGFloat width = CGRectGetWidth(rect);
-    x = x>width?width:x;
-    x = x<0?0:x;
-    CGRect frame = self.webView.frame;
-    frame.origin.x = x;
-    self.webView.frame = frame;
-}
-
-#pragma mark – Gesture Recognizer –
--(void)paningGestureReceive:(UIPanGestureRecognizer *)recoginzer
-{
-    CGRect rect = self.view.bounds;
-    CGFloat width = CGRectGetWidth(rect);
-    if (![self.webView canGoBack]) {
-        NSLog(@"不可返回");
-        return;
-    }
-    
-    NSString *current_url = [self.webView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
-    NSLog(@"当前页面:%@",current_url);
-    //    NSString *current_url = self.webView.request.URL.absoluteString;
-    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]]){
-        return;
-    }
-    
-    //https://www.jianyu360.com/jyapp/free/me
-    //https://www.jianyu360.com/jyapp/jylab/index
-    //https://www.jianyu360.com/jyapp/wxkeyset/keyset/index
-    //https://www.jianyu360.com/jyapp/jylab/mainSearch
-    
-    CGPoint touchPoint = [recoginzer locationInView:[UIApplication sharedApplication].keyWindow];
-    if (recoginzer.state==UIGestureRecognizerStateBegan) {
-        _isMoving = YES;
-        startTouch = touchPoint;
-    } else if (recoginzer.state==UIGestureRecognizerStateEnded){
-        if (touchPoint.x - startTouch.x > width*0.125) {
-            [UIView animateWithDuration:0.3 animations:^{
-                [self moveViewWithX:width];
-                [self.webView goBack];
-            } completion:^(BOOL finished) {
-                _isMoving = NO;
-                [self moveViewWithX:0];
-            }];
-        } else {
-            [UIView animateWithDuration:0.3 animations:^{
-                [self moveViewWithX:0];
-            } completion:^(BOOL finished) {
-                _isMoving = NO;
-            }];
-        }
-        return;
-    } else if (recoginzer.state==UIGestureRecognizerStateCancelled){
-        [UIView animateWithDuration:0.3 animations:^{
-            [self moveViewWithX:0];
-        } completion:^(BOOL finished) {
-            _isMoving = NO;
-        }];
-        return;
-    }
-    if (_isMoving) {
-        [self moveViewWithX:touchPoint.x - startTouch.x];
-    }
-}
-
-
-// 监控网络状态变化
--(void)netReachChanged:(NSNotification *)notificaition{
-    NSDictionary *userInfo = notificaition.userInfo;
-    if ([userInfo[@"AFNetworkingReachabilityNotificationStatusItem"] intValue] == 0 || [userInfo[@"AFNetworkingReachabilityNotificationStatusItem"] intValue] == -1) {
-        [self addNoNetViews];
-    }else{
-        if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"firstLoad"] intValue] == 0) {
-            [[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"firstLoad"];
-            [self removeNoNetViews];
-            [self webViewFirstRequest];
-        }
-    }
-}
-
-// 再次加载页面
--(void)reloadWebView{
-    [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-    if (!self.webView.canGoBack) {
-        [self webViewFirstRequest];
-    }else{
-        [self.webView reload];
-    }
-    
-}
-
-// 首次加载web
--(void)webViewFirstRequest{
-    NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/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]]];
-    
-}
-
-//收到消息退出并重新加载web
--(void)webViewRequestByMsg{
-    NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/kicked"];
-    url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-}
-
--(void)requestWebTime:(NSDictionary *)infoDict
-{
-    NSString * urlStr = [NSString stringWithFormat:@"%@",infoDict[@"url"]];
-    
-    if([infoDict[@"type"] isEqualToString:@"message"]) {
-        NSString *url = [NSString stringWithFormat:@"%@",urlStr];
-        NSArray * array = [url componentsSeparatedByString:@"=="];
-        url =  [array.firstObject stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-        [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"kNewWebControllerDismiss" object:nil];
-        //
-    }else {
-        NSString *url = [NSString stringWithFormat:@"%@%@", kHost, urlStr];
-        url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-        [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"kNewWebControllerDismiss" object:nil];
-    }
-    
-}
-
-// 点击通知 跳转到通知内url
--(void)requestWebView:(NSNotification *)notification{
-    NSDictionary * infoDict = [notification object];
-    if (!infoDict) {
-        return;
-    }
-    NSString * urlStr = [NSString stringWithFormat:@"%@",infoDict[@"url"]];
-    
-    if (urlStr) {
-        [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-        self.afterOpenPushMessage = YES;
-        
-        
-        [self performSelector:@selector(requestWebTime:) withObject:infoDict afterDelay:1];
-        //        if([infoDict[@"type"] isEqualToString:@"message"]) {
-        //            NSString *url = [NSString stringWithFormat:@"%@",urlStr];
-        //            url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-        //            [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-        //            [[NSNotificationCenter defaultCenter] postNotificationName:@"kNewWebControllerDismiss" object:nil];
-        //        }else {
-        //            NSString *url = [NSString stringWithFormat:@"%@%@", kHost, urlStr];
-        //            url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-        //            [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-        //            [[NSNotificationCenter defaultCenter] postNotificationName:@"kNewWebControllerDismiss" object:nil];
-        //        }
-        
-        
-    }
-    
-    
-}
-
-
-
-
-// 收到通知消息
--(void)afterReceiveNewMsg{
-    NSLog(@"afterReceiveNewMsg");
-    JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-    [context evaluateScript:@"afterReceiveNewMsg()"];
-}
-
-// 收到退出登录消息
--(void)loginOut:(NSNotification *)notification{
-    self.signOutContent = notification.object;
-    if (!self.signOutContent) {
-        self.signOutContent = @"1";
-    }
-    NSString *url = [NSString stringWithFormat:@"%@%@?sign=%@", kHost, @"jyapp/free/signOut", [LXUserDefaults token]];
-    url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-    
-<<<<<<< HEAD
-    UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
-    webView.delegate = self;
-    [self.view addSubview:webView];
-    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-=======
-    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-//    UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
-//    webView.delegate = self;
-//    [self.view addSubview:webView];
-//    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
->>>>>>> origin/developPay
-    
-    //    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-    [self jsRemoveUserToken:nil];
-}
-
-
-
-
-- (void)hideTabBar {
-    
-    kMainQueue(^{
-        if (self.tabBarController.tabBar.hidden == YES) {
-            return;
-        }
-        UIView *contentView;
-        if ( [[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] )
-            contentView = [self.tabBarController.view.subviews objectAtIndex:1];
-        else
-            contentView = [self.tabBarController.view.subviews objectAtIndex:0];
-        contentView.frame = CGRectMake(contentView.bounds.origin.x,  contentView.bounds.origin.y,  contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);
-        self.tabBarController.tabBar.hidden = YES;
-    });
-}
-- (void)showTabBar{
-    kMainQueue(^{
-        if (self.tabBarController.tabBar.hidden == NO)
-        {
-            return;
-        }
-        UIView *contentView;
-        if ([[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]])
-            
-            contentView = [self.tabBarController.view.subviews objectAtIndex:1];
-        
-        else
-            
-            contentView = [self.tabBarController.view.subviews objectAtIndex:0];
-        contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y,  contentView.bounds.size.width, contentView.bounds.size.height - self.tabBarController.tabBar.frame.size.height);
-        self.tabBarController.tabBar.hidden = NO;
-    });
-}
-
--(void)jsHiddenBottom:(NSString *)hidden
-{
-    if([hidden integerValue]==0) {
-        [self hideTabBar];
-        self.webView.frame = CGRectMake(0, -STATUS_BAR_HEIGHT, WIDTH, HEIGHT+STATUS_BAR_HEIGHT);
-    }else {
-        [self showTabBar];
-        self.webView.frame = CGRectMake(0, -STATUS_BAR_HEIGHT, WIDTH, HEIGHT-TAB_BAR_HEIGHT+STATUS_BAR_HEIGHT);
-    }
-}
-
--(void)judgeIsHidden
-{
-    NSString *current_url = [self.webView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
-    
-    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];
-        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);
-    }
-    
-}
-
-#pragma mark  捕获js中调用的方法
-
-//捕获js中调用的方法
-- (void)webViewDidFinishLoad:(UIWebView *)webView{
-    
-    [self judgeIsHidden];//是否隐藏
-    [self removeNoNetViews];
-    [[LXViewControllerManager shareViewControllerManager] hideHud];
-    JSContext *context = [webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-    // Disable user selection
-    [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitUserSelect='none';"];
-    // Disable callout
-    [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitTouchCallout='none';"];
-    
-    context[@"JyObj"] = self;
-    
-    [context evaluateScript:@"afterPageInit()"];
-    if (self.afterOpenPushMessage) {
-        self.afterOpenPushMessage = NO;
-        //        [context evaluateScript:@"afterOpenPushMessage()"];
-        [context evaluateScript:[NSString stringWithFormat:@"afterOpenPushMessage('%d')", [self jsIsCanBack:nil]]];
-    }
-    
-    NSString *url = webView.request.URL.absoluteString;
-    [self doSomeWithLoadUrl:url];
-}
-
--(void)doSomeWithLoadUrl:(NSString *)url{
-    if (!url) {
-        return;
-    }
-    if ([url containsString:@"signOut"]) { // 收到退出消息后 跳转到登录页面
-        //        [self webViewFirstRequest];
-        [self webViewRequestByMsg];
-    }else if ([url containsString:@"/free/login"]){ //  如果通过接收消息 跳转到登录页面 展示消息内容
-        if (self.signOutContent && ![self.signOutContent isEqualToString:@"1"]) {
-            [[LXViewControllerManager shareViewControllerManager] showAlertViewWithTitle:@"提示" message:self.signOutContent actions:@[[UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-                self.signOutContent = nil;
-            }]]];
-        }else{
-            self.signOutContent = nil;
-        }
-    }
-}
-
--(void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error{
-    [[LXViewControllerManager shareViewControllerManager] hideHud];
-    
-    NSString *url = webView.request.URL.absoluteString;
-    [self doSomeWithLoadUrl:url];
-}
-
-
-
--(void)webViewDidStartLoad:(UIWebView *)webView{
-    //    if ([[UIDevice currentDevice].systemVersion floatValue] < 10) {
-    //        [[LXViewControllerManager shareViewControllerManager] hideHud];
-    //    }
-}
-
-
-- (void)didReceiveMemoryWarning {
-    [super didReceiveMemoryWarning];
-//    [self clearWeb];
-    // Dispose of any resources that can be recreated.
-    
-    //当前页面:http://jianyu360.mikecrm.com/9Li9dpM
-    //https://mp.weixin.qq.com/s/jomQtxcanA-Nszgy1ubuhA
-}
-
--(void)clearWeb{
-    NSURLCache * cache = [NSURLCache sharedURLCache];
-    [cache removeAllCachedResponses];
-    [cache setDiskCapacity:0];
-    [cache setMemoryCapacity:0];
-}
-
--(void)addNoNetViews{
-    kMainQueue(^{
-        [self removeNoNetViews];
-        self.noNetView = [NoNetView shareView];
-        [self.view addSubview:self.noNetView];
-    });
-}
-
--(void)removeNoNetViews{
-    if (self.noNetView ) {
-        [self.noNetView removeFromSuperview];
-        self.noNetView  = nil;
-    }
-}
-
-
-#pragma  mark JS 回调
-// 微信登录
--(NSString *)jsLoginByWeixin:(NSString *)str{
-    
-    if ([LXUserDefaults isInstallWeiXin] != 1) { // 没有安装微信 不走友盟
-        [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"微信登录失败,没有安装微信" delay:1.5];
-        return nil;
-    }
-    
-    kMainQueue(^{
-        
-        [[UMSocialManager defaultManager] getUserInfoWithPlatform:UMSocialPlatformType_WechatSession currentViewController:self completion:^(id result, NSError *error) {
-            
-            UMSocialUserInfoResponse *resp = result;
-            
-            [self dealWXDic:(NSDictionary *)resp.originalResponse];
-            
-            [[LXViewControllerManager shareViewControllerManager] hideHud];
-        }];
-        
-        
-        
-    });
-    
-    return nil;
-}
-// 处理微信登录获取到的数据
--(void)dealWXDic:(NSDictionary *)dictionary{
-    
-    [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-    //如果获取到用户信息,即用户点击了“登录”,则进行用户信息获取
-    if (dictionary.count > 0) {
-        
-        NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithDictionary:dictionary];
-        
-        if (dic) {
-            [dic removeObjectForKey:@"privilege"];
-            [dic removeObjectForKey:@"language"];
-            double currDouble = [[NSDate date] timeIntervalSince1970];
-            [dic setObject:[NSNumber numberWithLong:(long)currDouble] forKey:@"createtime"];
-            
-            //         拼接标志位
-            NSString *sign = [NSString stringWithFormat:@"city=%@&country=%@&createtime=%@&headimgurl=%@&nickname=%@&openid=%@&province=%@&sex=%@&unionid=%@", dic[@"city"], dic[@"country"], dic[@"createtime"], dic[@"headimgurl"], dic[@"nickname"], dic[@"openid"], dic[@"province"],dic[@"sex"],dic[@"unionid"]];
-            sign = [LXMD5 md532BitLower:sign];
-            [dic setObject:sign forKey:@"sign"];
-            NSString *endStr = [[LXViewControllerManager shareViewControllerManager] getJsonStr:dic];
-            NSData *data = [endStr dataUsingEncoding:NSUTF8StringEncoding];
-            endStr = [data base64EncodedStringWithOptions:0];
-            
-            
-            JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-            NSString * textJS1 = [NSString stringWithFormat:@"loginByWeixinCallBack('%@')", endStr];
-            JSValue *value =   [context evaluateScript:textJS1];
-            NSLog(@"%@", value);
-            
-        }
-    }
-    
-}
-
-// js 调用分享
--(void)jsShare:(NSString *)type title:(NSString *)title content:(NSString *)content link:(NSString *)link{
-    UMSocialPlatformType shareType;
-    
-    if ([type intValue] == 1) { // 微信好友
-        shareType = UMSocialPlatformType_WechatSession;
-    }else if ([type intValue] == 2){ /// qq好友
-        shareType = UMSocialPlatformType_QQ;
-    }else if ([type intValue] == 3){ // 朋友圈
-        shareType = UMSocialPlatformType_WechatTimeLine;
-    }else{
-        shareType = UMSocialPlatformType_WechatSession;
-    }
-    
-    kMainQueue((^{
-        
-        //         没有安装app 不走分享逻辑
-        if ([type intValue] == 1 || [type intValue] == 3) {
-            if ([LXUserDefaults isInstallWeiXin] != 1) {
-                [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"没有安装微信" delay:1.5];
-                return;
-            }
-        }
-        //         没有安装app 不走分享逻辑
-        if ([type intValue] == 2) {
-            if (![[UMSocialManager defaultManager] isInstall:UMSocialPlatformType_QQ]) {
-                [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"没有安装QQ" delay:1.5];
-                return;
-            }
-        }
-        
-        //创建分享消息对象
-        UMSocialMessageObject *messageObject = [UMSocialMessageObject messageObject];
-        //创建网页内容对象
-        UMShareWebpageObject *shareObject = [UMShareWebpageObject shareObjectWithTitle:title descr:content thumImage:[UIImage imageNamed:@"logo"]];
-        //设置网页地址
-        shareObject.webpageUrl = link;
-        messageObject.shareObject = shareObject;
-        //调用分享接口
-        [[UMSocialManager defaultManager] shareToPlatform:shareType messageObject:messageObject currentViewController:self completion:^(id data, NSError *error) {
-            if (error) {
-                NSLog(@"22222222%@",error.userInfo);
-                if (error.userInfo[@"message"] && [error.userInfo[@"message"] containsString:@"Operation is cancel"]) {
-                    [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"取消分享" delay:1];
-                }else{
-                    [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:error.userInfo[@"message"] delay:1];
-                }
-                
-                NSString *textJS =  [NSString stringWithFormat:@"shareCallBack('%@','%@')",type,@"0"];
-                JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-                [context evaluateScript:textJS];
-                
-            }else{
-                if ([data isKindOfClass:[UMSocialShareResponse class]]) {
-                    UMSocialShareResponse *resp = data;
-                    NSLog(@"33333%@",resp.message);
-                    NSLog(@"44444%@",resp.originalResponse);
-                    
-                    NSString *textJS =  [NSString stringWithFormat:@"shareCallBack('%@','%@')",type,@"1"];
-                    JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-                    [context evaluateScript:textJS];
-                    
-                }else{
-                    UMSocialLogInfo(@"response data is %@",data);
-                    NSLog(@"55555%@",data);
-                }
-            }
-        }];
-    }));
-}
-
-// 登录时获取到令牌 并保存
--(void)jsSaveUserToken:(NSString *)token{
-    [[LXViewControllerManager shareViewControllerManager] hideHud];
-    [LXUserDefaults saveToken:token];
-}
-
-// 取本地的用户令牌
--(NSString *)jsGetUserToken:(NSString *)str{
-    return [LXUserDefaults token];
-}
-
-// 退出时 清空用户数据
--(void)jsRemoveUserToken:(NSString *)str{
-    [LXUserDefaults clearAll];
-    //    [[LXDataBaseManager shareDataBaseManager] clearAll];
-    
-}
-
-
-// 手机通知权限是否打开
--(int)jsCheckNoticePermission:(NSString *)str{
-    int a = [LXUserDefaults notifyState];
-    return a;
-}
-
-// 跳转到系统设置
--(void)jsOpenSystemNotification:(NSString *)str{
-    self.updateNotify = YES;
-    kMainQueue(^{
-        [[UIApplication sharedApplication]openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
-    });
-}
-
-// 调用js方法 刷新推送权限状态
--(void)updateNotifyState{
-    if (self.updateNotify) {
-        self.updateNotify = NO;
-        JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-        NSString * textJS1 = [NSString stringWithFormat:@"updateNoticeSwitch()"];
-        [context evaluateScript:textJS1];
-    }
-}
-// 获取推送id
--(NSString *)jsGetPushRid:(NSString *)str{
-    return [LXUserDefaults registrationID];
-}
-
-// 按通知取数据
--(NSString *)jsGetMessageList:(NSString *)openid{
-    NSArray *arr = [[LXDataBaseManager shareDataBaseManager] getMessageWithKey:nil openid:openid fromTable:kNewsTable start:0 length:100];
-    if (arr.count > 0) {
-        return [[LXViewControllerManager shareViewControllerManager] getJsonStr:arr];
-    }
-    return @"";
-}
-
-// 更新消息状态
--(void)jsUpdateMessageState:(NSNumber *)lxID state:(NSNumber *)state{
-    [[LXDataBaseManager shareDataBaseManager] changeReadedWithID:lxID state:state];
-}
-
-// 删除一条数据
--(void)jsDeleteMessageById:(NSNumber *)lxID{
-    [[LXDataBaseManager shareDataBaseManager] deleteMessage:lxID fromTable:kNewsTable];
-}
-
-// 取单条数据
--(NSString *)jsGetMessage:(NSString *)lxID{
-    return [[LXViewControllerManager shareViewControllerManager] getJsonStr:[[LXDataBaseManager shareDataBaseManager] getMessageWithKey:lxID openid:nil fromTable:kNewsTable start:0 length:0]];
-}
-// 取未读消息总数
--(int)jsGetUnReadMessageCount:(NSString *)openid{
-    NSLog(@"openid=%@",openid);
-    //    NSLog(@"%d",[[LXDataBaseManager shareDataBaseManager] getUnReadMessageCount:openid]);
-    
-    return [[LXDataBaseManager shareDataBaseManager] getUnReadMessageCount:openid];
-}
-
-// 全部置为已读
--(void)jsUpdateAllUnReadMessage:(NSString *)openid{
-    [[LXDataBaseManager shareDataBaseManager] updateAllUnReadMessage:openid];
-}
-
-// 改变状态栏文字颜色
--(void)jsLightStatusBar:(NSString *)status{
-    kMainQueue(^{
-        NSInteger index = 0;
-        if ([status intValue] == 1) {
-            index = 1;// hei
-        }else{
-            index = 0;// bai
-        }
-        [[UIApplication sharedApplication] setStatusBarStyle:index];
-    });
-    
-}
-// 打开新页面 加载新web
--(void)jsOpenExternalLink:(NSString *)url title:(NSString *)title{
-    if (url) {
-        if ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable || [AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusUnknown) {
-            //            [self addNoNetViews];
-        }
-        NewWebController *ctr = [[NewWebController alloc] init];
-        ctr.url = url;
-        //         有title的话 会显示自定义的导航栏 没有的话不显示导航栏 显示加载进度条
-        if (!title || [title isEqualToString:@""] || [title isEqualToString:@"undefined"]) {
-            ctr.titleShow = nil;
-        }else{
-            ctr.titleShow = title;
-        }
-        kMainQueue(^{
-            [self presentViewController:ctr animated:NO completion:nil];
-        });
-    }
-}
-
-// 获取当前版本号
--(NSString *)jsGetVersion:(NSString *)str{
-    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
-}
-
-// web是否可退回上页面
--(int)jsIsCanBack:(NSString *)str{
-    return self.webView.canGoBack ? 1:0;
-}
-
-// 弹框
--(void)jsAlert:(NSString *)content{
-    [[LXViewControllerManager shareViewControllerManager] showAlertViewWithMessage:content];
-}
-
-// 是否安装微信
--(int)jsIsInstallWeixin:(NSString *)str{
-    return [LXUserDefaults isInstallWeiXin];
-}
-
-
--(void)jsChangeMessageType:(NSString *)link
-{
-    //已读操作处理
-    NSLog(@"已读操作处理-更改");
-    [[LXDataBaseManager shareDataBaseManager] changeCatagoryTypeWithURL:link];
-}
-
-
-
-
-
-
-
--(void)jsOpenActivityPage:(NSString *)url rectype:(NSString *)rectype openid:(NSString *)openid
-{
-    NSDictionary * infoDic = @{@"url":url,
-                               @"rectype":rectype,
-                               @"openid":openid,
-                               };
-    
-    //    NSString *textJS =  [NSString stringWithFormat:@"messageAccept('%@','%@','%@')",infoDic[@"mid"],infoDic[@"rectype"],infoDic[@"openid"]];
-    //    JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-    //    [context evaluateScript:textJS];
-    
-    
-    //post请求
-    NSLog(@"%@",[NSString stringWithFormat:@"%@jyapp/free/message/receive",kHost]);
-    [[LXNetworkManager shareLXNetworkManager]postWithURLStr:[NSString stringWithFormat:@"%@jyapp/free/message/receive",kHost] parameters:infoDic progress:^(NSProgress *progress) {
-        NSLog(@"成功:%@",progress);
-    } success:^(id responseObject) {
-        NSLog(@"responseObject=%@",responseObject);
-    } failure:^(NSError *error) {
-        NSLog(@"error=%@",error);
-    }];
-    
-    
-}
-
-
-
-
-
-<<<<<<< HEAD
--(NSString *)jsGGetCipherText:(NSString *)phone
-=======
--(NSString *)jsGetCipherText:(NSString *)phone
->>>>>>> origin/developPay
-{
-    
-    NSDate *date=[NSDate date];
-    NSDateFormatter *format1=[[NSDateFormatter alloc] init];
-    [format1 setDateFormat:@"yyyyMMddhhmmss"];
-    NSString *dateStr;
-    dateStr=[format1 stringFromDate:date];
-    NSLog(@"%@",dateStr);
-    
-    NSString *content = [[NSString stringWithFormat:@"%@_%@",phone,dateStr] stringByAppendingString:[NSString stringWithFormat:@"_%@",[LXMD5 md532BitLower:[NSString stringWithFormat:@"%@&%@",phone,dateStr]]]];
-    NSData *contentData = [content dataUsingEncoding:NSUTF8StringEncoding];
-    NSUInteger dataLength = contentData.length;
-    // 为结束符'\\0' +1
-    char keyPtr[kKeySize + 1];
-    memset(keyPtr, 0, sizeof(keyPtr));
-    [AesKey getCString:keyPtr maxLength:sizeof(keyPtr) encoding:NSUTF8StringEncoding];
-    // 密文长度 <= 明文长度 + BlockSize
-    size_t encryptSize = dataLength + kCCBlockSizeAES128;
-    void *encryptedBytes = malloc(encryptSize);
-    size_t actualOutSize = 0;
-    NSData *initVector = [kInitVector dataUsingEncoding:NSUTF8StringEncoding];
-    CCCryptorStatus cryptStatus = CCCrypt(kCCEncrypt,
-                                          kCCAlgorithmAES,
-                                          kCCOptionPKCS7Padding,  // 系统默认使用 CBC,然后指明使用 PKCS7Padding
-                                          keyPtr,
-                                          kKeySize,
-                                          initVector.bytes,
-                                          contentData.bytes,
-                                          dataLength,
-                                          encryptedBytes,
-                                          encryptSize,
-                                          &actualOutSize);
-    if (cryptStatus == kCCSuccess) {
-        // 对加密后的数据进行 base64 编码
-        return [[NSData dataWithBytesNoCopy:encryptedBytes length:actualOutSize] base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];
-    }
-    free(encryptedBytes);
-    return nil;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-@end

+ 0 - 715
ios/JianYuIOS/JianYuIOS/ViewController_BASE_16982.m

@@ -1,715 +0,0 @@
-//
-//  ViewController.m
-//  JianYuIOS
-//
-//  Created by lixianglan on 2018/1/19.
-//  Copyright © 2018年 lixianglan. All rights reserved.
-//
-
-#import "ViewController.h"
-#import <JavaScriptCore/JavaScriptCore.h>
-#import <UShareUI/UShareUI.h>
-#import <UMSocialCore/UMSocialCore.h>
-#import "NewWebController.h"
-#import <UMSocialCore/UMSocialCore.h>
-#import <AFNetworking.h>
-#import "NoNetView.h"
-//#import <WebKit/WebKit.h>
-
-
-
-#define KIsiPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
-
-@protocol ViewControllerMain<JSExport>
-
-//测试
-
-
-@end
-
-@protocol ViewControllerJSExport<JSExport>
-
-JSExportAs(loginByWeixin, -(NSString *)jsLoginByWeixin:(NSString *)str);// 微信登录 openid
-JSExportAs(share, -(void)jsShare:(NSString *)type title:(NSString *)title content:(NSString *)content link:(NSString *)link); // 调用分享
-JSExportAs(saveUserToken, -(void)jsSaveUserToken:(NSString *)token);// 登录时获取令牌 保存
-JSExportAs(getUserToken, -(NSString *)jsGetUserToken:(NSString *)str);// 取本地存的令牌
-JSExportAs(removeUserToken, -(void)jsRemoveUserToken:(NSString *)str); // 退出时清空数据
-JSExportAs(checkNoticePermission, -(int)jsCheckNoticePermission:(NSString *)str); // 查询手机通知是否打开
-JSExportAs(openSystemNotification, -(void)jsOpenSystemNotification:(NSString *)str);// 跳转到系统设置
-JSExportAs(getPushRid, -(NSString *)jsGetPushRid:(NSString *)str);// 返回极光id
-JSExportAs(getMessageList, -(NSString *)jsGetMessageList:(NSString *)openid);// 按通知接收时间倒排,取前100条
-JSExportAs(updateMessageState, -(void)jsUpdateMessageState:(NSString *)lxID state:(NSString *)state);// 更新状态
-JSExportAs(deleteMessageById, -(void)jsDeleteMessageById:(NSString *)lxID);// 删除一条消息
-JSExportAs(getMessage, -(NSString *)jsGetMessage:(NSString *)lxID);// 取单条数据
-JSExportAs(getUnReadMessageCount, -(int)jsGetUnReadMessageCount:(NSString *)openid);// 获取未读消息总数
-JSExportAs(updateAllUnReadMessage, -(void)jsUpdateAllUnReadMessage:(NSString *)openid);// 全部置为已读
-JSExportAs(lightStatusBar, -(void)jsLightStatusBar:(NSString *)status);// 导航栏文字颜色
-JSExportAs(openExternalLink, -(void)jsOpenExternalLink:(NSString *)url title:(NSString *)title);// 打开新控制器 加载新web
-JSExportAs(getVersion, -(NSString *)jsGetVersion:(NSString *)str);// 获取当前版本号
-JSExportAs(alert, -(void)jsAlert:(NSString *)content);// 弹框
-JSExportAs(isInstallWeixin, -(int)jsIsInstallWeixin:(NSString *)str);// 是否安装微信
-
-
-JSExportAs(changeMessageType, -(void)jsChangeMessageType:(NSString *)link);//已读操作处理
-JSExportAs(openActivityPage, -(void)jsOpenActivityPage:(NSString *)url rectype:(NSString *)rectype openid:(NSString *)openid);
-
-
-
-
-@end
-
-
-
-@interface ViewController ()<UIWebViewDelegate, ViewControllerJSExport>
-{
-    CGPoint startTouch;
-    BOOL _isMoving;
-}
-
-@property (weak, nonatomic) IBOutlet UIWebView *webView;
-//@property(nonatomic, assign)BOOL ;
-@property(nonatomic, assign)BOOL updateNotify;
-@property(nonatomic, assign)BOOL afterOpenPushMessage;
-@property (weak, nonatomic) IBOutlet NSLayoutConstraint *topC;
-//@property(nonatomic, strong)WKWebView *wkWebView;
-@property(nonatomic, strong)NoNetView *noNetView;
-@property(nonatomic, strong)NSURLRequest *errRequest;
-@property(nonatomic, strong)NSString *signOutContent;
-
-
-
-
-@end
-
-@implementation ViewController
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    
-    [LXDataBaseManager shareDataBaseManager];
-    if ([[UIDevice currentDevice].systemVersion floatValue] >= 11.0) {
-//        if(KIsiPhoneX) {
-//            self.topC.constant = -44;
-//            [self.webView updateConstraints];
-//        }else {
-//            self.topC.constant = -20;
-//            [self.webView updateConstraints];
-//        }
-        self.topC.constant = -20;
-        [self.webView updateConstraints];
-    }
-    
-    self.webView.scrollView.bounces = NO;
-    [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-    [self webViewFirstRequest];//请求页面数据
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(requestWebView:) name:kRequestWebViewWithUrl object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateNotifyState) name:kUpdateNotifyState object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(afterReceiveNewMsg) name:kAfterReceiveNewMsg object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadWebView) name:kReloadWebVIew object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginOut:) name:kLoginOut object:nil];
-    
-    [[AFNetworkReachabilityManager sharedManager] startMonitoring];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(netReachChanged:) name:AFNetworkingReachabilityDidChangeNotification object:nil];
-    
-    
-
-    
-//    [self clearWeb];
-
-    UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(paningGestureReceive:)];
-    [recognizer delaysTouchesBegan];
-    [self.view addGestureRecognizer:recognizer];
-}
-
--(void)moveViewWithX:(float)x
-{
-    CGRect rect = self.view.bounds;
-    CGFloat width = CGRectGetWidth(rect);
-    x = x>width?width:x;
-    x = x<0?0:x;
-    CGRect frame = self.webView.frame;
-    frame.origin.x = x;
-    self.webView.frame = frame;
-}
-
-#pragma mark – Gesture Recognizer –
--(void)paningGestureReceive:(UIPanGestureRecognizer *)recoginzer
-{
-    CGRect rect = self.view.bounds;
-    CGFloat width = CGRectGetWidth(rect);
-    if (![self.webView canGoBack]) {
-        NSLog(@"不可返回");
-        return;
-    }
-    
-    NSString *current_url = [self.webView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
-    NSLog(@"当前页面:%@",current_url);
-//    NSString *current_url = self.webView.request.URL.absoluteString;
-    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]]){
-        return;
-    }
-
-    //https://www.jianyu360.com/jyapp/free/me
-    //https://www.jianyu360.com/jyapp/jylab/index
-    //https://www.jianyu360.com/jyapp/wxkeyset/keyset/index
-    //https://www.jianyu360.com/jyapp/jylab/mainSearch
-    
-    CGPoint touchPoint = [recoginzer locationInView:[UIApplication sharedApplication].keyWindow];
-    if (recoginzer.state==UIGestureRecognizerStateBegan) {
-        _isMoving = YES;
-        startTouch = touchPoint;
-    } else if (recoginzer.state==UIGestureRecognizerStateEnded){
-        if (touchPoint.x - startTouch.x > width*0.125) {
-            [UIView animateWithDuration:0.3 animations:^{
-                [self moveViewWithX:width];
-                [self.webView goBack];
-            } completion:^(BOOL finished) {
-                _isMoving = NO;
-                [self moveViewWithX:0];
-            }];
-        } else {
-            [UIView animateWithDuration:0.3 animations:^{
-                [self moveViewWithX:0];
-            } completion:^(BOOL finished) {
-                _isMoving = NO;
-            }];
-        }
-        return;
-    } else if (recoginzer.state==UIGestureRecognizerStateCancelled){
-        [UIView animateWithDuration:0.3 animations:^{
-            [self moveViewWithX:0];
-        } completion:^(BOOL finished) {
-            _isMoving = NO;
-        }];
-        return;
-    }
-    if (_isMoving) {
-        [self moveViewWithX:touchPoint.x - startTouch.x];
-    }
-}
-
-
-// 监控网络状态变化
--(void)netReachChanged:(NSNotification *)notificaition{
-    NSDictionary *userInfo = notificaition.userInfo;
-    if ([userInfo[@"AFNetworkingReachabilityNotificationStatusItem"] intValue] == 0 || [userInfo[@"AFNetworkingReachabilityNotificationStatusItem"] intValue] == -1) {
-        [self addNoNetViews];
-    }else{
-        if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"firstLoad"] intValue] == 0) {
-            [[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"firstLoad"];
-            [self removeNoNetViews];
-            [self webViewFirstRequest];
-        }
-    }
-}
-
-// 再次加载页面
--(void)reloadWebView{
-    [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-    if (!self.webView.canGoBack) {
-        [self webViewFirstRequest];
-    }else{
-        [self.webView reload];
-    }
-
-}
-
-// 首次加载web
--(void)webViewFirstRequest{
-    NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/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]]];
-    
-}
-
-//收到消息退出并重新加载web
--(void)webViewRequestByMsg{
-    NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/kicked"];
-    url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-}
-
--(void)requestWebTime:(NSDictionary *)infoDict
-{
-    NSString * urlStr = [NSString stringWithFormat:@"%@",infoDict[@"url"]];
-
-    if([infoDict[@"type"] isEqualToString:@"message"]) {
-        NSString *url = [NSString stringWithFormat:@"%@",urlStr];
-        NSArray * array = [url componentsSeparatedByString:@"=="];
-        url =  [array.firstObject stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-        [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"kNewWebControllerDismiss" object:nil];
-//
-    }else {
-        NSString *url = [NSString stringWithFormat:@"%@%@", kHost, urlStr];
-        url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-        [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"kNewWebControllerDismiss" object:nil];
-    }
-    
-}
-
-// 点击通知 跳转到通知内url
--(void)requestWebView:(NSNotification *)notification{
-    NSDictionary * infoDict = [notification object];
-    if (!infoDict) {
-        return;
-    }
-    NSString * urlStr = [NSString stringWithFormat:@"%@",infoDict[@"url"]];
-
-    if (urlStr) {
-        [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-        self.afterOpenPushMessage = YES;
-        
-        
-        [self performSelector:@selector(requestWebTime:) withObject:infoDict afterDelay:1];
-//        if([infoDict[@"type"] isEqualToString:@"message"]) {
-//            NSString *url = [NSString stringWithFormat:@"%@",urlStr];
-//            url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-//            [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-//            [[NSNotificationCenter defaultCenter] postNotificationName:@"kNewWebControllerDismiss" object:nil];
-//        }else {
-//            NSString *url = [NSString stringWithFormat:@"%@%@", kHost, urlStr];
-//            url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-//            [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-//            [[NSNotificationCenter defaultCenter] postNotificationName:@"kNewWebControllerDismiss" object:nil];
-//        }
-        
-        
-    }
-
-    
-}
-
-
-
-
-// 收到通知消息
--(void)afterReceiveNewMsg{
-    NSLog(@"afterReceiveNewMsg");
-    JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-    [context evaluateScript:@"afterReceiveNewMsg()"];
-}
-
-// 收到退出登录消息
--(void)loginOut:(NSNotification *)notification{
-    self.signOutContent = notification.object;
-    if (!self.signOutContent) {
-        self.signOutContent = @"1";
-    }
-    NSString *url = [NSString stringWithFormat:@"%@%@?sign=%@", kHost, @"jyapp/free/signOut", [LXUserDefaults token]];
-    url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-
-    UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
-    webView.delegate = self;
-    [self.view addSubview:webView];
-    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-
-//    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-    [self jsRemoveUserToken:nil];
-}
-
-
-
-
-
-#pragma mark  捕获js中调用的方法
-
-//捕获js中调用的方法
-- (void)webViewDidFinishLoad:(UIWebView *)webView{
-    [self removeNoNetViews];
-    [[LXViewControllerManager shareViewControllerManager] hideHud];
-    JSContext *context = [webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-    // Disable user selection
-    [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitUserSelect='none';"];
-    // Disable callout
-    [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitTouchCallout='none';"];
-    
-    context[@"JyObj"] = self;
-    
-    [context evaluateScript:@"afterPageInit()"];
-    if (self.afterOpenPushMessage) {
-        self.afterOpenPushMessage = NO;
-//        [context evaluateScript:@"afterOpenPushMessage()"];
-        [context evaluateScript:[NSString stringWithFormat:@"afterOpenPushMessage('%d')", [self jsIsCanBack:nil]]];
-    }
-    
-    NSString *url = webView.request.URL.absoluteString;
-    [self doSomeWithLoadUrl:url];
-}
-
--(void)doSomeWithLoadUrl:(NSString *)url{
-    if (!url) {
-        return;
-    }
-    if ([url containsString:@"signOut"]) { // 收到退出消息后 跳转到登录页面
-//        [self webViewFirstRequest];
-        [self webViewRequestByMsg];
-    }else if ([url containsString:@"/free/login"]){ //  如果通过接收消息 跳转到登录页面 展示消息内容
-        if (self.signOutContent && ![self.signOutContent isEqualToString:@"1"]) {
-            [[LXViewControllerManager shareViewControllerManager] showAlertViewWithTitle:@"提示" message:self.signOutContent actions:@[[UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-                self.signOutContent = nil;
-            }]]];
-        }else{
-            self.signOutContent = nil;
-        }
-    }
-}
-
--(void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error{
-    [[LXViewControllerManager shareViewControllerManager] hideHud];
-
-    NSString *url = webView.request.URL.absoluteString;
-    [self doSomeWithLoadUrl:url];
-}
-
-
-
--(void)webViewDidStartLoad:(UIWebView *)webView{
-//    if ([[UIDevice currentDevice].systemVersion floatValue] < 10) {
-//        [[LXViewControllerManager shareViewControllerManager] hideHud];
-//    }
-}
-
-
-- (void)didReceiveMemoryWarning {
-    [super didReceiveMemoryWarning];
-    [self clearWeb];
-    // Dispose of any resources that can be recreated.
-}
-
--(void)clearWeb{
-    NSURLCache * cache = [NSURLCache sharedURLCache];
-    [cache removeAllCachedResponses];
-    [cache setDiskCapacity:0];
-    [cache setMemoryCapacity:0];
-}
-
--(void)addNoNetViews{
-    kMainQueue(^{
-        [self removeNoNetViews];
-        self.noNetView = [NoNetView shareView];
-        [self.view addSubview:self.noNetView];
-    });
-}
-
--(void)removeNoNetViews{
-    if (self.noNetView ) {
-        [self.noNetView removeFromSuperview];
-        self.noNetView  = nil;
-    }
-}
-
-
-#pragma  mark JS 回调
-// 微信登录
--(NSString *)jsLoginByWeixin:(NSString *)str{
-
-    if ([LXUserDefaults isInstallWeiXin] != 1) { // 没有安装微信 不走友盟
-        [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"微信登录失败,没有安装微信" delay:1.5];
-        return nil;
-    }
-    
-    kMainQueue(^{
-        
-        [[UMSocialManager defaultManager] getUserInfoWithPlatform:UMSocialPlatformType_WechatSession currentViewController:self completion:^(id result, NSError *error) {
-            
-            UMSocialUserInfoResponse *resp = result;
-            
-            [self dealWXDic:(NSDictionary *)resp.originalResponse];
-            
-            [[LXViewControllerManager shareViewControllerManager] hideHud];
-        }];
-        
-        
-        
-    });
-    
-    return nil;
-}
-// 处理微信登录获取到的数据
--(void)dealWXDic:(NSDictionary *)dictionary{
-    
-    [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-    //如果获取到用户信息,即用户点击了“登录”,则进行用户信息获取
-    if (dictionary.count > 0) {
-        
-        NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithDictionary:dictionary];
-        
-        if (dic) {
-            [dic removeObjectForKey:@"privilege"];
-            [dic removeObjectForKey:@"language"];
-            double currDouble = [[NSDate date] timeIntervalSince1970];
-            [dic setObject:[NSNumber numberWithLong:(long)currDouble] forKey:@"createtime"];
-            
-            //         拼接标志位
-            NSString *sign = [NSString stringWithFormat:@"city=%@&country=%@&createtime=%@&headimgurl=%@&nickname=%@&openid=%@&province=%@&sex=%@&unionid=%@", dic[@"city"], dic[@"country"], dic[@"createtime"], dic[@"headimgurl"], dic[@"nickname"], dic[@"openid"], dic[@"province"],dic[@"sex"],dic[@"unionid"]];
-            sign = [LXMD5 md532BitLower:sign];
-            [dic setObject:sign forKey:@"sign"];
-            NSString *endStr = [[LXViewControllerManager shareViewControllerManager] getJsonStr:dic];
-            NSData *data = [endStr dataUsingEncoding:NSUTF8StringEncoding];
-            endStr = [data base64EncodedStringWithOptions:0];
-            
-            
-            JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-            NSString * textJS1 = [NSString stringWithFormat:@"loginByWeixinCallBack('%@')", endStr];
-            JSValue *value =   [context evaluateScript:textJS1];
-            LXLog(@"%@", value);
-            
-        }
-    }
-    
-}
-
-// js 调用分享
--(void)jsShare:(NSString *)type title:(NSString *)title content:(NSString *)content link:(NSString *)link{
-    UMSocialPlatformType shareType;
-
-    if ([type intValue] == 1) { // 微信好友
-        shareType = UMSocialPlatformType_WechatSession;
-    }else if ([type intValue] == 2){ /// qq好友
-        shareType = UMSocialPlatformType_QQ;
-    }else if ([type intValue] == 3){ // 朋友圈
-        shareType = UMSocialPlatformType_WechatTimeLine;
-    }else{
-        shareType = UMSocialPlatformType_WechatSession;
-    }
-    
-    kMainQueue(^{
-        
-//         没有安装app 不走分享逻辑
-        if ([type intValue] == 1 || [type intValue] == 3) {
-            if ([LXUserDefaults isInstallWeiXin] != 1) {
-                [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"没有安装微信" delay:1.5];
-                return;
-            }
-        }
-//         没有安装app 不走分享逻辑
-        if ([type intValue] == 2) {
-            if (![[UMSocialManager defaultManager] isInstall:UMSocialPlatformType_QQ]) {
-                [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"没有安装QQ" delay:1.5];
-                return;
-            }
-        }
-        
-        //创建分享消息对象
-        UMSocialMessageObject *messageObject = [UMSocialMessageObject messageObject];
-        //创建网页内容对象
-        UMShareWebpageObject *shareObject = [UMShareWebpageObject shareObjectWithTitle:title descr:content thumImage:[UIImage imageNamed:@"logo"]];
-        //设置网页地址
-        shareObject.webpageUrl = link;
-        messageObject.shareObject = shareObject;
-        //调用分享接口
-        [[UMSocialManager defaultManager] shareToPlatform:shareType messageObject:messageObject currentViewController:self completion:^(id data, NSError *error) {
-            if (error) {
-                UMSocialLogInfo(@"************Share fail with error %@*********",error);
-                if (error.userInfo[@"message"] && [error.userInfo[@"message"] containsString:@"cancel"]) {
-                    [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"取消分享" delay:1];
-                }else{
-                    [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:error.userInfo[@"message"] delay:1];
-                }
-            }else{
-                if ([data isKindOfClass:[UMSocialShareResponse class]]) {
-                    UMSocialShareResponse *resp = data;
-                    NSLog(@"%@",resp.message);
-                    NSLog(@"response originalResponse data is %@",resp.originalResponse);
-                    //分享结果消息
-                    UMSocialLogInfo(@"response message is %@",resp.message);
-                    //第三方原始返回的数据
-                    UMSocialLogInfo(@"response originalResponse data is %@",resp.originalResponse);
-                    
-                }else{
-                    UMSocialLogInfo(@"response data is %@",data);
-                }
-            }
-        }];
-    });
-}
-
-// 登录时获取到令牌 并保存
--(void)jsSaveUserToken:(NSString *)token{
-    [[LXViewControllerManager shareViewControllerManager] hideHud];
-    [LXUserDefaults saveToken:token];
-}
-
-// 取本地的用户令牌
--(NSString *)jsGetUserToken:(NSString *)str{
-    return [LXUserDefaults token];
-}
-
-// 退出时 清空用户数据
--(void)jsRemoveUserToken:(NSString *)str{
-    [LXUserDefaults clearAll];
-//    [[LXDataBaseManager shareDataBaseManager] clearAll];
-    
-}
-
-
-// 手机通知权限是否打开
--(int)jsCheckNoticePermission:(NSString *)str{
-    int a = [LXUserDefaults notifyState];
-    return a;
-}
-
-// 跳转到系统设置
--(void)jsOpenSystemNotification:(NSString *)str{
-    self.updateNotify = YES;
-    kMainQueue(^{
-         [[UIApplication sharedApplication]openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
-    });
-}
-
-// 调用js方法 刷新推送权限状态
--(void)updateNotifyState{
-    if (self.updateNotify) {
-        self.updateNotify = NO;
-        JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-        NSString * textJS1 = [NSString stringWithFormat:@"updateNoticeSwitch()"];
-         [context evaluateScript:textJS1];
-    }
-}
-// 获取推送id
--(NSString *)jsGetPushRid:(NSString *)str{
-    return [LXUserDefaults registrationID];
-}
-
-// 按通知取数据
--(NSString *)jsGetMessageList:(NSString *)openid{
-    NSArray *arr = [[LXDataBaseManager shareDataBaseManager] getMessageWithKey:nil openid:openid fromTable:kNewsTable start:0 length:100];
-    if (arr.count > 0) {
-        return [[LXViewControllerManager shareViewControllerManager] getJsonStr:arr];
-    }
-    return@"";
-}
-
-// 更新消息状态
--(void)jsUpdateMessageState:(NSNumber *)lxID state:(NSNumber *)state{
-    [[LXDataBaseManager shareDataBaseManager] changeReadedWithID:lxID state:state];
-}
-
-// 删除一条数据
--(void)jsDeleteMessageById:(NSNumber *)lxID{
-    [[LXDataBaseManager shareDataBaseManager] deleteMessage:lxID fromTable:kNewsTable];
-}
-
-// 取单条数据
--(NSString *)jsGetMessage:(NSString *)lxID{
-    return [[LXViewControllerManager shareViewControllerManager] getJsonStr:[[LXDataBaseManager shareDataBaseManager] getMessageWithKey:lxID openid:nil fromTable:kNewsTable start:0 length:0]];
-}
-// 取未读消息总数
--(int)jsGetUnReadMessageCount:(NSString *)openid{
-    NSLog(@"openid=%@",openid);
-//    NSLog(@"%d",[[LXDataBaseManager shareDataBaseManager] getUnReadMessageCount:openid]);
-    
-    return [[LXDataBaseManager shareDataBaseManager] getUnReadMessageCount:openid];
-}
-
-// 全部置为已读
--(void)jsUpdateAllUnReadMessage:(NSString *)openid{
-    [[LXDataBaseManager shareDataBaseManager] updateAllUnReadMessage:openid];
-}
-
-// 改变状态栏文字颜色
--(void)jsLightStatusBar:(NSString *)status{
-    kMainQueue(^{
-        NSInteger index = 0;
-        if ([status intValue] == 1) {
-            index = 1;// hei
-        }else{
-            index = 0;// bai
-        }
-        [[UIApplication sharedApplication] setStatusBarStyle:index];
-    });
-
-}
-// 打开新页面 加载新web
--(void)jsOpenExternalLink:(NSString *)url title:(NSString *)title{
-    if (url) {
-        if ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable || [AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusUnknown) {
-//            [self addNoNetViews];
-        }
-        NewWebController *ctr = [[NewWebController alloc] init];
-        ctr.url = url;
-//         有title的话 会显示自定义的导航栏 没有的话不显示导航栏 显示加载进度条
-        if (!title || [title isEqualToString:@""] || [title isEqualToString:@"undefined"]) {
-            ctr.titleShow = nil;
-        }else{
-            ctr.titleShow = title;
-        }
-        kMainQueue(^{
-            [self presentViewController:ctr animated:NO completion:nil];
-        });
-    }
-}
-
-// 获取当前版本号
--(NSString *)jsGetVersion:(NSString *)str{
-    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
-}
-
-// web是否可退回上页面
--(int)jsIsCanBack:(NSString *)str{
-    return self.webView.canGoBack ? 1:0;
-}
-
-// 弹框
--(void)jsAlert:(NSString *)content{
-    [[LXViewControllerManager shareViewControllerManager] showAlertViewWithMessage:content];
-}
-
-// 是否安装微信
--(int)jsIsInstallWeixin:(NSString *)str{
-    return [LXUserDefaults isInstallWeiXin];
-}
-
-
--(void)jsChangeMessageType:(NSString *)link
-{
-    //已读操作处理
-    NSLog(@"已读操作处理-更改");
-    [[LXDataBaseManager shareDataBaseManager] changeCatagoryTypeWithURL:link];
-}
-
-
-
-
-
-
-
--(void)jsOpenActivityPage:(NSString *)url rectype:(NSString *)rectype openid:(NSString *)openid
-{
-    NSDictionary * infoDic = @{@"url":url,
-                               @"rectype":rectype,
-                               @"openid":openid,
-                               };
-    
-    //    NSString *textJS =  [NSString stringWithFormat:@"messageAccept('%@','%@','%@')",infoDic[@"mid"],infoDic[@"rectype"],infoDic[@"openid"]];
-    //    JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-    //    [context evaluateScript:textJS];
-    
-    
-    //post请求
-    NSLog(@"%@",[NSString stringWithFormat:@"%@jyapp/free/message/receive",kHost]);
-    [[LXNetworkManager shareLXNetworkManager]postWithURLStr:[NSString stringWithFormat:@"%@jyapp/free/message/receive",kHost] parameters:infoDic progress:^(NSProgress *progress) {
-        NSLog(@"成功:%@",progress);
-    } success:^(id responseObject) {
-        NSLog(@"responseObject=%@",responseObject);
-    } failure:^(NSError *error) {
-        NSLog(@"error=%@",error);
-    }];
-    
-    
-}
-
-
-
-
-
-
-
-
-@end

+ 0 - 794
ios/JianYuIOS/JianYuIOS/ViewController_LOCAL_16982.m

@@ -1,794 +0,0 @@
-//
-//  ViewController.m
-//  JianYuIOS
-//
-//  Created by lixianglan on 2018/1/19.
-//  Copyright © 2018年 lixianglan. All rights reserved.
-//
-
-#import "ViewController.h"
-#import <JavaScriptCore/JavaScriptCore.h>
-#import <UShareUI/UShareUI.h>
-#import <UMSocialCore/UMSocialCore.h>
-#import "NewWebController.h"
-#import <UMSocialCore/UMSocialCore.h>
-#import <AFNetworking.h>
-#import "NoNetView.h"
-//#import <WebKit/WebKit.h>
-#import  <CommonCrypto/CommonCryptor.h>
-
-
-
-#define LocalStr_None @""//空字符串
-#define KIsiPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
-
-@protocol ViewControllerMain<JSExport>
-
-//测试
-
-
-@end
-
-
-
-@protocol ViewControllerJSExport<JSExport>
-
-JSExportAs(loginByWeixin, -(NSString *)jsLoginByWeixin:(NSString *)str);// 微信登录 openid
-JSExportAs(share, -(void)jsShare:(NSString *)type title:(NSString *)title content:(NSString *)content link:(NSString *)link); // 调用分享
-JSExportAs(saveUserToken, -(void)jsSaveUserToken:(NSString *)token);// 登录时获取令牌 保存
-JSExportAs(getUserToken, -(NSString *)jsGetUserToken:(NSString *)str);// 取本地存的令牌
-JSExportAs(removeUserToken, -(void)jsRemoveUserToken:(NSString *)str); // 退出时清空数据
-JSExportAs(checkNoticePermission, -(int)jsCheckNoticePermission:(NSString *)str); // 查询手机通知是否打开
-JSExportAs(openSystemNotification, -(void)jsOpenSystemNotification:(NSString *)str);// 跳转到系统设置
-JSExportAs(getPushRid, -(NSString *)jsGetPushRid:(NSString *)str);// 返回极光id
-JSExportAs(getMessageList, -(NSString *)jsGetMessageList:(NSString *)openid);// 按通知接收时间倒排,取前100条
-JSExportAs(updateMessageState, -(void)jsUpdateMessageState:(NSString *)lxID state:(NSString *)state);// 更新状态
-JSExportAs(deleteMessageById, -(void)jsDeleteMessageById:(NSString *)lxID);// 删除一条消息
-JSExportAs(getMessage, -(NSString *)jsGetMessage:(NSString *)lxID);// 取单条数据
-JSExportAs(getUnReadMessageCount, -(int)jsGetUnReadMessageCount:(NSString *)openid);// 获取未读消息总数
-JSExportAs(updateAllUnReadMessage, -(void)jsUpdateAllUnReadMessage:(NSString *)openid);// 全部置为已读
-JSExportAs(lightStatusBar, -(void)jsLightStatusBar:(NSString *)status);// 导航栏文字颜色
-JSExportAs(openExternalLink, -(void)jsOpenExternalLink:(NSString *)url title:(NSString *)title);// 打开新控制器 加载新web
-JSExportAs(getVersion, -(NSString *)jsGetVersion:(NSString *)str);// 获取当前版本号
-JSExportAs(alert, -(void)jsAlert:(NSString *)content);// 弹框
-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(business, -(NSInteger)jsBusiness:(NSInteger)shooID shopType:(NSInteger )shopType);
-
-
-
-
-@end
-
-
-@interface ViewController ()<UIWebViewDelegate, ViewControllerJSExport>
-{
-    CGPoint startTouch;
-    BOOL _isMoving;
-    
-}
-
-@property (weak, nonatomic) IBOutlet UIWebView *webView;
-//@property(nonatomic, assign)BOOL ;
-@property(nonatomic, assign)BOOL updateNotify;
-@property(nonatomic, assign)BOOL afterOpenPushMessage;
-@property (weak, nonatomic) IBOutlet NSLayoutConstraint *topC;
-//@property(nonatomic, strong)WKWebView *wkWebView;
-@property(nonatomic, strong)NoNetView *noNetView;
-@property(nonatomic, strong)NSURLRequest *errRequest;
-@property(nonatomic, strong)NSString *signOutContent;
-
-
-
-
-@end
-
-NSString *const kInitVector = @"1389461544135476";
-size_t const kKeySize = kCCKeySizeAES128;
-NSString *const AesKey = @"mGlAgnIBB8bx2nch";
-
-@implementation ViewController
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    
-    [LXDataBaseManager shareDataBaseManager];
-    if ([[UIDevice currentDevice].systemVersion floatValue] >= 11.0) {
-        //        if(KIsiPhoneX) {
-        //            self.topC.constant = -44;
-        //            [self.webView updateConstraints];
-        //        }else {
-        //            self.topC.constant = -20;
-        //            [self.webView updateConstraints];
-        //        }
-        self.topC.constant = -20;
-        [self.webView updateConstraints];
-    }
-    
-    self.webView.scrollView.bounces = NO;
-    [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-    [self webViewFirstRequest];//请求页面数据
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(requestWebView:) name:kRequestWebViewWithUrl object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateNotifyState) name:kUpdateNotifyState object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(afterReceiveNewMsg) name:kAfterReceiveNewMsg object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadWebView) name:kReloadWebVIew object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginOut:) name:kLoginOut object:nil];
-    
-    [[AFNetworkReachabilityManager sharedManager] startMonitoring];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(netReachChanged:) name:AFNetworkingReachabilityDidChangeNotification object:nil];
-    
-    
-    
-    
-//    [self clearWeb];
-    
-    UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(paningGestureReceive:)];
-    [recognizer delaysTouchesBegan];
-    [self.view addGestureRecognizer:recognizer];
-}
-
--(void)moveViewWithX:(float)x
-{
-    CGRect rect = self.view.bounds;
-    CGFloat width = CGRectGetWidth(rect);
-    x = x>width?width:x;
-    x = x<0?0:x;
-    CGRect frame = self.webView.frame;
-    frame.origin.x = x;
-    self.webView.frame = frame;
-}
-
-#pragma mark – Gesture Recognizer –
--(void)paningGestureReceive:(UIPanGestureRecognizer *)recoginzer
-{
-    CGRect rect = self.view.bounds;
-    CGFloat width = CGRectGetWidth(rect);
-    if (![self.webView canGoBack]) {
-        NSLog(@"不可返回");
-        return;
-    }
-    
-    NSString *current_url = [self.webView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
-    NSLog(@"当前页面:%@",current_url);
-    //    NSString *current_url = self.webView.request.URL.absoluteString;
-    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]]){
-        return;
-    }
-    
-    //https://www.jianyu360.com/jyapp/free/me
-    //https://www.jianyu360.com/jyapp/jylab/index
-    //https://www.jianyu360.com/jyapp/wxkeyset/keyset/index
-    //https://www.jianyu360.com/jyapp/jylab/mainSearch
-    
-    CGPoint touchPoint = [recoginzer locationInView:[UIApplication sharedApplication].keyWindow];
-    if (recoginzer.state==UIGestureRecognizerStateBegan) {
-        _isMoving = YES;
-        startTouch = touchPoint;
-    } else if (recoginzer.state==UIGestureRecognizerStateEnded){
-        if (touchPoint.x - startTouch.x > width*0.125) {
-            [UIView animateWithDuration:0.3 animations:^{
-                [self moveViewWithX:width];
-                [self.webView goBack];
-            } completion:^(BOOL finished) {
-                _isMoving = NO;
-                [self moveViewWithX:0];
-            }];
-        } else {
-            [UIView animateWithDuration:0.3 animations:^{
-                [self moveViewWithX:0];
-            } completion:^(BOOL finished) {
-                _isMoving = NO;
-            }];
-        }
-        return;
-    } else if (recoginzer.state==UIGestureRecognizerStateCancelled){
-        [UIView animateWithDuration:0.3 animations:^{
-            [self moveViewWithX:0];
-        } completion:^(BOOL finished) {
-            _isMoving = NO;
-        }];
-        return;
-    }
-    if (_isMoving) {
-        [self moveViewWithX:touchPoint.x - startTouch.x];
-    }
-}
-
-
-// 监控网络状态变化
--(void)netReachChanged:(NSNotification *)notificaition{
-    NSDictionary *userInfo = notificaition.userInfo;
-    if ([userInfo[@"AFNetworkingReachabilityNotificationStatusItem"] intValue] == 0 || [userInfo[@"AFNetworkingReachabilityNotificationStatusItem"] intValue] == -1) {
-        [self addNoNetViews];
-    }else{
-        if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"firstLoad"] intValue] == 0) {
-            [[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"firstLoad"];
-            [self removeNoNetViews];
-            [self webViewFirstRequest];
-        }
-    }
-}
-
-// 再次加载页面
--(void)reloadWebView{
-    [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-    if (!self.webView.canGoBack) {
-        [self webViewFirstRequest];
-    }else{
-        [self.webView reload];
-    }
-    
-}
-
-// 首次加载web
--(void)webViewFirstRequest{
-    NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/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]]];
-    
-}
-
-//收到消息退出并重新加载web
--(void)webViewRequestByMsg{
-    NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/kicked"];
-    url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-}
-
--(void)requestWebTime:(NSDictionary *)infoDict
-{
-    NSString * urlStr = [NSString stringWithFormat:@"%@",infoDict[@"url"]];
-    
-    if([infoDict[@"type"] isEqualToString:@"message"]) {
-        NSString *url = [NSString stringWithFormat:@"%@",urlStr];
-        NSArray * array = [url componentsSeparatedByString:@"=="];
-        url =  [array.firstObject stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-        [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"kNewWebControllerDismiss" object:nil];
-        //
-    }else {
-        NSString *url = [NSString stringWithFormat:@"%@%@", kHost, urlStr];
-        url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-        [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"kNewWebControllerDismiss" object:nil];
-    }
-    
-}
-
-// 点击通知 跳转到通知内url
--(void)requestWebView:(NSNotification *)notification{
-    NSDictionary * infoDict = [notification object];
-    if (!infoDict) {
-        return;
-    }
-    NSString * urlStr = [NSString stringWithFormat:@"%@",infoDict[@"url"]];
-    
-    if (urlStr) {
-        [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-        self.afterOpenPushMessage = YES;
-        
-        
-        [self performSelector:@selector(requestWebTime:) withObject:infoDict afterDelay:1];
-        //        if([infoDict[@"type"] isEqualToString:@"message"]) {
-        //            NSString *url = [NSString stringWithFormat:@"%@",urlStr];
-        //            url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-        //            [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-        //            [[NSNotificationCenter defaultCenter] postNotificationName:@"kNewWebControllerDismiss" object:nil];
-        //        }else {
-        //            NSString *url = [NSString stringWithFormat:@"%@%@", kHost, urlStr];
-        //            url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-        //            [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-        //            [[NSNotificationCenter defaultCenter] postNotificationName:@"kNewWebControllerDismiss" object:nil];
-        //        }
-        
-        
-    }
-    
-    
-}
-
-
-
-
-// 收到通知消息
--(void)afterReceiveNewMsg{
-    NSLog(@"afterReceiveNewMsg");
-    JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-    [context evaluateScript:@"afterReceiveNewMsg()"];
-}
-
-// 收到退出登录消息
--(void)loginOut:(NSNotification *)notification{
-    self.signOutContent = notification.object;
-    if (!self.signOutContent) {
-        self.signOutContent = @"1";
-    }
-    NSString *url = [NSString stringWithFormat:@"%@%@?sign=%@", kHost, @"jyapp/free/signOut", [LXUserDefaults token]];
-    url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-    
-    UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
-    webView.delegate = self;
-    [self.view addSubview:webView];
-    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-    
-    //    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-    [self jsRemoveUserToken:nil];
-}
-
-
-
-
-
-#pragma mark  捕获js中调用的方法
-
-//捕获js中调用的方法
-- (void)webViewDidFinishLoad:(UIWebView *)webView{
-    [self removeNoNetViews];
-    [[LXViewControllerManager shareViewControllerManager] hideHud];
-    JSContext *context = [webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-    // Disable user selection
-    [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitUserSelect='none';"];
-    // Disable callout
-    [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitTouchCallout='none';"];
-    
-    context[@"JyObj"] = self;
-    
-    [context evaluateScript:@"afterPageInit()"];
-    if (self.afterOpenPushMessage) {
-        self.afterOpenPushMessage = NO;
-        //        [context evaluateScript:@"afterOpenPushMessage()"];
-        [context evaluateScript:[NSString stringWithFormat:@"afterOpenPushMessage('%d')", [self jsIsCanBack:nil]]];
-    }
-    
-    NSString *url = webView.request.URL.absoluteString;
-    [self doSomeWithLoadUrl:url];
-}
-
--(void)doSomeWithLoadUrl:(NSString *)url{
-    if (!url) {
-        return;
-    }
-    if ([url containsString:@"signOut"]) { // 收到退出消息后 跳转到登录页面
-        //        [self webViewFirstRequest];
-        [self webViewRequestByMsg];
-    }else if ([url containsString:@"/free/login"]){ //  如果通过接收消息 跳转到登录页面 展示消息内容
-        if (self.signOutContent && ![self.signOutContent isEqualToString:@"1"]) {
-            [[LXViewControllerManager shareViewControllerManager] showAlertViewWithTitle:@"提示" message:self.signOutContent actions:@[[UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-                self.signOutContent = nil;
-            }]]];
-        }else{
-            self.signOutContent = nil;
-        }
-    }
-}
-
--(void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error{
-    [[LXViewControllerManager shareViewControllerManager] hideHud];
-    
-    NSString *url = webView.request.URL.absoluteString;
-    [self doSomeWithLoadUrl:url];
-}
-
-
-
--(void)webViewDidStartLoad:(UIWebView *)webView{
-    //    if ([[UIDevice currentDevice].systemVersion floatValue] < 10) {
-    //        [[LXViewControllerManager shareViewControllerManager] hideHud];
-    //    }
-}
-
-
-- (void)didReceiveMemoryWarning {
-    [super didReceiveMemoryWarning];
-//    [self clearWeb];
-    // Dispose of any resources that can be recreated.
-}
-
--(void)clearWeb{
-    NSURLCache * cache = [NSURLCache sharedURLCache];
-    [cache removeAllCachedResponses];
-    [cache setDiskCapacity:0];
-    [cache setMemoryCapacity:0];
-}
-
--(void)addNoNetViews{
-    kMainQueue(^{
-        [self removeNoNetViews];
-        self.noNetView = [NoNetView shareView];
-        [self.view addSubview:self.noNetView];
-    });
-}
-
--(void)removeNoNetViews{
-    if (self.noNetView ) {
-        [self.noNetView removeFromSuperview];
-        self.noNetView  = nil;
-    }
-}
-
-
-#pragma  mark JS 回调
-// 微信登录
--(NSString *)jsLoginByWeixin:(NSString *)str{
-    
-    if ([LXUserDefaults isInstallWeiXin] != 1) { // 没有安装微信 不走友盟
-        [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"微信登录失败,没有安装微信" delay:1.5];
-        return nil;
-    }
-    
-    kMainQueue(^{
-        
-        [[UMSocialManager defaultManager] getUserInfoWithPlatform:UMSocialPlatformType_WechatSession currentViewController:self completion:^(id result, NSError *error) {
-            
-            UMSocialUserInfoResponse *resp = result;
-            
-            [self dealWXDic:(NSDictionary *)resp.originalResponse];
-            
-            [[LXViewControllerManager shareViewControllerManager] hideHud];
-        }];
-        
-        
-        
-    });
-    
-    return nil;
-}
-// 处理微信登录获取到的数据
--(void)dealWXDic:(NSDictionary *)dictionary{
-    
-    [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-    //如果获取到用户信息,即用户点击了“登录”,则进行用户信息获取
-    if (dictionary.count > 0) {
-        
-        NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithDictionary:dictionary];
-        
-        if (dic) {
-            [dic removeObjectForKey:@"privilege"];
-            [dic removeObjectForKey:@"language"];
-            double currDouble = [[NSDate date] timeIntervalSince1970];
-            [dic setObject:[NSNumber numberWithLong:(long)currDouble] forKey:@"createtime"];
-            
-            //         拼接标志位
-            NSString *sign = [NSString stringWithFormat:@"city=%@&country=%@&createtime=%@&headimgurl=%@&nickname=%@&openid=%@&province=%@&sex=%@&unionid=%@", dic[@"city"], dic[@"country"], dic[@"createtime"], dic[@"headimgurl"], dic[@"nickname"], dic[@"openid"], dic[@"province"],dic[@"sex"],dic[@"unionid"]];
-            sign = [LXMD5 md532BitLower:sign];
-            [dic setObject:sign forKey:@"sign"];
-            NSString *endStr = [[LXViewControllerManager shareViewControllerManager] getJsonStr:dic];
-            NSData *data = [endStr dataUsingEncoding:NSUTF8StringEncoding];
-            endStr = [data base64EncodedStringWithOptions:0];
-            
-            
-            JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-            NSString * textJS1 = [NSString stringWithFormat:@"loginByWeixinCallBack('%@')", endStr];
-            JSValue *value =   [context evaluateScript:textJS1];
-            NSLog(@"%@", value);
-            
-        }
-    }
-    
-}
-
-// js 调用分享
--(void)jsShare:(NSString *)type title:(NSString *)title content:(NSString *)content link:(NSString *)link{
-    UMSocialPlatformType shareType;
-    
-    if ([type intValue] == 1) { // 微信好友
-        shareType = UMSocialPlatformType_WechatSession;
-    }else if ([type intValue] == 2){ /// qq好友
-        shareType = UMSocialPlatformType_QQ;
-    }else if ([type intValue] == 3){ // 朋友圈
-        shareType = UMSocialPlatformType_WechatTimeLine;
-    }else{
-        shareType = UMSocialPlatformType_WechatSession;
-    }
-    
-    kMainQueue((^{
-        
-        //         没有安装app 不走分享逻辑
-        if ([type intValue] == 1 || [type intValue] == 3) {
-            if ([LXUserDefaults isInstallWeiXin] != 1) {
-                [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"没有安装微信" delay:1.5];
-                return;
-            }
-        }
-        //         没有安装app 不走分享逻辑
-        if ([type intValue] == 2) {
-            if (![[UMSocialManager defaultManager] isInstall:UMSocialPlatformType_QQ]) {
-                [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"没有安装QQ" delay:1.5];
-                return;
-            }
-        }
-        
-        //创建分享消息对象
-        UMSocialMessageObject *messageObject = [UMSocialMessageObject messageObject];
-        //创建网页内容对象
-        UMShareWebpageObject *shareObject = [UMShareWebpageObject shareObjectWithTitle:title descr:content thumImage:[UIImage imageNamed:@"logo"]];
-        //设置网页地址
-        shareObject.webpageUrl = link;
-        messageObject.shareObject = shareObject;
-        //调用分享接口
-        [[UMSocialManager defaultManager] shareToPlatform:shareType messageObject:messageObject currentViewController:self completion:^(id data, NSError *error) {
-            if (error) {
-                NSLog(@"22222222%@",error.userInfo);
-                if (error.userInfo[@"message"] && [error.userInfo[@"message"] containsString:@"Operation is cancel"]) {
-                    [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"取消分享" delay:1];
-                }else{
-                    [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:error.userInfo[@"message"] delay:1];
-                }
-                
-                NSString *textJS =  [NSString stringWithFormat:@"shareCallBack('%@','%@')",type,@"0"];
-                JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-                [context evaluateScript:textJS];
-                
-            }else{
-                if ([data isKindOfClass:[UMSocialShareResponse class]]) {
-                    UMSocialShareResponse *resp = data;
-                    NSLog(@"33333%@",resp.message);
-                    NSLog(@"44444%@",resp.originalResponse);
-                    
-                    NSString *textJS =  [NSString stringWithFormat:@"shareCallBack('%@','%@')",type,@"1"];
-                    JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-                    [context evaluateScript:textJS];
-                    
-                }else{
-                    UMSocialLogInfo(@"response data is %@",data);
-                    NSLog(@"55555%@",data);
-                }
-            }
-        }];
-    }));
-}
-
-// 登录时获取到令牌 并保存
--(void)jsSaveUserToken:(NSString *)token{
-    [[LXViewControllerManager shareViewControllerManager] hideHud];
-    [LXUserDefaults saveToken:token];
-}
-
-// 取本地的用户令牌
--(NSString *)jsGetUserToken:(NSString *)str{
-    return [LXUserDefaults token];
-}
-
-// 退出时 清空用户数据
--(void)jsRemoveUserToken:(NSString *)str{
-    [LXUserDefaults clearAll];
-    //    [[LXDataBaseManager shareDataBaseManager] clearAll];
-    
-}
-
-
-// 手机通知权限是否打开
--(int)jsCheckNoticePermission:(NSString *)str{
-    int a = [LXUserDefaults notifyState];
-    return a;
-}
-
-// 跳转到系统设置
--(void)jsOpenSystemNotification:(NSString *)str{
-    self.updateNotify = YES;
-    kMainQueue(^{
-        [[UIApplication sharedApplication]openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
-    });
-}
-
-// 调用js方法 刷新推送权限状态
--(void)updateNotifyState{
-    if (self.updateNotify) {
-        self.updateNotify = NO;
-        JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-        NSString * textJS1 = [NSString stringWithFormat:@"updateNoticeSwitch()"];
-        [context evaluateScript:textJS1];
-    }
-}
-// 获取推送id
--(NSString *)jsGetPushRid:(NSString *)str{
-    return [LXUserDefaults registrationID];
-}
-
-// 按通知取数据
--(NSString *)jsGetMessageList:(NSString *)openid{
-    NSArray *arr = [[LXDataBaseManager shareDataBaseManager] getMessageWithKey:nil openid:openid fromTable:kNewsTable start:0 length:100];
-    if (arr.count > 0) {
-        return [[LXViewControllerManager shareViewControllerManager] getJsonStr:arr];
-    }
-    return @"";
-}
-
-// 更新消息状态
--(void)jsUpdateMessageState:(NSNumber *)lxID state:(NSNumber *)state{
-    [[LXDataBaseManager shareDataBaseManager] changeReadedWithID:lxID state:state];
-}
-
-// 删除一条数据
--(void)jsDeleteMessageById:(NSNumber *)lxID{
-    [[LXDataBaseManager shareDataBaseManager] deleteMessage:lxID fromTable:kNewsTable];
-}
-
-// 取单条数据
--(NSString *)jsGetMessage:(NSString *)lxID{
-    return [[LXViewControllerManager shareViewControllerManager] getJsonStr:[[LXDataBaseManager shareDataBaseManager] getMessageWithKey:lxID openid:nil fromTable:kNewsTable start:0 length:0]];
-}
-// 取未读消息总数
--(int)jsGetUnReadMessageCount:(NSString *)openid{
-    NSLog(@"openid=%@",openid);
-    //    NSLog(@"%d",[[LXDataBaseManager shareDataBaseManager] getUnReadMessageCount:openid]);
-    
-    return [[LXDataBaseManager shareDataBaseManager] getUnReadMessageCount:openid];
-}
-
-// 全部置为已读
--(void)jsUpdateAllUnReadMessage:(NSString *)openid{
-    [[LXDataBaseManager shareDataBaseManager] updateAllUnReadMessage:openid];
-}
-
-// 改变状态栏文字颜色
--(void)jsLightStatusBar:(NSString *)status{
-    kMainQueue(^{
-        NSInteger index = 0;
-        if ([status intValue] == 1) {
-            index = 1;// hei
-        }else{
-            index = 0;// bai
-        }
-        [[UIApplication sharedApplication] setStatusBarStyle:index];
-    });
-    
-}
-// 打开新页面 加载新web
--(void)jsOpenExternalLink:(NSString *)url title:(NSString *)title{
-    if (url) {
-        if ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable || [AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusUnknown) {
-            //            [self addNoNetViews];
-        }
-        NewWebController *ctr = [[NewWebController alloc] init];
-        ctr.url = url;
-        //         有title的话 会显示自定义的导航栏 没有的话不显示导航栏 显示加载进度条
-        if (!title || [title isEqualToString:@""] || [title isEqualToString:@"undefined"]) {
-            ctr.titleShow = nil;
-        }else{
-            ctr.titleShow = title;
-        }
-        kMainQueue(^{
-            [self presentViewController:ctr animated:NO completion:nil];
-        });
-    }
-}
-
-// 获取当前版本号
--(NSString *)jsGetVersion:(NSString *)str{
-    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
-}
-
-// web是否可退回上页面
--(int)jsIsCanBack:(NSString *)str{
-    return self.webView.canGoBack ? 1:0;
-}
-
-// 弹框
--(void)jsAlert:(NSString *)content{
-    [[LXViewControllerManager shareViewControllerManager] showAlertViewWithMessage:content];
-}
-
-// 是否安装微信
--(int)jsIsInstallWeixin:(NSString *)str{
-    return [LXUserDefaults isInstallWeiXin];
-}
-
-
--(void)jsChangeMessageType:(NSString *)link
-{
-    //已读操作处理
-    NSLog(@"已读操作处理-更改");
-    [[LXDataBaseManager shareDataBaseManager] changeCatagoryTypeWithURL:link];
-}
-
-
-
-
-
-
-
--(void)jsOpenActivityPage:(NSString *)url rectype:(NSString *)rectype openid:(NSString *)openid
-{
-    NSDictionary * infoDic = @{@"url":url,
-                               @"rectype":rectype,
-                               @"openid":openid,
-                               };
-    
-    //    NSString *textJS =  [NSString stringWithFormat:@"messageAccept('%@','%@','%@')",infoDic[@"mid"],infoDic[@"rectype"],infoDic[@"openid"]];
-    //    JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-    //    [context evaluateScript:textJS];
-    
-    
-    //post请求
-    NSLog(@"%@",[NSString stringWithFormat:@"%@jyapp/free/message/receive",kHost]);
-    [[LXNetworkManager shareLXNetworkManager]postWithURLStr:[NSString stringWithFormat:@"%@jyapp/free/message/receive",kHost] parameters:infoDic progress:^(NSProgress *progress) {
-        NSLog(@"成功:%@",progress);
-    } success:^(id responseObject) {
-        NSLog(@"responseObject=%@",responseObject);
-    } failure:^(NSError *error) {
-        NSLog(@"error=%@",error);
-    }];
-    
-    
-}
-
-
-
-
-
--(NSString *)jsGGetCipherText:(NSString *)phone
-{
-    
-    NSDate *date=[NSDate date];
-    NSDateFormatter *format1=[[NSDateFormatter alloc] init];
-    [format1 setDateFormat:@"yyyyMMddhhmmss"];
-    NSString *dateStr;
-    dateStr=[format1 stringFromDate:date];
-    NSLog(@"%@",dateStr);
-    
-    NSString *content = [[NSString stringWithFormat:@"%@_%@",phone,dateStr] stringByAppendingString:[NSString stringWithFormat:@"_%@",[LXMD5 md532BitLower:[NSString stringWithFormat:@"%@&%@",phone,dateStr]]]];
-    NSData *contentData = [content dataUsingEncoding:NSUTF8StringEncoding];
-    NSUInteger dataLength = contentData.length;
-    // 为结束符'\\0' +1
-    char keyPtr[kKeySize + 1];
-    memset(keyPtr, 0, sizeof(keyPtr));
-    [AesKey getCString:keyPtr maxLength:sizeof(keyPtr) encoding:NSUTF8StringEncoding];
-    // 密文长度 <= 明文长度 + BlockSize
-    size_t encryptSize = dataLength + kCCBlockSizeAES128;
-    void *encryptedBytes = malloc(encryptSize);
-    size_t actualOutSize = 0;
-    NSData *initVector = [kInitVector dataUsingEncoding:NSUTF8StringEncoding];
-    CCCryptorStatus cryptStatus = CCCrypt(kCCEncrypt,
-                                          kCCAlgorithmAES,
-                                          kCCOptionPKCS7Padding,  // 系统默认使用 CBC,然后指明使用 PKCS7Padding
-                                          keyPtr,
-                                          kKeySize,
-                                          initVector.bytes,
-                                          contentData.bytes,
-                                          dataLength,
-                                          encryptedBytes,
-                                          encryptSize,
-                                          &actualOutSize);
-    if (cryptStatus == kCCSuccess) {
-        // 对加密后的数据进行 base64 编码
-        return [[NSData dataWithBytesNoCopy:encryptedBytes length:actualOutSize] base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];
-    }
-    free(encryptedBytes);
-    return nil;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-@end

+ 0 - 868
ios/JianYuIOS/JianYuIOS/ViewController_REMOTE_16982.m

@@ -1,868 +0,0 @@
-//
-//  ViewController.m
-//  JianYuIOS
-//
-//  Created by lixianglan on 2018/1/19.
-//  Copyright © 2018年 lixianglan. All rights reserved.
-//
-
-#import "ViewController.h"
-#import <JavaScriptCore/JavaScriptCore.h>
-#import <UShareUI/UShareUI.h>
-#import <UMSocialCore/UMSocialCore.h>
-#import "NewWebController.h"
-#import <UMSocialCore/UMSocialCore.h>
-#import <AFNetworking.h>
-#import "NoNetView.h"
-//#import <WebKit/WebKit.h>
-#import  <CommonCrypto/CommonCryptor.h>
-
-
-
-#define LocalStr_None @""//空字符串
-#define KIsiPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
-
-@protocol ViewControllerMain<JSExport>
-
-//测试
-
-
-@end
-
-
-
-@protocol ViewControllerJSExport<JSExport>
-
-JSExportAs(loginByWeixin, -(NSString *)jsLoginByWeixin:(NSString *)str);// 微信登录 openid
-JSExportAs(share, -(void)jsShare:(NSString *)type title:(NSString *)title content:(NSString *)content link:(NSString *)link); // 调用分享
-JSExportAs(saveUserToken, -(void)jsSaveUserToken:(NSString *)token);// 登录时获取令牌 保存
-JSExportAs(getUserToken, -(NSString *)jsGetUserToken:(NSString *)str);// 取本地存的令牌
-JSExportAs(removeUserToken, -(void)jsRemoveUserToken:(NSString *)str); // 退出时清空数据
-JSExportAs(checkNoticePermission, -(int)jsCheckNoticePermission:(NSString *)str); // 查询手机通知是否打开
-JSExportAs(openSystemNotification, -(void)jsOpenSystemNotification:(NSString *)str);// 跳转到系统设置
-JSExportAs(getPushRid, -(NSString *)jsGetPushRid:(NSString *)str);// 返回极光id
-JSExportAs(getMessageList, -(NSString *)jsGetMessageList:(NSString *)openid);// 按通知接收时间倒排,取前100条
-JSExportAs(updateMessageState, -(void)jsUpdateMessageState:(NSString *)lxID state:(NSString *)state);// 更新状态
-JSExportAs(deleteMessageById, -(void)jsDeleteMessageById:(NSString *)lxID);// 删除一条消息
-JSExportAs(getMessage, -(NSString *)jsGetMessage:(NSString *)lxID);// 取单条数据
-JSExportAs(getUnReadMessageCount, -(int)jsGetUnReadMessageCount:(NSString *)openid);// 获取未读消息总数
-JSExportAs(updateAllUnReadMessage, -(void)jsUpdateAllUnReadMessage:(NSString *)openid);// 全部置为已读
-JSExportAs(lightStatusBar, -(void)jsLightStatusBar:(NSString *)status);// 导航栏文字颜色
-JSExportAs(openExternalLink, -(void)jsOpenExternalLink:(NSString *)url title:(NSString *)title);// 打开新控制器 加载新web
-JSExportAs(getVersion, -(NSString *)jsGetVersion:(NSString *)str);// 获取当前版本号
-JSExportAs(alert, -(void)jsAlert:(NSString *)content);// 弹框
-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 *)jsGetCipherText:(NSString *)phone);
-
-JSExportAs(business, -(NSInteger)jsBusiness:(NSInteger)shooID shopType:(NSInteger )shopType);
-
-
-
-
-@end
-
-
-@interface ViewController ()<UIWebViewDelegate, ViewControllerJSExport>
-{
-    CGPoint startTouch;
-    BOOL _isMoving;
-    
-    
-    BOOL _isFirstLogin;
-}
-
-
-
-
-
-@end
-
-NSString *const kInitVector = @"1389461544135476";
-size_t const kKeySize = kCCKeySizeAES128;
-NSString *const AesKey = @"mGlAgnIBB8bx2nch";
-
-@implementation ViewController
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    
-    
-    NSLog(@"viewDidLoadviewDidLoad   初始化");
-    
-    [LXDataBaseManager shareDataBaseManager];
-    if ([[UIDevice currentDevice].systemVersion floatValue] >= 11.0) {
-        //        if(KIsiPhoneX) {
-        //            self.topC.constant = -44;
-        //            [self.webView updateConstraints];
-        //        }else {
-        //            self.topC.constant = -20;
-        //            [self.webView updateConstraints];
-        //        }
-        self.topC.constant = -20;
-        [self.webView updateConstraints];
-    }
-    
-    
-    self.view.backgroundColor = [UIColor whiteColor];
-    
-    
-    self.webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, -STATUS_BAR_HEIGHT, WIDTH, HEIGHT-TAB_BAR_HEIGHT+STATUS_BAR_HEIGHT)];
-    [self.view addSubview: self.webView];
-    self.webView.scrollView.bounces = NO;
-    self.webView.delegate = self;
-    
-    
-    
-    
-    [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-    [self webViewFirstRequest];//请求页面数据
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(requestWebView:) name:kRequestWebViewWithUrl object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateNotifyState) name:kUpdateNotifyState object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(afterReceiveNewMsg) name:kAfterReceiveNewMsg object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadWebView) name:kReloadWebVIew object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginOut:) name:kLoginOut object:nil];
-    
-    [[AFNetworkReachabilityManager sharedManager] startMonitoring];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(netReachChanged:) name:AFNetworkingReachabilityDidChangeNotification object:nil];
-    
-    
-    
-    
-    [self clearWeb];
-    
-    UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(paningGestureReceive:)];
-    [recognizer delaysTouchesBegan];
-    [self.view addGestureRecognizer:recognizer];
-    
-    
-}
-
--(void)moveViewWithX:(float)x
-{
-    CGRect rect = self.view.bounds;
-    CGFloat width = CGRectGetWidth(rect);
-    x = x>width?width:x;
-    x = x<0?0:x;
-    CGRect frame = self.webView.frame;
-    frame.origin.x = x;
-    self.webView.frame = frame;
-}
-
-#pragma mark – Gesture Recognizer –
--(void)paningGestureReceive:(UIPanGestureRecognizer *)recoginzer
-{
-    CGRect rect = self.view.bounds;
-    CGFloat width = CGRectGetWidth(rect);
-    if (![self.webView canGoBack]) {
-        NSLog(@"不可返回");
-        return;
-    }
-    
-    NSString *current_url = [self.webView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
-    NSLog(@"当前页面:%@",current_url);
-    //    NSString *current_url = self.webView.request.URL.absoluteString;
-    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]]){
-        return;
-    }
-    
-    //https://www.jianyu360.com/jyapp/free/me
-    //https://www.jianyu360.com/jyapp/jylab/index
-    //https://www.jianyu360.com/jyapp/wxkeyset/keyset/index
-    //https://www.jianyu360.com/jyapp/jylab/mainSearch
-    
-    CGPoint touchPoint = [recoginzer locationInView:[UIApplication sharedApplication].keyWindow];
-    if (recoginzer.state==UIGestureRecognizerStateBegan) {
-        _isMoving = YES;
-        startTouch = touchPoint;
-    } else if (recoginzer.state==UIGestureRecognizerStateEnded){
-        if (touchPoint.x - startTouch.x > width*0.125) {
-            [UIView animateWithDuration:0.3 animations:^{
-                [self moveViewWithX:width];
-                [self.webView goBack];
-            } completion:^(BOOL finished) {
-                _isMoving = NO;
-                [self moveViewWithX:0];
-            }];
-        } else {
-            [UIView animateWithDuration:0.3 animations:^{
-                [self moveViewWithX:0];
-            } completion:^(BOOL finished) {
-                _isMoving = NO;
-            }];
-        }
-        return;
-    } else if (recoginzer.state==UIGestureRecognizerStateCancelled){
-        [UIView animateWithDuration:0.3 animations:^{
-            [self moveViewWithX:0];
-        } completion:^(BOOL finished) {
-            _isMoving = NO;
-        }];
-        return;
-    }
-    if (_isMoving) {
-        [self moveViewWithX:touchPoint.x - startTouch.x];
-    }
-}
-
-
-// 监控网络状态变化
--(void)netReachChanged:(NSNotification *)notificaition{
-    NSDictionary *userInfo = notificaition.userInfo;
-    if ([userInfo[@"AFNetworkingReachabilityNotificationStatusItem"] intValue] == 0 || [userInfo[@"AFNetworkingReachabilityNotificationStatusItem"] intValue] == -1) {
-        [self addNoNetViews];
-    }else{
-        if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"firstLoad"] intValue] == 0) {
-            [[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"firstLoad"];
-            [self removeNoNetViews];
-            [self webViewFirstRequest];
-        }
-    }
-}
-
-// 再次加载页面
--(void)reloadWebView{
-    [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-    if (!self.webView.canGoBack) {
-        [self webViewFirstRequest];
-    }else{
-        [self.webView reload];
-    }
-    
-}
-
-// 首次加载web
--(void)webViewFirstRequest{
-    NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/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]]];
-    
-}
-
-//收到消息退出并重新加载web
--(void)webViewRequestByMsg{
-    NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/kicked"];
-    url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-}
-
--(void)requestWebTime:(NSDictionary *)infoDict
-{
-    NSString * urlStr = [NSString stringWithFormat:@"%@",infoDict[@"url"]];
-    
-    if([infoDict[@"type"] isEqualToString:@"message"]) {
-        NSString *url = [NSString stringWithFormat:@"%@",urlStr];
-        NSArray * array = [url componentsSeparatedByString:@"=="];
-        url =  [array.firstObject stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-        [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"kNewWebControllerDismiss" object:nil];
-        //
-    }else {
-        NSString *url = [NSString stringWithFormat:@"%@%@", kHost, urlStr];
-        url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-        [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"kNewWebControllerDismiss" object:nil];
-    }
-    
-}
-
-// 点击通知 跳转到通知内url
--(void)requestWebView:(NSNotification *)notification{
-    NSDictionary * infoDict = [notification object];
-    if (!infoDict) {
-        return;
-    }
-    NSString * urlStr = [NSString stringWithFormat:@"%@",infoDict[@"url"]];
-    
-    if (urlStr) {
-        [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-        self.afterOpenPushMessage = YES;
-        
-        
-        [self performSelector:@selector(requestWebTime:) withObject:infoDict afterDelay:1];
-        //        if([infoDict[@"type"] isEqualToString:@"message"]) {
-        //            NSString *url = [NSString stringWithFormat:@"%@",urlStr];
-        //            url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-        //            [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-        //            [[NSNotificationCenter defaultCenter] postNotificationName:@"kNewWebControllerDismiss" object:nil];
-        //        }else {
-        //            NSString *url = [NSString stringWithFormat:@"%@%@", kHost, urlStr];
-        //            url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-        //            [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-        //            [[NSNotificationCenter defaultCenter] postNotificationName:@"kNewWebControllerDismiss" object:nil];
-        //        }
-        
-        
-    }
-    
-    
-}
-
-
-
-
-// 收到通知消息
--(void)afterReceiveNewMsg{
-    NSLog(@"afterReceiveNewMsg");
-    JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-    [context evaluateScript:@"afterReceiveNewMsg()"];
-}
-
-// 收到退出登录消息
--(void)loginOut:(NSNotification *)notification{
-    self.signOutContent = notification.object;
-    if (!self.signOutContent) {
-        self.signOutContent = @"1";
-    }
-    NSString *url = [NSString stringWithFormat:@"%@%@?sign=%@", kHost, @"jyapp/free/signOut", [LXUserDefaults token]];
-    url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-    
-    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-//    UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
-//    webView.delegate = self;
-//    [self.view addSubview:webView];
-//    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-    
-    //    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
-    [self jsRemoveUserToken:nil];
-}
-
-
-
-
-- (void)hideTabBar {
-    
-    kMainQueue(^{
-        if (self.tabBarController.tabBar.hidden == YES) {
-            return;
-        }
-        UIView *contentView;
-        if ( [[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] )
-            contentView = [self.tabBarController.view.subviews objectAtIndex:1];
-        else
-            contentView = [self.tabBarController.view.subviews objectAtIndex:0];
-        contentView.frame = CGRectMake(contentView.bounds.origin.x,  contentView.bounds.origin.y,  contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);
-        self.tabBarController.tabBar.hidden = YES;
-    });
-}
-- (void)showTabBar{
-    kMainQueue(^{
-        if (self.tabBarController.tabBar.hidden == NO)
-        {
-            return;
-        }
-        UIView *contentView;
-        if ([[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]])
-            
-            contentView = [self.tabBarController.view.subviews objectAtIndex:1];
-        
-        else
-            
-            contentView = [self.tabBarController.view.subviews objectAtIndex:0];
-        contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y,  contentView.bounds.size.width, contentView.bounds.size.height - self.tabBarController.tabBar.frame.size.height);
-        self.tabBarController.tabBar.hidden = NO;
-    });
-}
-
--(void)jsHiddenBottom:(NSString *)hidden
-{
-    if([hidden integerValue]==0) {
-        [self hideTabBar];
-        self.webView.frame = CGRectMake(0, -STATUS_BAR_HEIGHT, WIDTH, HEIGHT+STATUS_BAR_HEIGHT);
-    }else {
-        [self showTabBar];
-        self.webView.frame = CGRectMake(0, -STATUS_BAR_HEIGHT, WIDTH, HEIGHT-TAB_BAR_HEIGHT+STATUS_BAR_HEIGHT);
-    }
-}
-
--(void)judgeIsHidden
-{
-    NSString *current_url = [self.webView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
-    
-    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];
-        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);
-    }
-    
-}
-
-#pragma mark  捕获js中调用的方法
-
-//捕获js中调用的方法
-- (void)webViewDidFinishLoad:(UIWebView *)webView{
-    
-    [self judgeIsHidden];//是否隐藏
-    [self removeNoNetViews];
-    [[LXViewControllerManager shareViewControllerManager] hideHud];
-    JSContext *context = [webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-    // Disable user selection
-    [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitUserSelect='none';"];
-    // Disable callout
-    [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitTouchCallout='none';"];
-    
-    context[@"JyObj"] = self;
-    
-    [context evaluateScript:@"afterPageInit()"];
-    if (self.afterOpenPushMessage) {
-        self.afterOpenPushMessage = NO;
-        //        [context evaluateScript:@"afterOpenPushMessage()"];
-        [context evaluateScript:[NSString stringWithFormat:@"afterOpenPushMessage('%d')", [self jsIsCanBack:nil]]];
-    }
-    
-    NSString *url = webView.request.URL.absoluteString;
-    [self doSomeWithLoadUrl:url];
-}
-
--(void)doSomeWithLoadUrl:(NSString *)url{
-    if (!url) {
-        return;
-    }
-    if ([url containsString:@"signOut"]) { // 收到退出消息后 跳转到登录页面
-        //        [self webViewFirstRequest];
-        [self webViewRequestByMsg];
-    }else if ([url containsString:@"/free/login"]){ //  如果通过接收消息 跳转到登录页面 展示消息内容
-        if (self.signOutContent && ![self.signOutContent isEqualToString:@"1"]) {
-            [[LXViewControllerManager shareViewControllerManager] showAlertViewWithTitle:@"提示" message:self.signOutContent actions:@[[UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-                self.signOutContent = nil;
-            }]]];
-        }else{
-            self.signOutContent = nil;
-        }
-    }
-}
-
--(void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error{
-    [[LXViewControllerManager shareViewControllerManager] hideHud];
-    
-    NSString *url = webView.request.URL.absoluteString;
-    [self doSomeWithLoadUrl:url];
-}
-
-
-
--(void)webViewDidStartLoad:(UIWebView *)webView{
-    //    if ([[UIDevice currentDevice].systemVersion floatValue] < 10) {
-    //        [[LXViewControllerManager shareViewControllerManager] hideHud];
-    //    }
-}
-
-
-- (void)didReceiveMemoryWarning {
-    [super didReceiveMemoryWarning];
-    [self clearWeb];
-    // Dispose of any resources that can be recreated.
-    
-    //当前页面:http://jianyu360.mikecrm.com/9Li9dpM
-    //https://mp.weixin.qq.com/s/jomQtxcanA-Nszgy1ubuhA
-}
-
--(void)clearWeb{
-    NSURLCache * cache = [NSURLCache sharedURLCache];
-    [cache removeAllCachedResponses];
-    [cache setDiskCapacity:0];
-    [cache setMemoryCapacity:0];
-}
-
--(void)addNoNetViews{
-    kMainQueue(^{
-        [self removeNoNetViews];
-        self.noNetView = [NoNetView shareView];
-        [self.view addSubview:self.noNetView];
-    });
-}
-
--(void)removeNoNetViews{
-    if (self.noNetView ) {
-        [self.noNetView removeFromSuperview];
-        self.noNetView  = nil;
-    }
-}
-
-
-#pragma  mark JS 回调
-// 微信登录
--(NSString *)jsLoginByWeixin:(NSString *)str{
-    
-    if ([LXUserDefaults isInstallWeiXin] != 1) { // 没有安装微信 不走友盟
-        [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"微信登录失败,没有安装微信" delay:1.5];
-        return nil;
-    }
-    
-    kMainQueue(^{
-        
-        [[UMSocialManager defaultManager] getUserInfoWithPlatform:UMSocialPlatformType_WechatSession currentViewController:self completion:^(id result, NSError *error) {
-            
-            UMSocialUserInfoResponse *resp = result;
-            
-            [self dealWXDic:(NSDictionary *)resp.originalResponse];
-            
-            [[LXViewControllerManager shareViewControllerManager] hideHud];
-        }];
-        
-        
-        
-    });
-    
-    return nil;
-}
-// 处理微信登录获取到的数据
--(void)dealWXDic:(NSDictionary *)dictionary{
-    
-    [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-    //如果获取到用户信息,即用户点击了“登录”,则进行用户信息获取
-    if (dictionary.count > 0) {
-        
-        NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithDictionary:dictionary];
-        
-        if (dic) {
-            [dic removeObjectForKey:@"privilege"];
-            [dic removeObjectForKey:@"language"];
-            double currDouble = [[NSDate date] timeIntervalSince1970];
-            [dic setObject:[NSNumber numberWithLong:(long)currDouble] forKey:@"createtime"];
-            
-            //         拼接标志位
-            NSString *sign = [NSString stringWithFormat:@"city=%@&country=%@&createtime=%@&headimgurl=%@&nickname=%@&openid=%@&province=%@&sex=%@&unionid=%@", dic[@"city"], dic[@"country"], dic[@"createtime"], dic[@"headimgurl"], dic[@"nickname"], dic[@"openid"], dic[@"province"],dic[@"sex"],dic[@"unionid"]];
-            sign = [LXMD5 md532BitLower:sign];
-            [dic setObject:sign forKey:@"sign"];
-            NSString *endStr = [[LXViewControllerManager shareViewControllerManager] getJsonStr:dic];
-            NSData *data = [endStr dataUsingEncoding:NSUTF8StringEncoding];
-            endStr = [data base64EncodedStringWithOptions:0];
-            
-            
-            JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-            NSString * textJS1 = [NSString stringWithFormat:@"loginByWeixinCallBack('%@')", endStr];
-            JSValue *value =   [context evaluateScript:textJS1];
-            NSLog(@"%@", value);
-            
-        }
-    }
-    
-}
-
-// js 调用分享
--(void)jsShare:(NSString *)type title:(NSString *)title content:(NSString *)content link:(NSString *)link{
-    UMSocialPlatformType shareType;
-    
-    if ([type intValue] == 1) { // 微信好友
-        shareType = UMSocialPlatformType_WechatSession;
-    }else if ([type intValue] == 2){ /// qq好友
-        shareType = UMSocialPlatformType_QQ;
-    }else if ([type intValue] == 3){ // 朋友圈
-        shareType = UMSocialPlatformType_WechatTimeLine;
-    }else{
-        shareType = UMSocialPlatformType_WechatSession;
-    }
-    
-    kMainQueue((^{
-        
-        //         没有安装app 不走分享逻辑
-        if ([type intValue] == 1 || [type intValue] == 3) {
-            if ([LXUserDefaults isInstallWeiXin] != 1) {
-                [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"没有安装微信" delay:1.5];
-                return;
-            }
-        }
-        //         没有安装app 不走分享逻辑
-        if ([type intValue] == 2) {
-            if (![[UMSocialManager defaultManager] isInstall:UMSocialPlatformType_QQ]) {
-                [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"没有安装QQ" delay:1.5];
-                return;
-            }
-        }
-        
-        //创建分享消息对象
-        UMSocialMessageObject *messageObject = [UMSocialMessageObject messageObject];
-        //创建网页内容对象
-        UMShareWebpageObject *shareObject = [UMShareWebpageObject shareObjectWithTitle:title descr:content thumImage:[UIImage imageNamed:@"logo"]];
-        //设置网页地址
-        shareObject.webpageUrl = link;
-        messageObject.shareObject = shareObject;
-        //调用分享接口
-        [[UMSocialManager defaultManager] shareToPlatform:shareType messageObject:messageObject currentViewController:self completion:^(id data, NSError *error) {
-            if (error) {
-                NSLog(@"22222222%@",error.userInfo);
-                if (error.userInfo[@"message"] && [error.userInfo[@"message"] containsString:@"Operation is cancel"]) {
-                    [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"取消分享" delay:1];
-                }else{
-                    [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:error.userInfo[@"message"] delay:1];
-                }
-                
-                NSString *textJS =  [NSString stringWithFormat:@"shareCallBack('%@','%@')",type,@"0"];
-                JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-                [context evaluateScript:textJS];
-                
-            }else{
-                if ([data isKindOfClass:[UMSocialShareResponse class]]) {
-                    UMSocialShareResponse *resp = data;
-                    NSLog(@"33333%@",resp.message);
-                    NSLog(@"44444%@",resp.originalResponse);
-                    
-                    NSString *textJS =  [NSString stringWithFormat:@"shareCallBack('%@','%@')",type,@"1"];
-                    JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-                    [context evaluateScript:textJS];
-                    
-                }else{
-                    UMSocialLogInfo(@"response data is %@",data);
-                    NSLog(@"55555%@",data);
-                }
-            }
-        }];
-    }));
-}
-
-// 登录时获取到令牌 并保存
--(void)jsSaveUserToken:(NSString *)token{
-    [[LXViewControllerManager shareViewControllerManager] hideHud];
-    [LXUserDefaults saveToken:token];
-}
-
-// 取本地的用户令牌
--(NSString *)jsGetUserToken:(NSString *)str{
-    return [LXUserDefaults token];
-}
-
-// 退出时 清空用户数据
--(void)jsRemoveUserToken:(NSString *)str{
-    [LXUserDefaults clearAll];
-    //    [[LXDataBaseManager shareDataBaseManager] clearAll];
-    
-}
-
-
-// 手机通知权限是否打开
--(int)jsCheckNoticePermission:(NSString *)str{
-    int a = [LXUserDefaults notifyState];
-    return a;
-}
-
-// 跳转到系统设置
--(void)jsOpenSystemNotification:(NSString *)str{
-    self.updateNotify = YES;
-    kMainQueue(^{
-        [[UIApplication sharedApplication]openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
-    });
-}
-
-// 调用js方法 刷新推送权限状态
--(void)updateNotifyState{
-    if (self.updateNotify) {
-        self.updateNotify = NO;
-        JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-        NSString * textJS1 = [NSString stringWithFormat:@"updateNoticeSwitch()"];
-        [context evaluateScript:textJS1];
-    }
-}
-// 获取推送id
--(NSString *)jsGetPushRid:(NSString *)str{
-    return [LXUserDefaults registrationID];
-}
-
-// 按通知取数据
--(NSString *)jsGetMessageList:(NSString *)openid{
-    NSArray *arr = [[LXDataBaseManager shareDataBaseManager] getMessageWithKey:nil openid:openid fromTable:kNewsTable start:0 length:100];
-    if (arr.count > 0) {
-        return [[LXViewControllerManager shareViewControllerManager] getJsonStr:arr];
-    }
-    return @"";
-}
-
-// 更新消息状态
--(void)jsUpdateMessageState:(NSNumber *)lxID state:(NSNumber *)state{
-    [[LXDataBaseManager shareDataBaseManager] changeReadedWithID:lxID state:state];
-}
-
-// 删除一条数据
--(void)jsDeleteMessageById:(NSNumber *)lxID{
-    [[LXDataBaseManager shareDataBaseManager] deleteMessage:lxID fromTable:kNewsTable];
-}
-
-// 取单条数据
--(NSString *)jsGetMessage:(NSString *)lxID{
-    return [[LXViewControllerManager shareViewControllerManager] getJsonStr:[[LXDataBaseManager shareDataBaseManager] getMessageWithKey:lxID openid:nil fromTable:kNewsTable start:0 length:0]];
-}
-// 取未读消息总数
--(int)jsGetUnReadMessageCount:(NSString *)openid{
-    NSLog(@"openid=%@",openid);
-    //    NSLog(@"%d",[[LXDataBaseManager shareDataBaseManager] getUnReadMessageCount:openid]);
-    
-    return [[LXDataBaseManager shareDataBaseManager] getUnReadMessageCount:openid];
-}
-
-// 全部置为已读
--(void)jsUpdateAllUnReadMessage:(NSString *)openid{
-    [[LXDataBaseManager shareDataBaseManager] updateAllUnReadMessage:openid];
-}
-
-// 改变状态栏文字颜色
--(void)jsLightStatusBar:(NSString *)status{
-    kMainQueue(^{
-        NSInteger index = 0;
-        if ([status intValue] == 1) {
-            index = 1;// hei
-        }else{
-            index = 0;// bai
-        }
-        [[UIApplication sharedApplication] setStatusBarStyle:index];
-    });
-    
-}
-// 打开新页面 加载新web
--(void)jsOpenExternalLink:(NSString *)url title:(NSString *)title{
-    if (url) {
-        if ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable || [AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusUnknown) {
-            //            [self addNoNetViews];
-        }
-        NewWebController *ctr = [[NewWebController alloc] init];
-        ctr.url = url;
-        //         有title的话 会显示自定义的导航栏 没有的话不显示导航栏 显示加载进度条
-        if (!title || [title isEqualToString:@""] || [title isEqualToString:@"undefined"]) {
-            ctr.titleShow = nil;
-        }else{
-            ctr.titleShow = title;
-        }
-        kMainQueue(^{
-            [self presentViewController:ctr animated:NO completion:nil];
-        });
-    }
-}
-
-// 获取当前版本号
--(NSString *)jsGetVersion:(NSString *)str{
-    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
-}
-
-// web是否可退回上页面
--(int)jsIsCanBack:(NSString *)str{
-    return self.webView.canGoBack ? 1:0;
-}
-
-// 弹框
--(void)jsAlert:(NSString *)content{
-    [[LXViewControllerManager shareViewControllerManager] showAlertViewWithMessage:content];
-}
-
-// 是否安装微信
--(int)jsIsInstallWeixin:(NSString *)str{
-    return [LXUserDefaults isInstallWeiXin];
-}
-
-
--(void)jsChangeMessageType:(NSString *)link
-{
-    //已读操作处理
-    NSLog(@"已读操作处理-更改");
-    [[LXDataBaseManager shareDataBaseManager] changeCatagoryTypeWithURL:link];
-}
-
-
-
-
-
-
-
--(void)jsOpenActivityPage:(NSString *)url rectype:(NSString *)rectype openid:(NSString *)openid
-{
-    NSDictionary * infoDic = @{@"url":url,
-                               @"rectype":rectype,
-                               @"openid":openid,
-                               };
-    
-    //    NSString *textJS =  [NSString stringWithFormat:@"messageAccept('%@','%@','%@')",infoDic[@"mid"],infoDic[@"rectype"],infoDic[@"openid"]];
-    //    JSContext *context = [self.webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
-    //    [context evaluateScript:textJS];
-    
-    
-    //post请求
-    NSLog(@"%@",[NSString stringWithFormat:@"%@jyapp/free/message/receive",kHost]);
-    [[LXNetworkManager shareLXNetworkManager]postWithURLStr:[NSString stringWithFormat:@"%@jyapp/free/message/receive",kHost] parameters:infoDic progress:^(NSProgress *progress) {
-        NSLog(@"成功:%@",progress);
-    } success:^(id responseObject) {
-        NSLog(@"responseObject=%@",responseObject);
-    } failure:^(NSError *error) {
-        NSLog(@"error=%@",error);
-    }];
-    
-    
-}
-
-
-
-
-
--(NSString *)jsGetCipherText:(NSString *)phone
-{
-    
-    NSDate *date=[NSDate date];
-    NSDateFormatter *format1=[[NSDateFormatter alloc] init];
-    [format1 setDateFormat:@"yyyyMMddhhmmss"];
-    NSString *dateStr;
-    dateStr=[format1 stringFromDate:date];
-    NSLog(@"%@",dateStr);
-    
-    NSString *content = [[NSString stringWithFormat:@"%@_%@",phone,dateStr] stringByAppendingString:[NSString stringWithFormat:@"_%@",[LXMD5 md532BitLower:[NSString stringWithFormat:@"%@&%@",phone,dateStr]]]];
-    NSData *contentData = [content dataUsingEncoding:NSUTF8StringEncoding];
-    NSUInteger dataLength = contentData.length;
-    // 为结束符'\\0' +1
-    char keyPtr[kKeySize + 1];
-    memset(keyPtr, 0, sizeof(keyPtr));
-    [AesKey getCString:keyPtr maxLength:sizeof(keyPtr) encoding:NSUTF8StringEncoding];
-    // 密文长度 <= 明文长度 + BlockSize
-    size_t encryptSize = dataLength + kCCBlockSizeAES128;
-    void *encryptedBytes = malloc(encryptSize);
-    size_t actualOutSize = 0;
-    NSData *initVector = [kInitVector dataUsingEncoding:NSUTF8StringEncoding];
-    CCCryptorStatus cryptStatus = CCCrypt(kCCEncrypt,
-                                          kCCAlgorithmAES,
-                                          kCCOptionPKCS7Padding,  // 系统默认使用 CBC,然后指明使用 PKCS7Padding
-                                          keyPtr,
-                                          kKeySize,
-                                          initVector.bytes,
-                                          contentData.bytes,
-                                          dataLength,
-                                          encryptedBytes,
-                                          encryptSize,
-                                          &actualOutSize);
-    if (cryptStatus == kCCSuccess) {
-        // 对加密后的数据进行 base64 编码
-        return [[NSData dataWithBytesNoCopy:encryptedBytes length:actualOutSize] base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];
-    }
-    free(encryptedBytes);
-    return nil;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-@end