Browse Source

继承第三方-修改

apple 5 years ago
parent
commit
e3eab035c4

+ 5 - 3
ios/JianYuIOS/JianYuIOS.xcodeproj/project.pbxproj

@@ -395,8 +395,8 @@
 		18C78C0B24E240CE001208F2 /* tool */ = {
 			isa = PBXGroup;
 			children = (
-				18C78C0C24E240CE001208F2 /* ZKClipboardView.m */,
 				18C78C0E24E240CE001208F2 /* ZKClipboardView.h */,
+				18C78C0C24E240CE001208F2 /* ZKClipboardView.m */,
 				18C78C0D24E240CE001208F2 /* ZKModal.h */,
 				18C78C0F24E240CE001208F2 /* ZKModal.m */,
 			);
@@ -1060,6 +1060,7 @@
 				CODE_SIGN_STYLE = Automatic;
 				CURRENT_PROJECT_VERSION = 55;
 				DEVELOPMENT_TEAM = 4S438G3ZUL;
+				ENABLE_BITCODE = NO;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/JianYuIOS/ThirdSDK/UMSocial/UMSocialUI",
@@ -1079,7 +1080,7 @@
 					"$(PROJECT_DIR)/JianYuIOS/Libs(第三方)/WeChatSDK1.8.3",
 					"$(PROJECT_DIR)/JianYuIOS/Libs(第三方)/WeChatSDK1.8.4",
 				);
-				MARKETING_VERSION = 2.9.6;
+				MARKETING_VERSION = 2.9.7;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",
@@ -1144,6 +1145,7 @@
 				CODE_SIGN_STYLE = Automatic;
 				CURRENT_PROJECT_VERSION = 55;
 				DEVELOPMENT_TEAM = 4S438G3ZUL;
+				ENABLE_BITCODE = NO;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/JianYuIOS/ThirdSDK/UMSocial/UMSocialUI",
@@ -1163,7 +1165,7 @@
 					"$(PROJECT_DIR)/JianYuIOS/Libs(第三方)/WeChatSDK1.8.3",
 					"$(PROJECT_DIR)/JianYuIOS/Libs(第三方)/WeChatSDK1.8.4",
 				);
-				MARKETING_VERSION = 2.9.6;
+				MARKETING_VERSION = 2.9.7;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",

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


+ 3 - 3
ios/JianYuIOS/JianYuIOS/AppDelegate.m

@@ -48,8 +48,8 @@
         
     }else {
         //设置启动页
-    ZKGuideView *guideView = [[ZKGuideView alloc]initWithFrame:self.window.frame];
-    NSLog(@"%f",guideView.frame.size.width);
+        ZKGuideView *guideView = [[ZKGuideView alloc]initWithFrame:self.window.frame];
+        NSLog(@"%f",guideView.frame.size.width);
     }
 
     NSLog(@"初始化");
@@ -234,7 +234,7 @@
     //查看粘贴板数据
     NSString  *content = [UIPasteboard generalPasteboard].string;
     //发通知
