ganzf il y a 6 mois
Parent
commit
b99ffc23fc

+ 1 - 0
AIIM/AIIM/Common/CommonUI/FilePreviewer.m

@@ -265,6 +265,7 @@
     [webView loadRequest:request];
     [webView loadRequest:request];
     
     
     [self presentViewController:webViewController];
     [self presentViewController:webViewController];
+
     self.webPreviewController = webViewController;
     self.webPreviewController = webViewController;
 }
 }
 
 

+ 4 - 6
AIIM/AIIM/Common/Network/GWebSocket.m

@@ -187,6 +187,10 @@ static NSString *redeady = @"{\"code\":1}";
     if (!self.autoReconnect) {
     if (!self.autoReconnect) {
         return;
         return;
     }
     }
+    
+    self.socket = nil;
+    [self initWebSocket];
+    
 //    NSLog(@"reConnect1111---------:%ld",(long)self.reconnetCount);
 //    NSLog(@"reConnect1111---------:%ld",(long)self.reconnetCount);
     if(self.reconnetCount>15){
     if(self.reconnetCount>15){
         NSString *token = [UDManager.shareInstance getSDManager:gkeytoken];
         NSString *token = [UDManager.shareInstance getSDManager:gkeytoken];
@@ -197,14 +201,8 @@ static NSString *redeady = @"{\"code\":1}";
                 if([gcode intValue]==401){//token有效
                 if([gcode intValue]==401){//token有效
                     [self logoutAct];
                     [self logoutAct];
                 }
                 }
-                else{
-                    self.socket = nil;
-                    [self initWebSocket];
-                }
             } fail:^(NSError * _Nonnull error) {
             } fail:^(NSError * _Nonnull error) {
                 NSLog(@"11%@", error);
                 NSLog(@"11%@", error);
-                self.socket = nil;
-                [self initWebSocket];
             }];
             }];
         }
         }
     }
     }

+ 8 - 1
AIIM/AIIM/Controller/chat/chetCell/chatCellView.m

@@ -19,6 +19,8 @@
 #import "ChatRecordController.h"
 #import "ChatRecordController.h"
 #import "QuoteDetailController.h"
 #import "QuoteDetailController.h"
 #import "UILabel+YBAttributeTextTapAction.h"
 #import "UILabel+YBAttributeTextTapAction.h"
+#import <SafariServices/SFSafariViewController.h>
+
 
 
 // 定义一些常量
 // 定义一些常量
 static const CGFloat kTextVerticalMargin = 10.0f;        //  内容垂直边距
 static const CGFloat kTextVerticalMargin = 10.0f;        //  内容垂直边距
@@ -699,7 +701,12 @@ static const CGFloat kMediaCornerRadius = 4.0f;
             NSTextCheckingResult *match=self->_matchesArray[index];
             NSTextCheckingResult *match=self->_matchesArray[index];
 //            [[UIApplication sharedApplication] openURL:match.URL options:@{} completionHandler:nil];
 //            [[UIApplication sharedApplication] openURL:match.URL options:@{} completionHandler:nil];
             // 点击后的操作
             // 点击后的操作
-            [FilePreviewer.shared previewFileWithLocalPath:@"" remoteURL:match.URL fromViewController:self.parentViewController];
+           
+            SFSafariViewController *svc = [[SFSafariViewController alloc] initWithURL:match.URL];
+            [self.parentViewController presentViewController:svc animated:YES completion:nil];
+
+            
+//            [FilePreviewer.shared previewFileWithLocalPath:@"" remoteURL:match.URL fromViewController:self.parentViewController];
         }];
         }];
     }
     }
     else{
     else{