|
@@ -197,19 +197,8 @@ NSString *const AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
|
// 首次加载web
|
|
|
-(void)webViewFirstRequest{
|
|
|
|
|
|
- NSString *current_url = [self.webView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
|
|
|
- if([current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/free/me",kHost]]){
|
|
|
- self.tabBarController.tabBar.hidden = NO;
|
|
|
- }else {
|
|
|
- self.tabBarController.tabBar.hidden = YES;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/wxkeyset/keyset/index"];
|
|
|
-// NSString *token = [LXUserDefaults token];
|
|
|
-// if (token) {
|
|
|
-// url = [url stringByAppendingString:[NSString stringWithFormat:@"?sign=%@&url=/jyapp/jylab/mainSearch&from=restart", token]];
|
|
|
-// }
|
|
|
+
|
|
|
url = [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
|
|
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
|
|
|
|
|
@@ -321,12 +310,8 @@ NSString *const AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
|
|
|
|
|
|
|
|
|
|
-#pragma mark 捕获js中调用的方法
|
|
|
-
|
|
|
-//捕获js中调用的方法
|
|
|
-- (void)webViewDidFinishLoad:(UIWebView *)webView{
|
|
|
-
|
|
|
-
|
|
|
+-(void)judgeIsHidden
|
|
|
+{
|
|
|
NSString *current_url = [self.webView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
|
|
|
if([current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/wxkeyset/keyset/index",kHost]]){
|
|
|
[self showTabBar];
|
|
@@ -335,6 +320,14 @@ NSString *const AesKey_1 = @"mGlAgnIBB8bx2nch";
|
|
|
[self hideTabBar];
|
|
|
self.webView.frame = CGRectMake(0, -STATUS_BAR_HEIGHT, WIDTH, HEIGHT+STATUS_BAR_HEIGHT);
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+#pragma mark 捕获js中调用的方法
|
|
|
+
|
|
|
+//捕获js中调用的方法
|
|
|
+- (void)webViewDidFinishLoad:(UIWebView *)webView{
|
|
|
+
|
|
|
+ [self judgeIsHidden];
|
|
|
|
|
|
|
|
|
|