-    //你身边的人都在用剑鱼标讯超级订阅找商机就差你了!%20复制这条信息:CEWYJJLKN,打开【剑鱼标讯APP】识别复制口令,快速获取全国招标项目!
+    //粘贴板内容:你身边的人都在用剑鱼标讯超级订阅找商机就差你了!%20复制这条信息:AEWYJJLKN,打开【剑鱼标讯APP】识别复制口令,快速获取全国招标项目!
     NSLog(@"粘贴板内容:%@",content);
     if ([content containsString:@"剑鱼标讯"]&&[GlobalData shareInstance].isOpen == YES) {
         //如果符合条件发送通知

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

@@ -17,7 +17,6 @@
 @property (nonatomic,assign)BOOL isReLogin;//是否重新登录
 @property (nonatomic,assign)BOOL isOpen;//是否打开-启动
 
-//@property (nonatomic,assign)BOOL isSideslip;//是否侧滑
 
 //Plist 表相关
 

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

@@ -130,6 +130,8 @@ _Pragma("clang diagnostic pop")\
 //内购
 #import <StoreKit/StoreKit.h>
 
+//OCR
+#import <WBOCRService/WBOCRService.h>
 
 #import "UIView+Extension.h"
 #import "GlobalData.h"
@@ -140,6 +142,7 @@ _Pragma("clang diagnostic pop")\
 #import "NJKWebViewProgressView.h"
 #import "NJKWebViewProgress.h"
 #import "JYNewWebController.h"
+#import "ZKClipboardView.h"
 
 
 //#define kHost @"http://web-jydev-ws.jianyu360.cn/" //王山
@@ -150,7 +153,7 @@ _Pragma("clang diagnostic pop")\
 
 //#define kHost @"http://web-jydev-wky.jianyu360.cn/" //王凯悦
 
-//#define kHost @"http://web-jydev-zxl.jianyu360.cn/" //张鑫磊
+#define kHost @"http://web-jydev-zxl.jianyu360.cn/" //张鑫磊
 
 //#define kHost @"http://web-jydev-xzh.jianyu360.cn/" //徐志恒
 
@@ -161,7 +164,7 @@ _Pragma("clang diagnostic pop")\
 //#define kHost @"https://app3-jytest.jianyu360.cn/" //app3测试
 
 //#define kHost @"https://res.jianyu360.com/"   //正式https
-#define kHost @"http://res.jianyu360.com/"    //正式http
+//#define kHost @"http://res.jianyu360.com/"    //正式http
 
 
 //#define kHost @"http://app2-jytest.jianyu360.cn/"  //测试http

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

@@ -13,7 +13,7 @@
 
 
 
-@interface JYNewSearchViewController ()<WKNavigationDelegate,WKUIDelegate,WKScriptMessageHandler,CLLocationManagerDelegate,UINavigationControllerDelegate,UIImagePickerControllerDelegate,CLLocationManagerDelegate,SKProductsRequestDelegate,SKPaymentTransactionObserver>
+@interface JYNewSearchViewController ()<WKNavigationDelegate,WKUIDelegate,WKScriptMessageHandler,CLLocationManagerDelegate,UINavigationControllerDelegate,UIImagePickerControllerDelegate,CLLocationManagerDelegate,SKProductsRequestDelegate,SKPaymentTransactionObserver,ZKClipboardViewDelegate>
 {
     NSInteger _timeTick;
     NSInteger _time;
@@ -39,7 +39,7 @@
 
 @property(nonatomic, strong)NoNetView *noNetView;
 @property(nonatomic, strong)UIPanGestureRecognizer *recognizer;
-
+@property(nonatomic, strong)ZKClipboardView *clipboardView;
 
 
 
@@ -60,14 +60,14 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
     [self.navigationController setNavigationBarHidden:YES animated:animated];
 }
 ////弹框
-//-(ZKClipboardView *)clipboardView
-//{
-//    if(!_clipboardView) {
-//        _clipboardView = [[ZKClipboardView alloc]initWithFrame:CGRectMake(0, 0, WIDTH*0.8, 175)];
-//        _clipboardView.delegate = self;
-//    }
-//    return _clipboardView;
-//}
+-(ZKClipboardView *)clipboardView
+{
+    if(!_clipboardView) {
+        _clipboardView = [[ZKClipboardView alloc]initWithFrame:CGRectMake(0, 0, WIDTH*0.8, 175)];
+        _clipboardView.delegate = self;
+    }
+    return _clipboardView;
+}
 
 //进度条
 - (UIProgressView *)progressView
@@ -526,9 +526,36 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
     [[SKPaymentQueue defaultQueue] addTransactionObserver:self];
     
    
+    NSLog(@"sdk version:%@",[[WBOCRService sharedService] sdkVersion]);
+    
+    UIButton *btn = [ZKControl createButtonWithFrame:CGRectMake(100, 200, 50, 50) title:@"测试" imageName:@"" bgImageName:@"" target:self method:@selector(btnClick)];
+    [self.view addSubview:btn];
+    
+    
+}
+
+
+-(void)btnClick{
+    NSString *posturl = [NSString stringWithFormat:@"%@jyapp/faceDiscern/getNonceTicket",kHost];
+    [[LXNetworkManager shareLXNetworkManager] postWithURLStr:posturl parameters:@{@"token":[LXUserDefaults token]} progress:^(NSProgress *progress) {
+        NSLog(@"%@",progress);
+    } success:^(id responseObject) {
+        NSLog(@"responseObject=%@",responseObject);
+        if ([responseObject objectForKey:@"data"]) {
+            [self getOcrService:responseObject[@"data"]];
+        }
+    } failure:^(NSError *error) {
+        NSLog(@"error=%@",error);
+    }];
+
 }
 
 
