Procházet zdrojové kódy

缺陷 侧滑修改

apple před 5 roky
rodič
revize
ad8f1f8263

+ 6 - 6
ios/JianYuIOS/JianYuIOS.xcodeproj/project.pbxproj

@@ -21,6 +21,7 @@
 		1876C3FC219920DE00BC23DE /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1876C3FB219920DE00BC23DE /* ViewController.m */; };
 		187B4EE321EC356100A9368D /* UIView+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = 187B4EE221EC356100A9368D /* UIView+Extension.m */; };
 		187B4EE621EC635700A9368D /* GlobalData.m in Sources */ = {isa = PBXBuildFile; fileRef = 187B4EE521EC635700A9368D /* GlobalData.m */; };
+		187FDF3F24948C2B00037DDE /* layout.css in Resources */ = {isa = PBXBuildFile; fileRef = 187FDF3E24948C2B00037DDE /* layout.css */; };
 		188036FB2193EA09006F9D7B /* JYNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 188036F72193EA08006F9D7B /* JYNavigationController.m */; };
 		188036FC2193EA09006F9D7B /* JYTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 188036F92193EA09006F9D7B /* JYTabBarController.m */; };
 		1880371E2193EB25006F9D7B /* JYSearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 188037162193EB25006F9D7B /* JYSearchViewController.m */; };
@@ -68,7 +69,6 @@
 		18AEC2A82493810100391584 /* course-index.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 18AEC2812493810000391584 /* course-index.jpg */; };
 		18AEC2A92493810100391584 /* fastclick.min.js in Resources */ = {isa = PBXBuildFile; fileRef = 18AEC2822493810000391584 /* fastclick.min.js */; };
 		18AEC2AA2493810100391584 /* mainSearch.png in Resources */ = {isa = PBXBuildFile; fileRef = 18AEC2832493810000391584 /* mainSearch.png */; };
-		18AEC2AB2493810100391584 /* layout.css in Resources */ = {isa = PBXBuildFile; fileRef = 18AEC2842493810000391584 /* layout.css */; };
 		18AEC2AC2493810100391584 /* js.cookie.min.js in Resources */ = {isa = PBXBuildFile; fileRef = 18AEC2852493810000391584 /* js.cookie.min.js */; };
 		18AEC2AD2493810100391584 /* jquery.cookie.js in Resources */ = {isa = PBXBuildFile; fileRef = 18AEC2862493810000391584 /* jquery.cookie.js */; };
 		18AEC2AE2493810100391584 /* moment.min.js in Resources */ = {isa = PBXBuildFile; fileRef = 18AEC2872493810000391584 /* moment.min.js */; };
