|
@@ -68,6 +68,9 @@ JSExportAs(redirectKeyset, -(void)jsRedirectKeyset:(NSString*)str);
|
|
|
NSInteger _time;
|
|
|
|
|
|
BOOL autologin;
|
|
|
+ BOOL notiFinish;
|
|
|
+
|
|
|
+ BOOL expRefreshBool; //实验室 是否刷新
|
|
|
}
|
|
|
|
|
|
|
|
@@ -141,7 +144,6 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
|
|
|
|
|
|
|
|
|
//新增刷新通知
|
|
|
-
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshSS:) name:@"refreshSS" object:nil];
|
|
|
|
|
|
|
|
@@ -149,10 +151,12 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
|
|
|
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+//2.5.1
|
|
|
-(void)timeFireMethod{
|
|
|
_timeTick++;
|
|
|
NSLog(@"定时器");
|
|
|
- if(self.webView) {
|
|
|
+ if(self.webView&¬iFinish) {
|
|
|
NSString * urlStr = [NSString stringWithFormat:@"%@",self.notiDict[@"url"]];
|
|
|
|
|
|
if (urlStr) {
|
|
@@ -289,8 +293,14 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
|
|
|
if (token) {
|
|
|
url = [url stringByAppendingString:[NSString stringWithFormat:@"?sign=%@&url=/jyapp/jylab/mainSearch&from=restart", token]];
|
|
|
}
|
|
|
+ NSLog(@"111第一次加载%@",url);
|
|
|
+
|
|
|
url = [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
|
|
- [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
|
|
|
+
|
|
|
+ kMainQueue(^{
|
|
|
+ [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
|
|
|
+ })
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
@@ -441,10 +451,6 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
|
|
|
tab.selectedIndex = pushIndex;
|
|
|
pushIndex = 0;
|
|
|
}));
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}else {
|
|
|
[self webViewFirstRequest];
|
|
|
}
|
|
@@ -455,6 +461,15 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
|
|
|
// NSString *index = [NSString stringWithFormat:@"%ld",pushIndex];
|
|
|
// [[NSNotificationCenter defaultCenter] postNotificationName:@"changeItems" object:nil userInfo:@{@"item_index":index}];
|
|
|
// pushIndex = 0;
|
|
|
+
|
|
|
+ //刷新 订阅 和 我的
|
|
|
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"refreshAllVC" object:nil userInfo:nil];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //首页跳转登录刷新 我们+订阅
|
|
|
+
|
|
|
}else {
|
|
|
|
|
|
}
|
|
@@ -530,10 +545,14 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
|
|
|
-(void)judgeIsHidden
|
|
|
{
|
|
|
NSString *current_url = [self.webView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
|
|
|
+
|
|
|
+ //[current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/free/index",kHost]]
|
|
|
if([current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/jylab/mainSearch",kHost]]){
|
|
|
+ NSLog(@"展示");
|
|
|
[self showTabBar];
|
|
|
self.webView.frame = CGRectMake(0, -STATUS_BAR_HEIGHT, WIDTH, HEIGHT-TAB_BAR_HEIGHT+STATUS_BAR_HEIGHT);
|
|
|
}else {
|
|
|
+ NSLog(@"隐藏");
|
|
|
[self hideTabBar];
|
|
|
self.webView.frame = CGRectMake(0, -STATUS_BAR_HEIGHT, WIDTH, HEIGHT+STATUS_BAR_HEIGHT);
|
|
|
}
|
|
@@ -544,7 +563,19 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
|
|
|
//捕获js中调用的方法
|
|
|
- (void)webViewDidFinishLoad:(UIWebView *)webView{
|
|
|
|
|
|
- [self judgeIsHidden];//是否隐藏
|
|
|
+ if(!notiFinish) {
|
|
|
+ notiFinish = YES;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(expRefreshBool) {
|
|
|
+ expRefreshBool = NO;
|
|
|
+ }else {
|
|
|
+ //正常的网页加载
|
|
|
+ [self judgeIsHidden];//是否隐藏
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
[self removeNoNetViews];
|
|
|
[[LXViewControllerManager shareViewControllerManager] hideHud];
|
|
|
JSContext *context = [webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
|
|
@@ -1036,6 +1067,8 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
|
|
|
|
|
|
//通知刷新页面
|
|
|
-(void)refreshSS:(NSNotification *)notificaition{
|
|
|
+
|
|
|
+ expRefreshBool = YES;
|
|
|
[self webViewFirstRequest];
|
|
|
}
|
|
|
|