apple 4 years ago
parent
commit
303e7069ef

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


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

@@ -26,27 +26,11 @@
             filePath = "JianYuIOS/Classes(模块)/JYNewExpViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "708"
-            endingLineNumber = "708"
+            startingLineNumber = "725"
+            endingLineNumber = "725"
             landmarkName = "-jsLoginSuccess:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "CDDBA5A5-F748-4AA4-9BC8-FDE55A0CE13B"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "JianYuIOS/AppDelegate.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "221"
-            endingLineNumber = "221"
-            landmarkName = "-applicationDidBecomeActive:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

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

@@ -89,7 +89,7 @@ _Pragma("clang diagnostic pop")\
 #define kReloadWebVIew @"kReloadWebVIew"
 #define kLoginOut @"kLoginOut"
 #define kNewsTable @"kNewsTable"
-
+#define PopWebView @"popWebView"
 
 
 

+ 55 - 6
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYNewExpViewController.m

@@ -15,12 +15,14 @@
 {
     CGPoint startTouch;
     BOOL _isMoving;
+    BOOL isExistNoNewWork;
 }
 
 @property (nonatomic, strong) UIProgressView *progressView;
 @property (nonatomic, strong) WKWebView *webView;
 @property(nonatomic, assign)BOOL updateNotify;
 @property(nonatomic, strong)NoNetView *noNetView;
+@property(nonatomic, strong)NoNetView *failNetView;
 @property(nonatomic, strong)ZKClipboardView *clipboardView;
 @property(nonatomic, strong)ZKFaceVerifyMsgView *verifyMsgView;
 @property(nonatomic, strong)UIPanGestureRecognizer *recognizer;
@@ -183,6 +185,9 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateNotifyState) name:kUpdateNotifyState object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(afterReceiveNewMsg) name:kAfterReceiveNewMsg object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadWebView) name:kReloadWebVIew object:nil];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(popWebView) name:PopWebView object:nil];
+    
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginOut:) name:kLoginOut object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(netReachChanged:) name:AFNetworkingReachabilityDidChangeNotification object:nil];
   
@@ -495,6 +500,18 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 // 页面加载失败时调用
 - (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(nonnull NSError *)error{
+    
+    //加载失败  有网络-弹出页面 ,  无网络-记录标记
+    if ([ZKMethod judegeNetworkIsAvailable]) {
+        //弹出页面
+        NSLog(@"页面加载失败-有网络");
+        [self addFailNetViews];
+    }else {
+        //记录标记
+        NSLog(@"页面加载失败-无网络");
+        isExistNoNewWork = YES;
+    }
+    
     self.recognizer.enabled = YES;
     [[GlobalData shareInstance] addOnePlistData:@{
         @"detail":[[self stringByEvaluatingJavaScriptFromString:@"document.location.href"] stringByAppendingString:[NSString stringWithFormat:@"\n%@",[error description]]],
@@ -1072,10 +1089,6 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
     [[SKPaymentQueue defaultQueue] addPayment:payment];
 }
 
-// web是否可退回上页面
--(int)jsIsCanBack:(NSString *)str{
-    return self.webView.canGoBack ? 1:0;
-}
 
 #pragma mark   *****其他方法
 -(void)judgeIsHiddenBottom {
@@ -1359,7 +1372,27 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
     }
 }
 
+-(void)addFailNetViews{
+    kMainQueue(^{
+        [self removeFailNetViews];
+        self.failNetView = [NoNetView shareView];
+        if(self.tabBarController.selectedIndex == 0) {
+            if ([self.webView canGoBack]) {
+                self.failNetView.popBtn.hidden = NO;
+            }else{
+                self.failNetView.popBtn.hidden = YES;
+            }
+        }
+        [self.view addSubview:self.failNetView];
+    });
+}
 
+-(void)removeFailNetViews{
+    if (self.failNetView ) {
+        [self.failNetView removeFromSuperview];
+        self.failNetView  = nil;
+    }
+}
 
 
 
@@ -1460,8 +1493,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
 // 再次加载页面
 -(void)reloadWebView{
     if(self.tabBarController.selectedIndex == 2) {
-        [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-        if (!self.webView.canGoBack) {
+        if (![self.webView canGoBack]) {
             [self webViewFirstRequest];
         }else{
             [self.webView reload];
@@ -1469,6 +1501,19 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
     }
     
 }
+
+
+// 返回上一页面- 防止
+-(void)popWebView{
+    if(self.tabBarController.selectedIndex == 2) {
+        if ([self.webView canGoBack]) {
+            [self.webView goBack];
+        }
+        [self removeNoNetViews];
+        [self removeFailNetViews];
+    }
+}
+
 // 收到退出登录消息
 -(void)loginOut:(NSNotification *)notification{
     if([notification.userInfo[@"item_index"] integerValue]!=2) {
@@ -1491,6 +1536,10 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
         [self addNoNetViews];
     }else{
         [self removeNoNetViews];
+        if (isExistNoNewWork) {
+            isExistNoNewWork = NO;
+            [self reloadWebView];
+        }
     }
 }
 

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

@@ -25,12 +25,14 @@
 {
     CGPoint startTouch;
     BOOL _isMoving;
+    BOOL isExistNoNewWork;
 }
 
 @property (nonatomic, strong) UIProgressView *progressView;
 @property (nonatomic, strong) WKWebView *webView;
 @property(nonatomic, assign)BOOL updateNotify;
 @property(nonatomic, strong)NoNetView *noNetView;
+@property(nonatomic, strong)NoNetView *failNetView;
 @property(nonatomic, strong)UIPanGestureRecognizer *recognizer;
 @property(nonatomic, strong)ZKClipboardView *clipboardView;
 @property(nonatomic, strong)ZKFaceVerifyMsgView *verifyMsgView;
@@ -198,6 +200,9 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateNotifyState) name:kUpdateNotifyState object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(afterReceiveNewMsg) name:kAfterReceiveNewMsg object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadWebView) name:kReloadWebVIew object:nil];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(popWebView) name:PopWebView object:nil];
+    
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginOut:) name:kLoginOut object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(netReachChanged:) name:AFNetworkingReachabilityDidChangeNotification object:nil];
   
