Steven hai 6 meses
pai
achega
7882d83a73

+ 12 - 2
KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSBaseWKWebViewController.m

@@ -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;
+    }
 }
 
 /**

+ 3 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/Controller/AccountDeleteViewController.m

@@ -90,7 +90,9 @@
             }];
         }
         else if ([dic ks_integerValueForKey:@"code"] == 5201) {
-            [self showFailAlert:[dic ks_arrayValueForKey:@"message"]];
+            NSString *message = MESSAGEKEY;
+            NSArray *tipsArray = [message mj_JSONObject];
+            [self showFailAlert:tipsArray];
         }
         else {
             [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];