+
+
+
+
+
 -(void)bottomOneListening {
     if(self.tabBarController.selectedIndex == 0) {
         [self judgeIsHiddenBottom];
@@ -670,15 +697,15 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
     //写数据
 //    [self writeWKWebData:webView.URL];
     
-    if (![GlobalData shareInstance].isOpen) {
+    if (![GlobalData shareInstance].isOpen) {//第一次打开
         [GlobalData shareInstance].isOpen = YES;
-        [self performSelector:@selector(pasteboard) withObject:nil afterDelay:0.5];
+        [self performSelector:@selector(pasteboard) withObject:nil afterDelay:1.5];
     }
 }
 
 -(void)pasteboard {
     NSString  *content = [UIPasteboard generalPasteboard].string;
-    if ([content containsString:@"剑鱼标讯"]) {
+    if ([content containsString:@"剑鱼标讯"]) {//第一次打开页面时候
         [[NSNotificationCenter defaultCenter] postNotificationName:UpdateClipboard object:nil userInfo:@{@"content":content}];
     }
 }
@@ -912,7 +939,7 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
 
 //js方法登录成功
 -(void)jsLoginSuccess:(NSDictionary *)dict {
-    NSLog(@"search登录成功提示");
+    NSLog(@"search登录成功提示:%@",dict);
     NSString *status = [NSString stringWithFormat:@"%@",dict[@"status"]];
     [GlobalData shareInstance].isReLogin = YES;
     if([status isEqualToString:@"S"]) {
@@ -923,9 +950,11 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
                 JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
                 tab.selectedIndex = pushIndex;
                 pushIndex = 0;
+                
             }));
         }else {
             [self webViewFirstRequest];
+            
         }
         
     }else if ([status isEqualToString:@""]) {
@@ -935,6 +964,9 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
         
     }
 }