@@ -510,6 +515,18 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 
 // 页面加载失败时调用
 - (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(nonnull NSError *)error{
+    
+    //加载失败  有网络-弹出页面 ,  无网络-记录标记
+    if ([ZKMethod judegeNetworkIsAvailable]) {
+        //弹出页面
+        NSLog(@"页面加载失败-有网络");
+        [self addFailNetViews];
+    }else {
+        //记录标记
+        NSLog(@"页面加载失败-无网络");
+        isExistNoNewWork = YES;
+    }
+    
     self.recognizer.enabled = YES;
     [[GlobalData shareInstance] addOnePlistData:@{
         @"detail":[[self stringByEvaluatingJavaScriptFromString:@"document.location.href"] stringByAppendingString:[NSString stringWithFormat:@"\n%@",[error description]]],
@@ -1098,14 +1115,6 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
     [[SKPaymentQueue defaultQueue] addPayment:payment];
 }
 
-// web是否可退回上页面
--(int)jsIsCanBack:(NSString *)str{
-    return self.webView.canGoBack ? 1:0;
-}
-
-
-
-
 
 #pragma mark   *****其他方法
 -(void)judgeIsHiddenBottom {
@@ -1389,7 +1398,27 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 }
 
 
+-(void)addFailNetViews{
+    kMainQueue(^{
+        [self removeFailNetViews];
+        self.failNetView = [NoNetView shareView];
+        if(self.tabBarController.selectedIndex == 0) {
+            if ([self.webView canGoBack]) {
+                self.failNetView.popBtn.hidden = NO;
+            }else{
+                self.failNetView.popBtn.hidden = YES;
+            }
+        }
+        [self.view addSubview:self.failNetView];
+    });
+}
 
+-(void)removeFailNetViews{
+    if (self.failNetView ) {
+        [self.failNetView removeFromSuperview];
+        self.failNetView  = nil;
+    }
+}
 
 
 
@@ -1492,14 +1521,25 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
 // 再次加载页面
 -(void)reloadWebView{
     if(self.tabBarController.selectedIndex == 3) {
-        [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-        if (!self.webView.canGoBack) {
+        if (![self.webView canGoBack]) {
             [self webViewFirstRequest];
         }else{
             [self.webView reload];
         }
     }
 }
+
+// 返回上一页面- 防止
+-(void)popWebView{
+    if(self.tabBarController.selectedIndex == 3) {
+        if ([self.webView canGoBack]) {
+            [self.webView goBack];
+        }
+        [self removeNoNetViews];
+        [self removeFailNetViews];
+    }
+}
+
 // 收到退出登录消息
 -(void)loginOut:(NSNotification *)notification{
     if([notification.userInfo[@"item_index"] integerValue]!=3) {
@@ -1522,6 +1562,10 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
         [self addNoNetViews];
     }else{
         [self removeNoNetViews];
+        if (isExistNoNewWork) {
+            isExistNoNewWork = NO;
+            [self reloadWebView];
+        }
     }
 }
 

+ 37 - 17
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYNewSearchViewController.m

@@ -213,6 +213,9 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateNotifyState) name:kUpdateNotifyState object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(afterReceiveNewMsg) name:kAfterReceiveNewMsg object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadWebView) name:kReloadWebVIew object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(popWebView) name:PopWebView object:nil];
+    
+    
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginOut:) name:kLoginOut object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(netReachChanged:) name:AFNetworkingReachabilityDidChangeNotification object:nil];
     
