|
@@ -23,7 +23,6 @@
|
|
|
|
|
|
@interface JYNewMineViewController ()<WKNavigationDelegate,WKUIDelegate,WKScriptMessageHandler,CLLocationManagerDelegate,UINavigationControllerDelegate,UIImagePickerControllerDelegate>
|
|
@interface JYNewMineViewController ()<WKNavigationDelegate,WKUIDelegate,WKScriptMessageHandler,CLLocationManagerDelegate,UINavigationControllerDelegate,UIImagePickerControllerDelegate>
|
|
{
|
|
{
|
|
- BOOL refreshTabBool;
|
|
|
|
CGPoint startTouch;
|
|
CGPoint startTouch;
|
|
BOOL _isMoving;
|
|
BOOL _isMoving;
|
|
}
|
|
}
|
|
@@ -411,36 +410,29 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
|
|
UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(paningGestureReceive:)];
|
|
UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(paningGestureReceive:)];
|
|
[recognizer delaysTouchesBegan];
|
|
[recognizer delaysTouchesBegan];
|
|
[self.view addGestureRecognizer:recognizer];
|
|
[self.view addGestureRecognizer:recognizer];
|
|
|
|
+
|
|
|
|
+ //监听底部栏
|
|
|
|
+ [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(bottomFourListening) userInfo:nil repeats:YES];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+-(void)bottomFourListening {
|
|
|
|
+ NSLog(@"监听tab-My");
|
|
|
|
+ if(self.tabBarController.selectedIndex == 3) {
|
|
|
|
+ [self judgeIsHiddenBottom];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
#pragma mark - WKNavigationDelegate
|
|
#pragma mark - WKNavigationDelegate
|
|
/* 页面加载完成 */
|
|
/* 页面加载完成 */
|
|
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation{
|
|
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation{
|
|
NSString *curUrl = [self stringByEvaluatingJavaScriptFromString:@"document.location.href"];
|
|
NSString *curUrl = [self stringByEvaluatingJavaScriptFromString:@"document.location.href"];
|
|
NSLog(@"-----页面加载完成%@",curUrl);
|
|
NSLog(@"-----页面加载完成%@",curUrl);
|
|
- if(refreshTabBool){
|
|
|
|
- NSLog(@"刷新-刷新-刷新-刷新-")
|
|
|
|
- refreshTabBool = NO;
|
|
|
|
- }else {
|
|
|
|
- //正常的网页加载
|
|
|
|
- [self judgeIsHidden];//是否隐藏
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-// if ([GlobalData shareInstance].isSideslip) {
|
|
|
|
-// [GlobalData shareInstance].isSideslip = YES;
|
|
|
|
-// [self isExitCallToJS:@"afterClickBack()" withMethodName:@"afterClickBack"];
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
|
|
+ [self judgeIsHiddenBottom];
|
|
[self removeNoNetViews];
|
|
[self removeNoNetViews];
|
|
[[LXViewControllerManager shareViewControllerManager] hideHud];
|
|
[[LXViewControllerManager shareViewControllerManager] hideHud];
|
|
-
|
|
|
|
-// [self performSelector:@selector(afterPageClick) withObject:nil afterDelay:2];
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-//-(void)afterPageClick {
|
|
|
|
-// [self isExitCallToJS:@"afterPageInit()" withMethodName:@"afterPageInit"];
|
|
|
|
-//}
|
|
|
|
// 页面开始加载时调用
|
|
// 页面开始加载时调用
|
|
- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation{
|
|
- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation{
|
|
|
|
|
|
@@ -800,17 +792,19 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
|
|
}
|
|
}
|
|
|
|
|
|
#pragma mark *****其他方法
|
|
#pragma mark *****其他方法
|
|
--(void)judgeIsHidden {
|
|
|
|
- NSString *current_url = [self stringByEvaluatingJavaScriptFromString:@"document.location.href"];
|
|
|
|
- NSLog(@"判断需要隐藏否:%@",current_url);
|
|
|
|
- if([current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/free/me",kHost]]){
|
|
|
|
- NSLog(@"需要展示");
|
|
|
|
- [self showTabBar];
|
|
|
|
- [self showMethodTabBar];
|
|
|
|
- }else {
|
|
|
|
- NSLog(@"需要隐藏");
|
|
|
|
- [self hideTabBar];
|
|
|
|
- [self hiddenMethodTabBar];
|
|
|
|
|
|
+-(void)judgeIsHiddenBottom {
|
|
|
|
+ if(self.tabBarController.selectedIndex == 3) {
|
|
|
|
+ NSString *current_url = [self stringByEvaluatingJavaScriptFromString:@"document.location.href"];
|
|
|
|
+ NSLog(@"判断需要隐藏否:%@",current_url);
|
|
|
|
+ if([current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/free/me",kHost]]){
|
|
|
|
+ NSLog(@"需要展示");
|
|
|
|
+ [self showTabBar];
|
|
|
|
+ [self showMethodTabBar];
|
|
|
|
+ }else {
|
|
|
|
+ NSLog(@"需要隐藏");
|
|
|
|
+ [self hideTabBar];
|
|
|
|
+ [self hiddenMethodTabBar];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1215,7 +1209,6 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
|
|
//刷新页面相关
|
|
//刷新页面相关
|
|
-(void)refreshNonCurVC:(NSNotification *)notificaition{
|
|
-(void)refreshNonCurVC:(NSNotification *)notificaition{
|
|
if(self.tabBarController.selectedIndex != 3) {
|
|
if(self.tabBarController.selectedIndex != 3) {
|
|
- refreshTabBool = YES;
|
|
|
|
[self webViewFirstRequest];
|
|
[self webViewFirstRequest];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1224,7 +1217,6 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
|
|
}
|
|
}
|
|
|
|
|
|
-(void)refreshExpAndMine:(NSNotification *)notificaition{
|
|
-(void)refreshExpAndMine:(NSNotification *)notificaition{
|
|
- refreshTabBool = YES;
|
|
|
|
[self webViewFirstRequest];
|
|
[self webViewFirstRequest];
|
|
}
|
|
}
|
|
|
|
|