|
@@ -165,7 +165,6 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
|
}
|
|
|
NSLog(@"111 :第一次加载:%@",tmpUrl);
|
|
|
tmpUrl = [tmpUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
|
|
-
|
|
|
kMainQueue(^{
|
|
|
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:tmpUrl]]];
|
|
|
})
|
|
@@ -239,7 +238,6 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
|
NSLog(@"不可返回");
|
|
|
return;
|
|
|
}
|
|
|
- [current_url stringByReplacingOccurrencesOfString:@"https://" withString:@"http://"];
|
|
|
if([current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/free/me",kHost]]||[current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/jylab/index",kHost]]||[current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/swordfish/historypush",kHost]]||[current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/jylab/mainSearch",kHost]]){
|
|
|
return;
|
|
|
}
|
|
@@ -421,6 +419,7 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
|
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {
|
|
|
//如果当前页面是三级页面-
|
|
|
NSString *curUrl = [webView.URL absoluteString];
|
|
|
+
|
|
|
if ([curUrl containsString:@"jyapp/article/content"]) {
|
|
|
//当前页面是三级页面--判断待跳转页面是否符合内置跳转
|
|
|
NSString *nextUrl = [navigationAction.request.URL absoluteString];
|
|
@@ -511,11 +510,13 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
|
}];
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
- (void)viewDidLoad {
|
|
|
[super viewDidLoad];
|
|
|
// Do any additional setup after loading the view.
|
|
|
NSLog(@"首页初始化");
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
self.view.backgroundColor = [UIColor whiteColor];
|
|
|
|
|
|
[self.view addSubview:self.webView];
|
|
@@ -538,12 +539,8 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
|
//监听底部栏
|
|
|
[NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(bottomOneListening) userInfo:nil repeats:YES];
|
|
|
|
|
|
-
|
|
|
//监听购买结果
|
|
|
[[SKPaymentQueue defaultQueue] addTransactionObserver:self];
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -696,7 +693,7 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
|
#pragma mark - WKNavigationDelegate
|
|
|
/* 页面加载完成 */
|
|
|
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation{
|
|
|
-// NSLog(@"-----页面加载完成%@",webView.URL.absoluteString);
|
|
|
+ NSLog(@"-----页面加载完成%@",webView.URL.absoluteString);
|
|
|
//第一次加载小红点
|
|
|
if(!isLoadRedDot) {
|
|
|
isLoadRedDot = true;
|
|
@@ -1453,10 +1450,8 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
|
-(void)judgeIsHiddenBottom {
|
|
|
if(self.tabBarController.selectedIndex == 0) {
|
|
|
NSString *current_url = [self stringByEvaluatingJavaScriptFromString:@"document.location.href"];
|
|
|
- NSLog(@"%@",current_url);
|
|
|
NSArray *array = [current_url componentsSeparatedByString:@"?"];
|
|
|
current_url = [NSString stringWithFormat:@"%@",array.firstObject];
|
|
|
- [current_url stringByReplacingOccurrencesOfString:@"https://" withString:@"http://"];
|
|
|
if([current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/jylab/mainSearch",kHost]]){
|
|
|
[self showTabBar];
|
|
|
[self showMethodTabBar];
|