@@ -777,13 +780,15 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
 // 页面加载失败时调用
 - (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(nonnull NSError *)error{
     
-    NSLog(@"页面加载失败");
+    
     //加载失败  有网络-弹出页面 ,  无网络-记录标记
-    if ([ZKMethod judgmentNetwork]) {
+    if ([ZKMethod judegeNetworkIsAvailable]) {
         //弹出页面
-        [self addNoNetViews];
+        NSLog(@"页面加载失败-有网络");
+        [self addFailNetViews];
     }else {
         //记录标记
+        NSLog(@"页面加载失败-无网络");
         isExistNoNewWork = YES;
     }
     
@@ -1477,14 +1482,6 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
 
 
 
-
-
-// web是否可退回上页面
--(int)jsIsCanBack:(NSString *)str{
-    return self.webView.canGoBack ? 1:0;
-}
-
-
 #pragma mark   *****其他方法
 -(void)judgeIsHiddenBottom {
     if(self.tabBarController.selectedIndex == 0) {
@@ -1861,6 +1858,14 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
     kMainQueue(^{
         [self removeNoNetViews];
         self.noNetView = [NoNetView shareView];
+        if(self.tabBarController.selectedIndex == 0) {
+            if ([self.webView canGoBack]) {
+                self.noNetView.popBtn.hidden = NO;
+            }else{
+                self.noNetView.popBtn.hidden = YES;
+            }
+        }
+    
         [self.view addSubview:self.noNetView];
     });
 }
@@ -1875,8 +1880,15 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
 
 -(void)addFailNetViews{
     kMainQueue(^{
-        [self removeNoNetViews];
+        [self removeFailNetViews];
         self.failNetView = [NoNetView shareView];
+        if(self.tabBarController.selectedIndex == 0) {
+            if ([self.webView canGoBack]) {
+                self.failNetView.popBtn.hidden = NO;
+            }else{
+                self.failNetView.popBtn.hidden = YES;
+            }
+        }
         [self.view addSubview:self.failNetView];
     });
 }
@@ -1987,13 +1999,24 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
 // 再次加载页面
 -(void)reloadWebView{
     if(self.tabBarController.selectedIndex == 0) {
-        if (!self.webView.canGoBack) {
+        if (![self.webView canGoBack]) {
             [self webViewFirstRequest];
         }else{
             [self.webView reload];
         }
     }
 }
+// 返回上一页面- 防止
+-(void)popWebView{
+    if(self.tabBarController.selectedIndex == 0) {
+        if ([self.webView canGoBack]) {
+            [self.webView goBack];
+        }
+        [self removeNoNetViews];
+        [self removeFailNetViews];
+    }
+}
+
 // 收到退出登录消息
 -(void)loginOut:(NSNotification *)notification{
     if([notification.userInfo[@"item_index"] integerValue]!=0) {
@@ -2013,15 +2036,12 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
 -(void)netReachChanged:(NSNotification *)notificaition{
     NSDictionary *userInfo = notificaition.userInfo;
     if ([userInfo[@"AFNetworkingReachabilityNotificationStatusItem"] intValue] == 0 || [userInfo[@"AFNetworkingReachabilityNotificationStatusItem"] intValue] == -1) {
-        NSLog(@"针对首页-监听无网络");
         [self addNoNetViews];
     }else{
-        NSLog(@"针对首页-监听有网络");
         [self removeNoNetViews];
         if (isExistNoNewWork) {
-            NSLog(@"标记清数据");
             isExistNoNewWork = NO;
-            [self webViewFirstRequest];
+            [self reloadWebView];
         }
     }
 }

+ 57 - 7
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYNewSubViewController.m

@@ -15,12 +15,14 @@
 {
     CGPoint startTouch;
     BOOL _isMoving;
+    BOOL isExistNoNewWork;
 }
 
 @property (nonatomic, strong) UIProgressView *progressView;
 @property (nonatomic, strong) WKWebView *webView;
 @property(nonatomic, assign)BOOL updateNotify;
 @property(nonatomic, strong)NoNetView *noNetView;
+@property(nonatomic, strong)NoNetView *failNetView;
 @property(nonatomic, strong)ZKClipboardView *clipboardView;
 @property(nonatomic, strong)ZKFaceVerifyMsgView *verifyMsgView;
 @property(nonatomic, strong)UIPanGestureRecognizer *recognizer;
@@ -192,6 +194,9 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateNotifyState) name:kUpdateNotifyState object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(afterReceiveNewMsg) name:kAfterReceiveNewMsg object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadWebView) name:kReloadWebVIew object:nil];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(popWebView) name:PopWebView object:nil];
+    
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginOut:) name:kLoginOut object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(netReachChanged:) name:AFNetworkingReachabilityDidChangeNotification object:nil];
   
@@ -502,6 +507,19 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
 
 // 页面加载失败时调用
 - (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(nonnull NSError *)error{
+    
+    
+    //加载失败  有网络-弹出页面 ,  无网络-记录标记
+    if ([ZKMethod judegeNetworkIsAvailable]) {
+        //弹出页面
+        NSLog(@"页面加载失败-有网络");
+        [self addFailNetViews];
+    }else {
+        //记录标记
+        NSLog(@"页面加载失败-无网络");
+        isExistNoNewWork = YES;
+    }
+    
     self.recognizer.enabled = YES;
     [[GlobalData shareInstance] addOnePlistData:@{
         @"detail":[[self stringByEvaluatingJavaScriptFromString:@"document.location.href"] stringByAppendingString:[NSString stringWithFormat:@"\n%@",[error description]]],
@@ -1089,11 +1107,6 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
 
 
 
-// web是否可退回上页面
--(int)jsIsCanBack:(NSString *)str{
-    return self.webView.canGoBack ? 1:0;
-}
-
 
 
 #pragma mark   *****其他方法
@@ -1365,6 +1378,27 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
 }
 
 
+-(void)addFailNetViews{
+    kMainQueue(^{
+        [self removeFailNetViews];
+        self.failNetView = [NoNetView shareView];
+        if(self.tabBarController.selectedIndex == 0) {
+            if ([self.webView canGoBack]) {
+                self.failNetView.popBtn.hidden = NO;
+            }else{
+                self.failNetView.popBtn.hidden = YES;
+            }
+        }
+        [self.view addSubview:self.failNetView];
+    });
+}
+
+-(void)removeFailNetViews{
+    if (self.failNetView ) {
+        [self.failNetView removeFromSuperview];
+        self.failNetView  = nil;
+    }
+}
 
 
 
@@ -1463,14 +1497,26 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
 // 再次加载页面
 -(void)reloadWebView{
     if(self.tabBarController.selectedIndex == 1) {
-        [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-        if (!self.webView.canGoBack) {
+        if (![self.webView canGoBack]) {
             [self webViewFirstRequest];
         }else{
             [self.webView reload];
         }
     }
 }
+
+// 返回上一页面- 防止
+-(void)popWebView{
+    if(self.tabBarController.selectedIndex == 1) {
+        if ([self.webView canGoBack]) {
+            [self.webView goBack];
+        }
+        [self removeNoNetViews];
+        [self removeFailNetViews];
+    }
+}
+
+
 // 收到退出登录消息
 -(void)loginOut:(NSNotification *)notification{
     if([notification.userInfo[@"item_index"] integerValue]!=1) {
@@ -1493,6 +1539,10 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
         [self addNoNetViews];
     }else{
         [self removeNoNetViews];
+        if (isExistNoNewWork) {
+            isExistNoNewWork = NO;
+            [self reloadWebView];
+        }
     }
 }
 

+ 1 - 0
ios/JianYuIOS/JianYuIOS/CustomView/NoNetView.h

@@ -10,6 +10,7 @@
 
 @interface NoNetView : UIView
 
+@property (weak, nonatomic) IBOutlet UIButton *popBtn;
 
 +(instancetype)shareView;
 

+ 5 - 0
ios/JianYuIOS/JianYuIOS/CustomView/NoNetView.m

@@ -11,11 +11,16 @@
 @implementation NoNetView
 
 
+
 +(instancetype)shareView{
     NoNetView *view = [[[NSBundle mainBundle] loadNibNamed:@"NoNetView" owner:nil options:nil] lastObject];
     view.frame = [UIScreen mainScreen].bounds;
     return view;
 }
+- (IBAction)popClick:(id)sender {
+    
+    [[NSNotificationCenter defaultCenter] postNotificationName:PopWebView object:nil];
+}
 - (IBAction)click1:(id)sender {
     [[NSNotificationCenter defaultCenter] postNotificationName:kReloadWebVIew object:nil];
 }

+ 28 - 8
ios/JianYuIOS/JianYuIOS/CustomView/NoNetView.xib

@@ -1,12 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
-    <device id="retina4_7" orientation="portrait">
-        <adaptation id="fullscreen"/>
-    </device>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina4_7" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
-        <capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17126"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -35,7 +32,7 @@
                             <color key="textColor" red="0.1137254902" green="0.1137254902" blue="0.1137254902" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
-                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2QV-54-u0k">
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2QV-54-u0k">
                             <rect key="frame" x="71.5" y="241" width="140" height="42"/>
                             <color key="backgroundColor" red="0.17254901959999999" green="0.71764705880000002" blue="0.79607843140000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <constraints>
@@ -67,18 +64,41 @@
                         <constraint firstItem="W56-Wm-H3y" firstAttribute="top" secondItem="bN2-JA-Ssh" secondAttribute="top" id="gLJ-7o-ysh"/>
                     </constraints>
                 </view>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bHO-yc-ATu">
+                    <rect key="frame" x="0.0" y="20" width="55" height="55"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="55" id="8jY-df-aiy"/>
+                        <constraint firstAttribute="width" constant="55" id="an4-eP-Iny"/>
+                    </constraints>
+                    <state key="normal" image="arrowLeft.png">
+                        <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    </state>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="boolean" keyPath="clipsToBounds" value="YES"/>
+                        <userDefinedRuntimeAttribute type="string" keyPath="layer.cornerRadius" value="3"/>
+                    </userDefinedRuntimeAttributes>
+                    <connections>
+                        <action selector="popClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="uk8-AR-jEK"/>
+                    </connections>
+                </button>
             </subviews>
             <color key="backgroundColor" red="0.96078431369999995" green="0.96078431369999995" blue="0.97647058819999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
             <constraints>
+                <constraint firstItem="bHO-yc-ATu" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="20" id="1Ly-eJ-bmv"/>
                 <constraint firstItem="bN2-JA-Ssh" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="7dB-g1-61f"/>
+                <constraint firstItem="bHO-yc-ATu" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="UYz-vJ-D3W"/>
                 <constraint firstItem="bN2-JA-Ssh" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="gae-IL-Cgb"/>
             </constraints>
             <nil key="simulatedStatusBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
-            <point key="canvasLocation" x="55" y="54.5"/>
+            <connections>
+                <outlet property="popBtn" destination="bHO-yc-ATu" id="LvZ-F0-kT7"/>
+            </connections>
+            <point key="canvasLocation" x="54.399999999999999" y="54.422788605697157"/>
         </view>
     </objects>
     <resources>
+        <image name="arrowLeft.png" width="10.5" height="19"/>
         <image name="noNet.png" width="147" height="147"/>
     </resources>
 </document>

+ 2 - 2
ios/JianYuIOS/JianYuIOS/guide/ZKMethod.h

@@ -37,8 +37,8 @@ typedef NS_ENUM(NSInteger, BoundsType){
 //改变label行间距
 +(NSAttributedString *)getAttributedStringWithString:(NSString *)string lineSpace:(CGFloat)lineSpace with:(BoundsType)type;
 
-+(BOOL)judgmentNetwork;
-
++(BOOL)judegeNetworkIsAvailable;
++(BOOL)isNetworkReachable;
 
 +(CGSize)getSize:(UILabel *)desLabel;
 //渐变色

+ 30 - 3
ios/JianYuIOS/JianYuIOS/guide/ZKMethod.m

@@ -61,9 +61,8 @@
     return attributedString;
 }
 
-
-+(BOOL)judgmentNetwork
-{
+//是否可用
++(BOOL)judegeNetworkIsAvailable {
     BOOL reachable;
     reachable = [[Reachability reachabilityForInternetConnection] isReachable];
     return reachable;
@@ -71,6 +70,34 @@
 
 
 
++(BOOL)isNetworkReachable
+{
+    BOOL isReachable = NO;
+    Reachability *reachability = [Reachability reachabilityWithHostname:@"www.baidu.com"];
+    switch ([reachability currentReachabilityStatus]) {
+        case NotReachable:{
+            isReachable = NO;
+        }
+            break;
+        case ReachableViaWWAN:{
+            isReachable = YES;
+        }
+            break;
+        case ReachableViaWiFi:{
+            isReachable = YES;
+        }
+            break;
+        default:
+            isReachable = NO;
+            break;
+    }
+    return isReachable;
+}
+
+
+
+
+
 + (UIViewController *)getCurrentVC
 {
     UIViewController *result = nil;