+
+
+
 -(void)jsBackUrl:(NSDictionary *)dict {
     NSString *status = [NSString stringWithFormat:@"%@",dict[@"status"]];
     if([status isEqualToString:@"H"]) {
@@ -1856,16 +1888,85 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
 //粘贴板相关-梳理
 -(void)updateClipboard:(NSNotification *)notificaition{
     if(self.tabBarController.selectedIndex == 0) {
+        NSString *current_url = [self stringByEvaluatingJavaScriptFromString:@"document.location.href"];
         NSDictionary *dict = notificaition.userInfo;
         NSString *content = [NSString stringWithFormat:@"%@",dict[@"content"]];
-        //调用js
-//        [self isExitCallToJS:@"tIOSt()" withMethodName:@"tIOSt"];
-        NSString *textJS =  [NSString stringWithFormat:@"distribInfo('%@')",content];
-        [self isExitCallToJS:textJS withMethodName:@"distribInfo"];
+        if ([current_url containsString:@"jyapp/free/login"]) {
+            NSLog(@"登录页面-调用js");
+            NSString *textJS =  [NSString stringWithFormat:@"distribInfo('%@')",content];
+            [self isExitCallToJS:textJS withMethodName:@"distribInfo"];
+            
+        }else {
+        
+            [[LXNetworkManager shareLXNetworkManager]postWithURLStr:[NSString stringWithFormat:@"%@distribution/share/getWordInfo",kHost] parameters:@{@"copyTxt":content} progress:^(NSProgress *progress) {
+                NSLog(@"%@",progress);
+            } success:^(id responseObject) {
+                NSLog(@"responseObject=%@",responseObject);
+                if ([responseObject objectForKey:@"data"]) {
+                    NSDictionary *dict = [[NSDictionary alloc]initWithDictionary:responseObject[@"data"]];
+                    self.clipboardView.title =dict[@"title"];
+                    self.clipboardView.subTitle =dict[@"subTitle"];
+                    self.clipboardView.imgUrl =dict[@"imgUrl"];
+                    self.clipboardView.appUrl =dict[@"appUrl"];
+                    self.clipboardView.butTxt =dict[@"butTxt"];
+                    self.clipboardView.bottomTxt =dict[@"bottomTxt"];
+                    [self.clipboardView show];
+                }
+            } failure:^(NSError *error) {
+                NSLog(@"error=%@",error);
+            }];
+        }
     }
 }
 
 
+-(void)clipboardClick:(NSString *)url {
+    NSString *tmpUrl = [NSString stringWithFormat:@"%@%@", kHost, url];
+    tmpUrl =  [tmpUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
+    kMainQueue(^{
+        [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:tmpUrl]]];
+    })
+}
+
+-(void)getOcrService:(NSDictionary *)dict {
+    
+    /*data =     {
+        nonceStr = 64lwqjoobn0q9931nemys7q8yxor5x6u;
+        "nonce_ticket" = MzL8NdFWuVUPxp2UMenw01Jzmr4b2CZ08YBgkqhpwFVnmKqghKCIOUhrAs9adZix;
+        "order_code" = A1597130809229670;
+        userid = "";
+    }*/
+    NSLog(@"%@",dict);
+    WBOCRConfig *config = [WBOCRConfig sharedConfig];
+    config.needRecordVideo = NO;
+    config.SDKType = WBOCRSDKTypeIDCardNormal; // 身份证两面识别
+    [[WBOCRService sharedService] startOCRServiceWithConfig:[WBOCRConfig sharedConfig]
+               version:[[WBOCRService sharedService] sdkVersion]
+                 appId:@"1256928877"
+                 nonce:dict[@"nonceStr"]
+                userId:dict[@"userid"]
+                  sign:dict[@"nonce_ticket"]
+               orderNo:dict[@"order_code"]
+          startSucceed:^{
+              /** SDK服务拉起成功回调 */
+              NSLog(@"启动SDK成功!!!");
+          }recognizeSucceed:^(id _Nonnull resultInfoModel,id extension) {
+              /** SDK本次识别成功回调 */
+              NSLog(@"SDK识别成功!!!");
+          }failed:^(NSError * _Nonnull error,id extension) {
+              /** SDK异常回调 */
+              NSLog(@"识别出错!!!");
+              NSLog(@"error:%@",error);
+          }];
+}
+
+
+
+
+
+
+
+
 
 
 -(void)clearWeb{

+ 5 - 38
ios/JianYuIOS/JianYuIOS/Info.plist

@@ -91,20 +91,6 @@
 		<true/>
 		<key>NSExceptionDomains</key>
 		<dict>
-			<key>app-i1.jianyu360.com</key>
-			<dict>
-				<key>NSExceptionAllowsInsecureHTTPLoads</key>
-				<true/>
-				<key>NSIncludesSubdomains</key>
-				<true/>
-			</dict>
-			<key>app-jytest.jianyu360.cn</key>
-			<dict>
-				<key>NSExceptionAllowsInsecureHTTPLoads</key>
-				<true/>
-				<key>NSIncludesSubdomains</key>
-				<true/>
-			</dict>
 			<key>app2-jytest.jianyu360.cn</key>
 			<dict>
 				<key>NSExceptionAllowsInsecureHTTPLoads</key>
@@ -133,14 +119,7 @@
 				<key>NSIncludesSubdomains</key>
 				<true/>
 			</dict>
-			<key>web-jydev-wky.jianyu360.cn</key>
-			<dict>
-				<key>NSExceptionAllowsInsecureHTTPLoads</key>
-				<true/>
-				<key>NSIncludesSubdomains</key>
-				<true/>
-			</dict>
-			<key>web-jydev-wss.jianyu360.cn</key>
+			<key>web-jydev-ws.jianyu360.cn</key>
 			<dict>
 				<key>NSExceptionAllowsInsecureHTTPLoads</key>
 				<true/>
@@ -154,24 +133,10 @@
 				<key>NSIncludesSubdomains</key>
 				<true/>
 			</dict>
-			<key>web-jydev-zyh.jianyu360.cn</key>
-			<dict>
-				<key>NSExceptionAllowsInsecureHTTPLoads</key>
-				<true/>
-				<key>NSIncludesSubdomains</key>
-				<true/>
-			</dict>
-			<key>web-jydev-zyx.jianyu360.cn</key>
-			<dict>
-				<key>NSExceptionAllowsInsecureHTTPLoads</key>
-				<true/>
-				<key>NSIncludesSubdomains</key>
-				<true/>
-			</dict>
 		</dict>
 	</dict>
 	<key>NSCameraUsageDescription</key>
-	<string>是否允许剑鱼标讯使用您的相机,用于拍摄照片?</string>
+	<string>是否允许“剑鱼标讯”使用您的相机,用于拍摄照片?</string>
 	<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
 	<string>是否允许“剑鱼标讯”使用您的位置?用于您未设置订阅信息时,为您推送当前地区最新招投标信息
 允许“剑鱼标讯”使用您的位置?
@@ -194,8 +159,10 @@
 用于您未设置订阅信息时,为您推送当前地区最新招投标信息
 允许“剑鱼标讯”使用您的位置?
 用于您未设置订阅信息时,为您推送当前地区最新招投标信息</string>
+	<key>NSMicrophoneUsageDescription</key>
+	<string>是否允许“剑鱼标讯”访问您的麦克风,用于获取获取声音?</string>
 	<key>NSPhotoLibraryUsageDescription</key>
-	<string>是否允许剑鱼标讯访问您的相册,用于获取照片?</string>
+	<string>是否允许剑鱼标讯访问您的相册,用于获取照片?</string>
 	<key>UIBackgroundModes</key>
 	<array>
 		<string>remote-notification</string>