|
@@ -75,6 +75,8 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
|
|
|
@property (nonatomic, assign) BOOL isDownloadFile;
|
|
|
|
|
|
@property (nonatomic, strong) KSNewAlertView *wifiAlert;
|
|
|
+// 是否需要重新加载
|
|
|
+@property (nonatomic, assign) BOOL needReload;
|
|
|
|
|
|
@end
|
|
|
|
|
@@ -136,6 +138,10 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
|
|
|
|
|
|
- (void)viewWillAppear:(BOOL)animated {
|
|
|
[super viewWillAppear:animated];
|
|
|
+ if (self.needReload) {
|
|
|
+ self.needReload = NO;
|
|
|
+ [self.myWebView reload];
|
|
|
+ }
|
|
|
if (_hasChangeSource) {
|
|
|
[self setParmDic:self.parmDic];
|
|
|
}
|
|
@@ -1274,8 +1280,12 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
|
|
|
//当因为某些问题,导致webView进程终止时触发
|
|
|
- (void)webViewWebContentProcessDidTerminate:(WKWebView *)webView {
|
|
|
NSLog(@"%s", __func__);
|
|
|
- [webView reload];
|
|
|
-
|
|
|
+ if (self.navigationController.visibleViewController == self) {
|
|
|
+ [webView reload];
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ self.needReload = YES;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|