@@ -160,6 +160,7 @@
 		187B4EE221EC356100A9368D /* UIView+Extension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIView+Extension.m"; sourceTree = "<group>"; };
 		187B4EE421EC635700A9368D /* GlobalData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GlobalData.h; sourceTree = "<group>"; };
 		187B4EE521EC635700A9368D /* GlobalData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GlobalData.m; sourceTree = "<group>"; };
+		187FDF3E24948C2B00037DDE /* layout.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = layout.css; sourceTree = "<group>"; };
 		188036F72193EA08006F9D7B /* JYNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JYNavigationController.m; sourceTree = "<group>"; };
 		188036F82193EA09006F9D7B /* JYTabBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JYTabBarController.h; sourceTree = "<group>"; };
 		188036F92193EA09006F9D7B /* JYTabBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JYTabBarController.m; sourceTree = "<group>"; };
@@ -220,7 +221,6 @@
 		18AEC2812493810000391584 /* course-index.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "course-index.jpg"; sourceTree = "<group>"; };
 		18AEC2822493810000391584 /* fastclick.min.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = fastclick.min.js; sourceTree = "<group>"; };
 		18AEC2832493810000391584 /* mainSearch.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mainSearch.png; sourceTree = "<group>"; };
-		18AEC2842493810000391584 /* layout.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = layout.css; sourceTree = "<group>"; };
 		18AEC2852493810000391584 /* js.cookie.min.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = js.cookie.min.js; sourceTree = "<group>"; };
 		18AEC2862493810000391584 /* jquery.cookie.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jquery.cookie.js; sourceTree = "<group>"; };
 		18AEC2872493810000391584 /* moment.min.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = moment.min.js; sourceTree = "<group>"; };
@@ -382,6 +382,7 @@
 		18AEC2632493810000391584 /* local */ = {
 			isa = PBXGroup;
 			children = (
+				187FDF3E24948C2B00037DDE /* layout.css */,
 				18AEC2642493810000391584 /* dropload.js */,
 				18AEC2652493810000391584 /* template-web.js */,
 				18AEC2662493810000391584 /* weui.min.css */,
@@ -414,7 +415,6 @@
 				18AEC2812493810000391584 /* course-index.jpg */,
 				18AEC2822493810000391584 /* fastclick.min.js */,
 				18AEC2832493810000391584 /* mainSearch.png */,
-				18AEC2842493810000391584 /* layout.css */,
 				18AEC2852493810000391584 /* js.cookie.min.js */,
 				18AEC2862493810000391584 /* jquery.cookie.js */,
 				18AEC2872493810000391584 /* moment.min.js */,
@@ -753,6 +753,7 @@
 				18AEC2992493810100391584 /* sprite-about.png in Resources */,
 				18AEC2952493810100391584 /* clipboard.min.js in Resources */,
 				18AEC2AE2493810100391584 /* moment.min.js in Resources */,
+				187FDF3F24948C2B00037DDE /* layout.css in Resources */,
 				18AEC2A22493810100391584 /* sprite.png in Resources */,
 				18AEC2912493810100391584 /* mobiscroll.min.css in Resources */,
 				18AEC28F2493810100391584 /* vant.min.js in Resources */,
@@ -777,7 +778,6 @@
 				18AEC2AA2493810100391584 /* mainSearch.png in Resources */,
 				C5B194D4202EA46D00F0AC76 /* arrowLeft@2x.png in Resources */,
 				18AEC2972493810100391584 /* 20200604160552006e71984U5.png in Resources */,
-				18AEC2AB2493810100391584 /* layout.css in Resources */,
 				C5BE6E472011D99100F28B36 /* LaunchScreen.storyboard in Resources */,
 				C5BE6E442011D99100F28B36 /* Assets.xcassets in Resources */,
 				C555EC2A2047E57C0084642F /* NoNetView.xib in Resources */,
@@ -1056,7 +1056,7 @@
 				CODE_SIGN_ENTITLEMENTS = JianYuIOS/JianYuIOS.entitlements;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 46;
+				CURRENT_PROJECT_VERSION = 47;
 				DEVELOPMENT_TEAM = 4S438G3ZUL;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -1140,7 +1140,7 @@
 				CODE_SIGN_ENTITLEMENTS = JianYuIOS/JianYuIOS.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 46;
+				CURRENT_PROJECT_VERSION = 47;
 				DEVELOPMENT_TEAM = 4S438G3ZUL;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",

binární
ios/JianYuIOS/JianYuIOS.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate


+ 18 - 0
ios/JianYuIOS/JianYuIOS.xcworkspace/xcuserdata/apple.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -3,4 +3,22 @@
    uuid = "3209AFD3-A9DA-4750-983A-195A695CA827"
    type = "0"
    version = "2.0">
+   <Breakpoints>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "D69C30DA-0081-4E31-BDAE-38B6B17409A3"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "JianYuIOS/Classes&#xff08;&#x6a21;&#x5757;&#xff09;/JYSearchViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "640"
+            endingLineNumber = "640"
+            landmarkName = "-jsLoginSuccess:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+   </Breakpoints>
 </Bucket>

+ 11 - 10
ios/JianYuIOS/JianYuIOS/BaseClass1/JYOldCustom.m

@@ -39,16 +39,17 @@ static NSString* const URLProtocolHandledKey = @"URLProtocolHandledKey";
 }
 
 + (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request {
-    NSMutableURLRequest *mutableReqeust = [request mutableCopy];
-    if ([mutableReqeust.URL host].length == 0) {
-        return mutableReqeust;
-    }
-    NSString *curStr = [mutableReqeust.URL absoluteString];
-    // 替换域名
-    NSString *urlString = [curStr stringByReplacingOccurrencesOfString:@"http://" withString:@"http://"];
-    NSURL *urlll = [NSURL URLWithString:urlString];
-    mutableReqeust.URL = urlll;
-    return mutableReqeust;
+    return request;
+//    NSMutableURLRequest *mutableReqeust = [request mutableCopy];
+//    if ([mutableReqeust.URL host].length == 0) {
+//        return mutableReqeust;
+//    }
+//    NSString *curStr = [mutableReqeust.URL absoluteString];
+//    // 替换域名
+//    NSString *urlString = [curStr stringByReplacingOccurrencesOfString:@"http://" withString:@"http://"];
+//    NSURL *urlll = [NSURL URLWithString:urlString];
+//    mutableReqeust.URL = urlll;
+//    return mutableReqeust;
 }
 - (void)startLoading
 {

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

@@ -135,7 +135,7 @@ _Pragma("clang diagnostic pop")\
 #import "NJKWebViewProgress.h"
 #import "JYNewWebController.h"
 
-//#define kHost @"https://web-jydev-wss.jianyu360.cn/" //王山
+//#define kHost @"http://web-jydev-wss.jianyu360.cn/" //王山
 
 //#define kHost @"https://web-jydev-wcj.jianyu360.cn/"//王传近
 

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

@@ -189,11 +189,10 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
     if (recoginzer.state==UIGestureRecognizerStateBegan) {
         _isMoving = YES;
         startTouch = touchPoint;
-    } else if (recoginzer.state==UIGestureRecognizerStateEnded){
+    } else if (recoginzer.state==UIGestureRecognizerStateEnded||(recoginzer.state==UIGestureRecognizerStatePossible)){
         if (touchPoint.x - startTouch.x > width*0.125) {
             [UIView animateWithDuration:0.3 animations:^{
                 [self moveViewWithX:width];
-//                [GlobalData shareInstance].isSideslip = YES;
                 [self.webView goBack];
             } completion:^(BOOL finished) {
                 _isMoving = NO;
@@ -214,6 +213,8 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
             _isMoving = NO;
         }];
         return;
+    }else {
+        
     }
     if (_isMoving) {
         [self moveViewWithX:touchPoint.x - startTouch.x];

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

@@ -208,13 +208,11 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
     if (recoginzer.state==UIGestureRecognizerStateBegan) {
         _isMoving = YES;
         startTouch = touchPoint;
-    } else if (recoginzer.state==UIGestureRecognizerStateEnded){
+    } else if (recoginzer.state==UIGestureRecognizerStateEnded||(recoginzer.state==UIGestureRecognizerStatePossible)){
         if (touchPoint.x - startTouch.x > width*0.125) {
             [UIView animateWithDuration:0.3 animations:^{
                 [self moveViewWithX:width];
-//                [GlobalData shareInstance].isSideslip = YES;
                 [self.webView goBack];
-            
             } completion:^(BOOL finished) {
                 _isMoving = NO;
                 [self moveViewWithX:0];
@@ -234,6 +232,8 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
             _isMoving = NO;
         }];
         return;
+    }else {
+        
     }
     if (_isMoving) {
         [self moveViewWithX:touchPoint.x - startTouch.x];

+ 5 - 19
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYNewSearchViewController.m

@@ -124,7 +124,6 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
     if ([LXUserDefaults isExistToken]) {
         url = [url stringByAppendingString:[NSString stringWithFormat:@"?sign=%@&url=/jyapp/jylab/mainSearch&from=restart", token]];
     }
-//    url = @"http://web-jydev-zyh.jianyu360.cn/jyapp/jylab/mainSearch";
     NSLog(@"111 :第一次加载:%@",url);
     url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
     
@@ -189,39 +188,24 @@ NSString *const new_AesKey_1 = @"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]) {
+    if (![self.webView canGoBack]||([current_url containsString:@"jyapp/free/login"])) {
         NSLog(@"不可返回");
         return;
     }
-
-    if([current_url containsString:@"jyapp/free/login"]) {
-        return;
-    }
-    
-    //    NSString *current_url = self.webView.request.URL.absoluteString;
     if([current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/free/me",kHost]]||[current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/jylab/index",kHost]]||[current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/swordfish/historypush",kHost]]||[current_url isEqualToString:[NSString stringWithFormat:@"%@jyapp/jylab/mainSearch",kHost]]){
         return;
     }
-    
-    //https://www.jianyu360.com/jyapp/free/me
-    //https://www.jianyu360.com/jyapp/jylab/index
-    //https://www.jianyu360.com/jyapp/wxkeyset/keyset/index
-    //https://www.jianyu360.com/jyapp/jylab/mainSearch
-    
     CGPoint touchPoint = [recoginzer locationInView:[UIApplication sharedApplication].keyWindow];
     if (recoginzer.state==UIGestureRecognizerStateBegan) {
         _isMoving = YES;
         startTouch = touchPoint;
-    } else if (recoginzer.state==UIGestureRecognizerStateEnded){
+    } else if (recoginzer.state==UIGestureRecognizerStateEnded||(recoginzer.state==UIGestureRecognizerStatePossible)){
         if (touchPoint.x - startTouch.x > width*0.125) {
             [UIView animateWithDuration:0.3 animations:^{
                 [self moveViewWithX:width];
-//                [GlobalData shareInstance].isSideslip = YES;
                 [self.webView goBack];
-            
             } completion:^(BOOL finished) {
                 _isMoving = NO;
                 [self moveViewWithX:0];
@@ -241,6 +225,8 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
             _isMoving = NO;
         }];
         return;
+    }else {
+        
     }
     if (_isMoving) {
         [self moveViewWithX:touchPoint.x - startTouch.x];
@@ -463,7 +449,7 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
     
     
     //定时器-检测错误数据是否超过10个  发送
-    [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(errorLogListening) userInfo:nil repeats:YES];
+    [NSTimer scheduledTimerWithTimeInterval:180 target:self selector:@selector(errorLogListening) userInfo:nil repeats:YES];
     //监听底部栏
     [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(bottomOneListening) userInfo:nil repeats:YES];
     

+ 3 - 4
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYNewSubViewController.m

@@ -196,14 +196,11 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
     if (recoginzer.state==UIGestureRecognizerStateBegan) {
         _isMoving = YES;
         startTouch = touchPoint;
-    } else if (recoginzer.state==UIGestureRecognizerStateEnded){
+    } else if (recoginzer.state==UIGestureRecognizerStateEnded||(recoginzer.state==UIGestureRecognizerStatePossible)){
         if (touchPoint.x - startTouch.x > width*0.125) {
             [UIView animateWithDuration:0.3 animations:^{
                 [self moveViewWithX:width];
-//                [GlobalData shareInstance].isSideslip = YES;
                 [self.webView goBack];
-//                [self isExitCallToJS:@"afterClickBack()" withMethodName:@"afterClickBack"];
-                
             } completion:^(BOOL finished) {
                 _isMoving = NO;
                 [self moveViewWithX:0];
@@ -223,6 +220,8 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
             _isMoving = NO;
         }];
         return;
+    }else {
+        
     }
     if (_isMoving) {
         [self moveViewWithX:touchPoint.x - startTouch.x];

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

@@ -95,6 +95,13 @@
 				<key>NSIncludesSubdomains</key>
 				<true/>
 			</dict>
+			<key>res.jianyu360.com</key>
+			<dict>
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
+				<true/>
+				<key>NSIncludesSubdomains</key>
+				<true/>
+			</dict>
 			<key>web-jydev-wky.jianyu360.cn</key>
 			<dict>
 				<key>NSExceptionAllowsInsecureHTTPLoads</key>
@@ -102,6 +109,13 @@
 				<key>NSIncludesSubdomains</key>
 				<true/>
 			</dict>
+			<key>web-jydev-wss.jianyu360.cn</key>
+			<dict>
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
+				<true/>
+				<key>NSIncludesSubdomains</key>
+				<true/>
+			</dict>
 			<key>web-jydev-zxl.jianyu360.cn</key>
 			<dict>
 				<key>NSExceptionAllowsInsecureHTTPLoads</key>

+ 0 - 2
ios/JianYuIOS/JianYuIOS/JYTabBarController.m

@@ -67,9 +67,7 @@
 
 - (void)viewDidLoad {
     [super viewDidLoad];
-    // Do any additional setup after loading the view.
     self.delegate = self;
-//    self.tabBarController.tabBar.delegate = self;
     [self setUpAllChildVc];
     [self setSelectedIndex:0];
     

+ 2 - 0
ios/JianYuIOS/JianYuIOS/local/layout.css

@@ -323,6 +323,8 @@ ul, li, ol {
 .j-header.jy-app-header {
     height: 21.33333vw;
     padding: 10.66667vw 3.2vw 0 3.2vw;
+    font-family: inherit;
+    background: inherit;
 }
 
 .jy-app-header {