|
@@ -225,6 +225,8 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshAllVC:) name:RefreshAllVC object:nil];
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshAllVC:) name:RefreshAllVC object:nil];
|
|
//粘贴板-
|
|
//粘贴板-
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateClipboard:) name:UpdateClipboard object:nil];
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateClipboard:) name:UpdateClipboard object:nil];
|
|
|
|
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(openTheClipboard:) name:OpenTheClipboard object:nil];
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
#pragma mark – Gesture Recognizer –
|
|
#pragma mark – Gesture Recognizer –
|
|
@@ -962,11 +964,9 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
|
|
JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
|
|
tab.selectedIndex = pushIndex;
|
|
tab.selectedIndex = pushIndex;
|
|
pushIndex = 0;
|
|
pushIndex = 0;
|
|
-
|
|
|
|
}));
|
|
}));
|
|
}else {
|
|
}else {
|
|
[self webViewFirstRequest];
|
|
[self webViewFirstRequest];
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}else if ([status isEqualToString:@""]) {
|
|
}else if ([status isEqualToString:@""]) {
|
|
@@ -975,6 +975,15 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
}else {
|
|
}else {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //弹出页面
|
|
|
|
+ if ([GlobalData shareInstance].isPasteLogin) {
|
|
|
|
+ [GlobalData shareInstance].isPasteLogin = NO;
|
|
|
|
+ NSString *content = [UIPasteboard generalPasteboard].string;
|
|
|
|
+ [self popPasteVIew:content];
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1212,7 +1221,7 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
NSLog(@"SDK识别成功!!!");
|
|
NSLog(@"SDK识别成功!!!");
|
|
//调用js - 告知成功
|
|
//调用js - 告知成功
|
|
NSString *textJS = [NSString stringWithFormat:@"ocrVerifyResult('%@')",orderNo];
|
|
NSString *textJS = [NSString stringWithFormat:@"ocrVerifyResult('%@')",orderNo];
|
|
- [self isExitCallToJS:textJS withMethodName:@"getParam"];
|
|
|
|
|
|
+ [self isExitCallToJS:textJS withMethodName:@"ocrVerifyResult"];
|
|
} failed:^(NSError * _Nonnull error, id _Nullable extension) {
|
|
} failed:^(NSError * _Nonnull error, id _Nullable extension) {
|
|
/** SDK异常回调 */
|
|
/** SDK异常回调 */
|
|
NSLog(@"识别出错!!!"); //200101 用户取消操作
|
|
NSLog(@"识别出错!!!"); //200101 用户取消操作
|
|
@@ -1258,7 +1267,7 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
if (faceVerifyResult.isSuccess) {
|
|
if (faceVerifyResult.isSuccess) {
|
|
NSLog(@"活体检测成功:%@",faceVerifyResult.orderNo);
|
|
NSLog(@"活体检测成功:%@",faceVerifyResult.orderNo);
|
|
NSString *textJS = [NSString stringWithFormat:@"faceVerifyResult('%@')",faceVerifyResult.orderNo];
|
|
NSString *textJS = [NSString stringWithFormat:@"faceVerifyResult('%@')",faceVerifyResult.orderNo];
|
|
- [self isExitCallToJS:textJS withMethodName:@"faceEnd"];
|
|
|
|
|
|
+ [self isExitCallToJS:textJS withMethodName:@"faceVerifyResult"];
|
|
self.verifyMsgView.descTitle = @"活体检测成功";
|
|
self.verifyMsgView.descTitle = @"活体检测成功";
|
|
[self.verifyMsgView show];
|
|
[self.verifyMsgView show];
|
|
}else {
|
|
}else {
|
|
@@ -1983,47 +1992,56 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
[self webViewFirstRequest];
|
|
[self webViewFirstRequest];
|
|
}
|
|
}
|
|
|
|
|
|
-//粘贴板相关-梳理
|
|
|
|
|
|
+#pragma mark ****粘贴板相关-梳理
|
|
-(void)updateClipboard:(NSNotification *)notificaition{
|
|
-(void)updateClipboard:(NSNotification *)notificaition{
|
|
if(self.tabBarController.selectedIndex == 0) {
|
|
if(self.tabBarController.selectedIndex == 0) {
|
|
NSString *current_url = [self stringByEvaluatingJavaScriptFromString:@"document.location.href"];
|
|
NSString *current_url = [self stringByEvaluatingJavaScriptFromString:@"document.location.href"];
|
|
NSDictionary *dict = notificaition.userInfo;
|
|
NSDictionary *dict = notificaition.userInfo;
|
|
NSString *content = [NSString stringWithFormat:@"%@",dict[@"content"]];
|
|
NSString *content = [NSString stringWithFormat:@"%@",dict[@"content"]];
|
|
if ([current_url containsString:@"jyapp/free/login"]) {
|
|
if ([current_url containsString:@"jyapp/free/login"]) {
|
|
- NSLog(@"登录页面-调用js");
|
|
|
|
- NSString *textJS = [NSString stringWithFormat:@"distribInfo('%@')",content];
|
|
|
|
- [self isExitCallToJS:textJS withMethodName:@"distribInfo"];
|
|
|
|
-
|
|
|
|
|
|
+ [GlobalData shareInstance].isPasteLogin = YES;
|
|
}else {
|
|
}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);
|
|
|
|
- }];
|
|
|
|
|
|
+ [self popPasteVIew:content];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+-(void)openTheClipboard:(NSNotification *)notificaition{
|
|
|
|
+ if(self.tabBarController.selectedIndex == 0) {
|
|
|
|
+ NSLog(@"首页打开指定粘贴板url");
|
|
|
|
+ NSDictionary *dict = notificaition.userInfo;
|
|
|
|
+ NSString *tmpUrl = [NSString stringWithFormat:@"%@%@", kHost, dict[@"url"]];
|
|
|
|
+ tmpUrl = [tmpUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
|
|
|
+ kMainQueue(^{
|
|
|
|
+ [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:tmpUrl]]];
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+//弹出粘贴板框
|
|
|
|
+-(void)popPasteVIew:(NSString *)content {
|
|
|
|
+ [[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"]&&responseObject[@"data"]!=nil) {
|
|
|
|
+ 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);
|
|
|
|
+ }];
|
|
|
|
+}
|
|
|
|
|
|
#pragma mark **** 代理方法
|
|
#pragma mark **** 代理方法
|
|
-(void)clipboardClick:(NSString *)url {
|
|
-(void)clipboardClick:(NSString *)url {
|
|
- NSString *tmpUrl = [NSString stringWithFormat:@"%@%@", kHost, url];
|
|
|
|
- tmpUrl = [tmpUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
|
|
|
- kMainQueue(^{
|
|
|
|
- [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:tmpUrl]]];
|
|
|
|
- })
|
|
|
|
|
|
+ //发送通知打开粘贴板-url
|
|
|
|
+ [[NSNotificationCenter defaultCenter] postNotificationName:OpenTheClipboard object:nil userInfo:@{@"url":url}];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|