apple 6 ani în urmă
părinte
comite
378346e88a

+ 2 - 0
ios/JianYuIOS/JianYuIOS.xcodeproj/project.pbxproj

@@ -76,6 +76,7 @@
 		1880371B2193EB25006F9D7B /* JYSubViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JYSubViewController.m; sourceTree = "<group>"; };
 		1880371C2193EB25006F9D7B /* JYExpViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JYExpViewController.m; sourceTree = "<group>"; };
 		1880371D2193EB25006F9D7B /* JYSearchViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JYSearchViewController.h; sourceTree = "<group>"; };
+		18B2DF4021ACDA5D00B5C93F /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
 		18C9D8E5219A5F9F001AC829 /* UITabBar+badge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UITabBar+badge.h"; sourceTree = "<group>"; };
 		18C9D8E6219A5F9F001AC829 /* UITabBar+badge.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UITabBar+badge.m"; sourceTree = "<group>"; };
 		775098970477D1E68FB48E59 /* Pods-JianYuIOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JianYuIOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-JianYuIOS/Pods-JianYuIOS.debug.xcconfig"; sourceTree = "<group>"; };
@@ -186,6 +187,7 @@
 		954256EB2ECEF2507E4350ED /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
+				18B2DF4021ACDA5D00B5C93F /* WebKit.framework */,
 				C550BF352018591400F0BC2A /* CoreGraphics.framework */,
 				C550BF332018590A00F0BC2A /* libsqlite3.tbd */,
 				0CA962A24EED00910F83394E /* libPods-JianYuIOS.a */,

BIN
ios/JianYuIOS/JianYuIOS.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate


+ 2 - 2
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYExpViewController.m

@@ -109,7 +109,7 @@ NSString *const AesKey_2 = @"mGlAgnIBB8bx2nch";
     [self.view addGestureRecognizer:recognizer];
     //手势
     
-    [self clearWeb];
+//    [self clearWeb];
     
     
     
@@ -447,7 +447,7 @@ NSString *const AesKey_2 = @"mGlAgnIBB8bx2nch";
 
 - (void)didReceiveMemoryWarning {
     [super didReceiveMemoryWarning];
-    [self clearWeb];
+//    [self clearWeb];
     // Dispose of any resources that can be recreated.
 }
 

+ 2 - 2
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYMineViewController.m

@@ -123,7 +123,7 @@ NSString *const AesKey_3 = @"mGlAgnIBB8bx2nch";
     [self.view addGestureRecognizer:recognizer];
     //手势
     
-    [self clearWeb];
+//    [self clearWeb];
     
     
     
@@ -467,7 +467,7 @@ NSString *const AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 - (void)didReceiveMemoryWarning {
     [super didReceiveMemoryWarning];
-    [self clearWeb];
+//    [self clearWeb];
     // Dispose of any resources that can be recreated.
 }
 

+ 8 - 8
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYSearchViewController.m

@@ -131,7 +131,7 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
     [self.view addGestureRecognizer:recognizer];
     //手势
     
-    [self clearWeb];
+//    [self clearWeb];
     
     
     
@@ -197,6 +197,8 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
 #pragma mark – Gesture Recognizer –
 -(void)paningGestureReceive:(UIPanGestureRecognizer *)recoginzer
 {
+    NSString *current_url = [self.webView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
+    NSLog(@"当前页面:%@",current_url);
     CGRect rect = self.view.bounds;
     CGFloat width = CGRectGetWidth(rect);
     if (![self.webView canGoBack]) {
@@ -206,12 +208,6 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
     
     
     
-    
-    
-    NSString *current_url = [self.webView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
-    NSLog(@"当前页面:%@",current_url);
-    
-    
     if([current_url containsString:@"jyapp/free/login"]) {
         return;
     }
@@ -297,6 +293,9 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
     
     url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
     
+    
+    //[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLRequestReloadRevalidatingCacheData timeoutInterval:20]];
+    
     kMainQueue(^{
         [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
     })
@@ -665,7 +664,7 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
 
 - (void)didReceiveMemoryWarning {
     [super didReceiveMemoryWarning];
-    [self clearWeb];
+//    [self clearWeb];
     // Dispose of any resources that can be recreated.
 }
 
@@ -674,6 +673,7 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
     [cache removeAllCachedResponses];
     [cache setDiskCapacity:0];
     [cache setMemoryCapacity:0];
+    
 }
 
 -(void)addNoNetViews{

+ 1 - 1
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYSubViewController.m

@@ -441,7 +441,7 @@ NSString *const AesKey_1 = @"mGlAgnIBB8bx2nch";
 
 - (void)didReceiveMemoryWarning {
     [super didReceiveMemoryWarning];
-    [self clearWeb];
+//    [self clearWeb];
     // Dispose of any resources that can be recreated.
 }
 

+ 14 - 4
ios/JianYuIOS/JianYuIOS/Info.plist

@@ -79,10 +79,6 @@
 		<true/>
 		<key>NSExceptionDomains</key>
 		<dict>
-			<key>NSExceptionAllowsInsecureHTTPLoads</key>
-			<true/>
-			<key>NSIncludesSubdomains</key>
-			<true/>
 			<key>w2blmjy.qmx.top</key>
 			<dict>
 				<key>NSExceptionAllowsInsecureHTTPLoads</key>
@@ -97,6 +93,20 @@
 				<key>NSIncludesSubdomains</key>
 				<true/>
 			</dict>
+			<key>jianyu360.mikecrm.com</key>
+			<dict>
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
+				<true/>
+				<key>NSIncludesSubdomains</key>
+				<true/>
+			</dict>
+			<key>app1.jianyu360.com</key>
+			<dict>
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
+				<true/>
+				<key>NSIncludesSubdomains</key>
+				<true/>
+			</dict>
 		</dict>
 	</dict>
 	<key>UIBackgroundModes</key>

+ 3 - 0
ios/JianYuIOS/JianYuIOS/ViewController.m

@@ -461,6 +461,9 @@ NSString *const AesKey = @"mGlAgnIBB8bx2nch";
     [super didReceiveMemoryWarning];
     [self clearWeb];
     // Dispose of any resources that can be recreated.
+    
+    //当前页面:http://jianyu360.mikecrm.com/9Li9dpM
+    //https://mp.weixin.qq.com/s/jomQtxcanA-Nszgy1ubuhA
 }
 
 -(void)clearWeb{