|
@@ -94,7 +94,7 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
|
@"chooseTab",
|
|
|
@"skipCamera",
|
|
|
@"skipAlbum",
|
|
|
- @"appTest",
|
|
|
+ @"openActivityPage",
|
|
|
];
|
|
|
for (NSString*jsName in jsArr) {
|
|
|
[config.userContentController addScriptMessageHandler:self name:jsName];
|
|
@@ -291,6 +291,8 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
|
[self jsSkipCamera:message.body];
|
|
|
}else if ([message.name isEqualToString:@"skipAlbum"]) {
|
|
|
[self jsSkipAlbum:message.body];
|
|
|
+ }else if ([message.name isEqualToString:@"openActivityPage"]) {
|
|
|
+ [self jsOpenActivityPage:message.body];
|
|
|
}else {
|
|
|
|
|
|
}
|
|
@@ -1008,11 +1010,34 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+-(void)jsOpenActivityPage:(NSDictionary *)dict {
|
|
|
+ NSDictionary * infoDic = @{@"url":[NSString stringWithFormat:@"%@",dict[@"url"]],
|
|
|
+ @"rectype":[NSString stringWithFormat:@"%@",dict[@"rectype"]],
|
|
|
+ @"openid":[NSString stringWithFormat:@"%@",dict[@"openid"]],
|
|
|
+ };
|
|
|
+ //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);
|
|
|
+ }];
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// web是否可退回上页面
|
|
|
-(int)jsIsCanBack:(NSString *)str{
|
|
|
return self.webView.canGoBack ? 1:0;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
#pragma mark *****其他方法
|
|
|
-(void)judgeIsHiddenBottom {
|
|
|
if(self.tabBarController.selectedIndex == 0) {
|
|
@@ -1143,7 +1168,6 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
|
if (iPhoneX) {
|
|
|
if (@available(iOS 11.0, *)) {
|
|
|
self.webView.frame = CGRectMake(0, 0, WIDTH, HEIGHT);
|
|
|
- NSLog(@"%@",self.webView)
|
|
|
}
|
|
|
}else {
|
|
|
self.webView.frame = CGRectMake(0, -STATUS_BAR_HEIGHT, WIDTH, HEIGHT+STATUS_BAR_HEIGHT);
|