Browse Source

ios备份

apple 5 years ago
parent
commit
9ac57d4729

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


+ 2 - 2
ios/JianYuIOS/JianYuIOS/BaseClass1/PrefixHeader.pch

@@ -164,11 +164,11 @@ _Pragma("clang diagnostic pop")\
 
 //#define kHost @"http://web-jydev-wky.jianyu360.cn/" //王凯悦
 
-#define kHost @"http://web-jydev-zxl.jianyu360.cn/" //张鑫磊
+//#define kHost @"http://web-jydev-zxl.jianyu360.cn/" //张鑫磊
 
 //#define kHost @"http://web-jydev-xzh.jianyu360.cn/" //徐志恒
 
-//#define kHost @"http://app2-jytest.jianyu360.cn/"  //测试http
+#define kHost @"http://app2-jytest.jianyu360.cn/"  //测试http
 
 //#define kHost @"http://app-i1.jianyu360.com/"   //新正式
 

+ 11 - 10
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYNewExpViewController.m

@@ -23,6 +23,7 @@
 @property(nonatomic, strong)NoNetView *noNetView;
 @property(nonatomic, strong)ZKClipboardView *clipboardView;
 @property(nonatomic, strong)ZKFaceVerifyMsgView *verifyMsgView;
+@property(nonatomic, strong)UIPanGestureRecognizer *recognizer;
 
 @end
 
@@ -150,6 +151,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
         self.progressView.alpha = 1.0f;
         [self.progressView setProgress:newprogress animated:YES];
         if (newprogress >= 1.0f) {
+            self.recognizer.enabled = YES;
             [UIView animateWithDuration:0.3f
                                   delay:0.3f
                                 options:UIViewAnimationOptionCurveEaseOut
@@ -226,12 +228,10 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
     } else if (recoginzer.state==UIGestureRecognizerStateEnded||(recoginzer.state==UIGestureRecognizerStatePossible)){
         if (touchPoint.x - startTouch.x > width*0.125) {
             [UIView animateWithDuration:0.3 animations:^{
-                [self moveViewWithX:width];
-//                [self.webView goBack];
-                
-                NSString *jsName = @"window.history.back()";
-                [self executeCallJS:jsName];
-                
+                if (recoginzer.state==UIGestureRecognizerStateEnded) {
+                    [self moveViewWithX:width];
+                    [self.webView goBack];
+                }
             } completion:^(BOOL finished) {
                 _isMoving = NO;
                 [self moveViewWithX:0];
@@ -445,9 +445,9 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
     [[AFNetworkReachabilityManager sharedManager] startMonitoring];
     [self initNotification];
     
-    UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(paningGestureReceive:)];
-    [recognizer delaysTouchesBegan];
-    [self.view addGestureRecognizer:recognizer];
+    self.recognizer = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(paningGestureReceive:)];
+    [self.recognizer delaysTouchesBegan];
+    [self.view addGestureRecognizer:self.recognizer];
     
     //监听底部栏
     [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(bottomThreeListening) userInfo:nil repeats:YES];
@@ -487,7 +487,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 // 页面开始加载时调用
 - (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation{
-    
+    self.recognizer.enabled = NO;
 }
 // 当内容开始返回时调用
 - (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation{
@@ -495,6 +495,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 // 页面加载失败时调用
 - (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(nonnull NSError *)error{
+    self.recognizer.enabled = YES;
     [[GlobalData shareInstance] addOnePlistData:@{
         @"detail":[[self stringByEvaluatingJavaScriptFromString:@"document.location.href"] stringByAppendingString:[NSString stringWithFormat:@"\n%@",[error description]]],
         @"reqTime":[NSNumber numberWithInt:0],

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

@@ -223,7 +223,6 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 -(void)paningGestureReceive:(UIPanGestureRecognizer *)recoginzer
 {
     NSString *current_url = [self stringByEvaluatingJavaScriptFromString:@"document.location.href"];
-//    NSLog(@"当前页面:%@",current_url);
     CGRect rect = self.view.bounds;
     CGFloat width = CGRectGetWidth(rect);
     if (![self.webView canGoBack]||[current_url containsString:@"jyapp/free/login"]) {
@@ -241,13 +240,10 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
     } else if (recoginzer.state==UIGestureRecognizerStateEnded||(recoginzer.state==UIGestureRecognizerStatePossible)){
         if (touchPoint.x - startTouch.x > width*0.125) {
             [UIView animateWithDuration:0.3 animations:^{
-                [self moveViewWithX:width];
-//                [self.webView goBack];
-                
-                
-                NSString *jsName = @"window.history.back()";
-                [self executeCallJS:jsName];
-                
+                if (recoginzer.state==UIGestureRecognizerStateEnded) {
+                    [self moveViewWithX:width];
+                    [self.webView goBack];
+                }
             } completion:^(BOOL finished) {
                 _isMoving = NO;
                 [self moveViewWithX:0];

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

@@ -249,15 +249,13 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
     } else if (recoginzer.state==UIGestureRecognizerStateEnded||(recoginzer.state==UIGestureRecognizerStatePossible)){
         if (touchPoint.x - startTouch.x > width*0.125) {
             [UIView animateWithDuration:0.3 animations:^{
-                [self moveViewWithX:width];
-                if ([current_url containsString:@"jyapp/jylab/mainSearch#"]) {
-                    [self isExitCallToJS:@"afterClickBack()" withMethodName:@"afterClickBack"];
+                if (recoginzer.state==UIGestureRecognizerStateEnded) {
+                    [self moveViewWithX:width];
+                    if ([current_url containsString:@"jyapp/jylab/mainSearch#"]) {
+                        [self isExitCallToJS:@"afterClickBack()" withMethodName:@"afterClickBack"];
+                    }
+                    [self.webView goBack];
                 }
-//                [self.webView goBack];
-                
-                NSString *jsName = @"window.history.back()";
-                [self executeCallJS:jsName];
-                
             } completion:^(BOOL finished) {
                 _isMoving = NO;
                 [self moveViewWithX:0];

+ 11 - 9
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYNewSubViewController.m

@@ -23,6 +23,7 @@
 @property(nonatomic, strong)NoNetView *noNetView;
 @property(nonatomic, strong)ZKClipboardView *clipboardView;
 @property(nonatomic, strong)ZKFaceVerifyMsgView *verifyMsgView;
+@property(nonatomic, strong)UIPanGestureRecognizer *recognizer;
 
 @end
 
@@ -159,6 +160,7 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
         self.progressView.alpha = 1.0f;
         [self.progressView setProgress:newprogress animated:YES];
         if (newprogress >= 1.0f) {
+            self.recognizer.enabled = YES;
             [UIView animateWithDuration:0.3f
                                   delay:0.3f
                                 options:UIViewAnimationOptionCurveEaseOut
@@ -231,11 +233,10 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
     } else if (recoginzer.state==UIGestureRecognizerStateEnded||(recoginzer.state==UIGestureRecognizerStatePossible)){
         if (touchPoint.x - startTouch.x > width*0.125) {
             [UIView animateWithDuration:0.3 animations:^{
-                [self moveViewWithX:width];
-//                [self.webView goBack];
-                NSString *jsName = @"window.history.back()";
-                [self executeCallJS:jsName];
-                
+                if (recoginzer.state==UIGestureRecognizerStateEnded) {
+                    [self moveViewWithX:width];
+                    [self.webView goBack];
+                }
             } completion:^(BOOL finished) {
                 _isMoving = NO;
                 [self moveViewWithX:0];
@@ -448,9 +449,9 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
     [[AFNetworkReachabilityManager sharedManager] startMonitoring];
     [self initNotification];
     
-    UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(paningGestureReceive:)];
-    [recognizer delaysTouchesBegan];
-    [self.view addGestureRecognizer:recognizer];
+    self.recognizer = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(paningGestureReceive:)];
+    [self.recognizer delaysTouchesBegan];
+    [self.view addGestureRecognizer:self.recognizer];
     
     //监听底部栏
     [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(bottomTwoListening) userInfo:nil repeats:YES];
@@ -495,7 +496,7 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
 
 // 页面开始加载时调用
 - (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation{
-    
+    self.recognizer.enabled = NO;
 }
 // 当内容开始返回时调用
 - (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation{
@@ -503,6 +504,7 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
 
 // 页面加载失败时调用
 - (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(nonnull NSError *)error{
+    self.recognizer.enabled = YES;
     [[GlobalData shareInstance] addOnePlistData:@{
         @"detail":[[self stringByEvaluatingJavaScriptFromString:@"document.location.href"] stringByAppendingString:[NSString stringWithFormat:@"\n%@",[error description]]],
         @"reqTime":[NSNumber numberWithInt:0],