Browse Source

no message

heavyrain2012 6 years ago
parent
commit
4b6e9d48b5

+ 6 - 12
wfchat/WildFireChat.xcodeproj/project.pbxproj

@@ -56,6 +56,7 @@
 		2F94FCA622291813005BD461 /* LBXPermissionContacts.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F94FC9222291813005BD461 /* LBXPermissionContacts.m */; };
 		2F94FCA722291813005BD461 /* LBXPermissionCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F94FC9322291813005BD461 /* LBXPermissionCamera.m */; };
 		2F94FCA822291813005BD461 /* LBXPermission.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F94FC9422291813005BD461 /* LBXPermission.m */; };
+		2F9E8602222BA6180076B82B /* GroupInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F9E8601222BA6180076B82B /* GroupInfoViewController.m */; };
 		2FEA5D6A21F4AC8900280B23 /* WFCLoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FEA5D6821F4AC8900280B23 /* WFCLoginViewController.m */; };
 		2FF07F5921F82E7200A78A62 /* WFCAboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FF07F4721F82E7200A78A62 /* WFCAboutViewController.m */; };
 		2FF07F5A21F82E7200A78A62 /* WFCSettingTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FF07F4921F82E7200A78A62 /* WFCSettingTableViewController.m */; };
@@ -67,7 +68,6 @@
 		6E616DB520AB3540002CB8BE /* WebRTC.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6E616D9F20AB3435002CB8BE /* WebRTC.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		6E616DB720AB3540002CB8BE /* WFAVEngineKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 2E56F6C820AAEB9F0063B4D6 /* WFAVEngineKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		6E616DB920AB3540002CB8BE /* WFChatClient.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 2E56F6C920AAEB9F0063B4D6 /* WFChatClient.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
-		908542782229FD460009713D /* WFCConversationTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 908542772229FD460009713D /* WFCConversationTableViewController.m */; };
 		9085427B2229FF160009713D /* StyleDIY.m in Sources */ = {isa = PBXBuildFile; fileRef = 908542792229FF160009713D /* StyleDIY.m */; };
 		9085427E222A00430009713D /* DIYScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9085427D222A00430009713D /* DIYScanViewController.m */; };
 		90854281222A04C80009713D /* QQLBXScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 90854280222A04C80009713D /* QQLBXScanViewController.m */; };
@@ -77,7 +77,6 @@
 		909ACDB321304CD900A64FE7 /* ChatroomItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 909ACDB221304CD900A64FE7 /* ChatroomItemCell.m */; };
 		90C1D911208C12A900E923F4 /* foreman.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 90C1D90F208C12A900E923F4 /* foreman.mp4 */; };
 		90C1D912208C12A900E923F4 /* ring.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 90C1D910208C12A900E923F4 /* ring.mp3 */; };
-		90FF267B222AA4690001D8AF /* WFCMyProfileTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 90FF267A222AA4690001D8AF /* WFCMyProfileTableViewController.m */; };
 		90FF267E222AB34B0001D8AF /* PCLoginConfirmViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 90FF267D222AB34B0001D8AF /* PCLoginConfirmViewController.m */; };
 /* End PBXBuildFile section */
 
@@ -212,6 +211,8 @@
 		2F94FC9622291813005BD461 /* LBXPermissionSetting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LBXPermissionSetting.h; sourceTree = "<group>"; };
 		2F94FC9722291813005BD461 /* LBXPermissionHealth.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LBXPermissionHealth.h; sourceTree = "<group>"; };
 		2F94FC9822291813005BD461 /* LBXPermissionReminders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LBXPermissionReminders.h; sourceTree = "<group>"; };
+		2F9E8600222BA6180076B82B /* GroupInfoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GroupInfoViewController.h; sourceTree = "<group>"; };
+		2F9E8601222BA6180076B82B /* GroupInfoViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GroupInfoViewController.m; sourceTree = "<group>"; };
 		2FEA5D6821F4AC8900280B23 /* WFCLoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WFCLoginViewController.m; sourceTree = "<group>"; };
 		2FEA5D6921F4AC8900280B23 /* WFCLoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WFCLoginViewController.h; sourceTree = "<group>"; };
 		2FF07F4721F82E7200A78A62 /* WFCAboutViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WFCAboutViewController.m; sourceTree = "<group>"; };
@@ -226,8 +227,6 @@
 		2FF07F5521F82E7200A78A62 /* WFCSecurityTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WFCSecurityTableViewController.m; sourceTree = "<group>"; };
 		6E616D9B20AB3435002CB8BE /* LICENSE.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = LICENSE.md; path = Frameworks/GoogleWebRTC/LICENSE.md; sourceTree = SOURCE_ROOT; };
 		6E616D9F20AB3435002CB8BE /* WebRTC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebRTC.framework; path = Frameworks/GoogleWebRTC/Frameworks/frameworks/WebRTC.framework; sourceTree = SOURCE_ROOT; };
-		908542762229FD460009713D /* WFCConversationTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WFCConversationTableViewController.h; sourceTree = "<group>"; };
-		908542772229FD460009713D /* WFCConversationTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WFCConversationTableViewController.m; sourceTree = "<group>"; };
 		908542792229FF160009713D /* StyleDIY.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StyleDIY.m; sourceTree = "<group>"; };
 		9085427A2229FF160009713D /* StyleDIY.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleDIY.h; sourceTree = "<group>"; };
 		9085427C222A00430009713D /* DIYScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DIYScanViewController.h; sourceTree = "<group>"; };
@@ -244,8 +243,6 @@
 		909ACDB221304CD900A64FE7 /* ChatroomItemCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ChatroomItemCell.m; sourceTree = "<group>"; };
 		90C1D90F208C12A900E923F4 /* foreman.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = foreman.mp4; sourceTree = "<group>"; };
 		90C1D910208C12A900E923F4 /* ring.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = ring.mp3; sourceTree = "<group>"; };
-		90FF2679222AA4690001D8AF /* WFCMyProfileTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WFCMyProfileTableViewController.h; sourceTree = "<group>"; };
-		90FF267A222AA4690001D8AF /* WFCMyProfileTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WFCMyProfileTableViewController.m; sourceTree = "<group>"; };
 		90FF267C222AB34B0001D8AF /* PCLoginConfirmViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PCLoginConfirmViewController.h; sourceTree = "<group>"; };
 		90FF267D222AB34B0001D8AF /* PCLoginConfirmViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PCLoginConfirmViewController.m; sourceTree = "<group>"; };
 /* End PBXFileReference section */
@@ -306,12 +303,10 @@
 				2E1D20BB1FAF127100F4405D /* WFCConfig.h */,
 				2E1D20B11FAF127100F4405D /* WFCConfig.m */,
 				903EBC942136313B00312C16 /* SupportFiles */,
-				908542762229FD460009713D /* WFCConversationTableViewController.h */,
-				908542772229FD460009713D /* WFCConversationTableViewController.m */,
-				90FF2679222AA4690001D8AF /* WFCMyProfileTableViewController.h */,
-				90FF267A222AA4690001D8AF /* WFCMyProfileTableViewController.m */,
 				90FF267C222AB34B0001D8AF /* PCLoginConfirmViewController.h */,
 				90FF267D222AB34B0001D8AF /* PCLoginConfirmViewController.m */,
+				2F9E8600222BA6180076B82B /* GroupInfoViewController.h */,
+				2F9E8601222BA6180076B82B /* GroupInfoViewController.m */,
 			);
 			path = WildFireChat;
 			sourceTree = "<group>";
@@ -718,6 +713,7 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				2F9E8602222BA6180076B82B /* GroupInfoViewController.m in Sources */,
 				2FEA5D6A21F4AC8900280B23 /* WFCLoginViewController.m in Sources */,
 				2F94FB8E22291577005BD461 /* LBXScanVideoZoomView.m in Sources */,
 				2F94FC7222291578005BD461 /* LBXScanNative.m in Sources */,
@@ -732,7 +728,6 @@
 				9085427B2229FF160009713D /* StyleDIY.m in Sources */,
 				2F94FB9222291577005BD461 /* LBXScanTypes.m in Sources */,
 				2F94FCA122291813005BD461 /* LBXPermissionReminders.m in Sources */,
-				908542782229FD460009713D /* WFCConversationTableViewController.m in Sources */,
 				2F94FC9A22291813005BD461 /* UIWindow+LBXHierarchy.m in Sources */,
 				2F7268FD21F714C900E05F9C /* UILabel+YBAttributeTextTapAction.m in Sources */,
 				2F94FC9922291813005BD461 /* LBXAlertAction.m in Sources */,
@@ -750,7 +745,6 @@
 				909ACDAF2130473100A64FE7 /* ChatroomListViewController.m in Sources */,
 				2F7268F921F7136600E05F9C /* WFCPrivacyViewController.m in Sources */,
 				2F94FB8C22291577005BD461 /* LBXScanViewController.m in Sources */,
-				90FF267B222AA4690001D8AF /* WFCMyProfileTableViewController.m in Sources */,
 				2F94FB8F22291577005BD461 /* LBXScanLineAnimation.m in Sources */,
 				2F94FCA322291813005BD461 /* LBXPermissionSetting.m in Sources */,
 				2F94FCA222291813005BD461 /* LBXPermissionHealth.m in Sources */,

+ 65 - 1
wfchat/WildFireChat/AppDelegate.m

@@ -14,8 +14,13 @@
 #import "WFCBaseTabBarController.h"
 #import <WFChatUIKit/WFChatUIKit.h>
 #import <UserNotifications/UserNotifications.h>
+#import "CreateBarCodeViewController.h"
+#import "PCLoginConfirmViewController.h"
+#import "QQLBXScanViewController.h"
+#import "StyleDIY.h"
+#import "GroupInfoViewController.h"
 
-@interface AppDelegate () <ConnectionStatusDelegate, ReceiveMessageDelegate, WFAVEngineDelegate, UNUserNotificationCenterDelegate>
+@interface AppDelegate () <ConnectionStatusDelegate, ReceiveMessageDelegate, WFAVEngineDelegate, UNUserNotificationCenterDelegate, QrCodeDelegate>
 @property(nonatomic, strong) AVAudioPlayer *audioPlayer;
 @end
 
@@ -38,6 +43,8 @@
     
     [self setupNavBar];
     
+    setQrCodeDelegate(self);
+    
     
     if (@available(iOS 10.0, *)) {
         //第一步:获取推送通知中心
@@ -344,4 +351,61 @@ void systemAudioCallback (SystemSoundID soundID, void* clientData) {
     }
     completionHandler();
 }
+
+
+#pragma mark - QrCodeDelegate
+- (void)showQrCodeViewController:(UINavigationController *)navigator type:(int)type target:(NSString *)target {
+    CreateBarCodeViewController *vc = [CreateBarCodeViewController new];
+    if (type == QRType_Me) {
+        WFCCUserInfo *userInfo = [[WFCCIMService sharedWFCIMService] getUserInfo:[WFCCNetworkService sharedInstance].userId refresh:NO];
+        vc.str = [NSString stringWithFormat:@"wildfirechat://user/%@", userInfo.userId];
+        vc.logoUrl = userInfo.portrait;
+    } else if(type == QRType_Group) {
+        WFCCGroupInfo *groupInfo = [[WFCCIMService sharedWFCIMService] getGroupInfo:target refresh:NO];
+        vc.str = [NSString stringWithFormat:@"wildfirechat://group/%@", target];
+        vc.logoUrl = groupInfo.portrait;
+    }
+    
+    [navigator pushViewController:vc animated:YES];
+}
+- (void)scanQrCode:(UINavigationController *)navigator {
+    QQLBXScanViewController *vc = [QQLBXScanViewController new];
+    vc.libraryType = SLT_Native;
+    vc.scanCodeType = SCT_QRCode;
+    
+    vc.style = [StyleDIY qqStyle];
+    
+    //镜头拉远拉近功能
+    vc.isVideoZoom = YES;
+    
+    vc.hidesBottomBarWhenPushed = YES;
+    vc.scanResult = ^(NSString *str) {
+        NSLog(@"str scanned %@", str);
+        if ([str rangeOfString:@"wildfirechat://user" options:NSCaseInsensitiveSearch].location == 0) {
+            NSString *userId = [str lastPathComponent];
+            WFCUProfileTableViewController *vc2 = [[WFCUProfileTableViewController alloc] init];
+            vc2.userInfo = [[WFCCIMService sharedWFCIMService] getUserInfo:userId refresh:NO];
+            if (vc2.userInfo == nil) {
+                return;
+            }
+            
+            vc2.hidesBottomBarWhenPushed = YES;
+            [navigator pushViewController:vc2 animated:YES];
+        } else if ([str rangeOfString:@"wildfirechat://group" options:NSCaseInsensitiveSearch].location == 0) {
+            NSString *groupId = [str lastPathComponent];
+            GroupInfoViewController *vc2 = [[GroupInfoViewController alloc] init];
+            vc2.groupId = groupId;
+            vc2.hidesBottomBarWhenPushed = YES;
+            [navigator pushViewController:vc2 animated:YES];
+        } else if ([str rangeOfString:@"wildfirechat://pcsession" options:NSCaseInsensitiveSearch].location == 0) {
+            NSString *sessionId = [str lastPathComponent];
+            PCLoginConfirmViewController *vc2 = [[PCLoginConfirmViewController alloc] init];
+            vc2.sessionId = sessionId;
+            vc2.hidesBottomBarWhenPushed = YES;
+            [navigator pushViewController:vc2 animated:YES];
+        }
+        
+    };
+    [navigator pushViewController:vc animated:YES];
+}
 @end

+ 17 - 0
wfchat/WildFireChat/GroupInfoViewController.h

@@ -0,0 +1,17 @@
+//
+//  GroupInfoViewController.h
+//  WildFireChat
+//
+//  Created by heavyrain lee on 2019/3/3.
+//  Copyright © 2019 WildFireChat. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface GroupInfoViewController : UIViewController
+@property(nonatomic, strong)NSString *groupId;
+@end
+
+NS_ASSUME_NONNULL_END

+ 32 - 0
wfchat/WildFireChat/GroupInfoViewController.m

@@ -0,0 +1,32 @@
+//
+//  GroupInfoViewController.m
+//  WildFireChat
+//
+//  Created by heavyrain lee on 2019/3/3.
+//  Copyright © 2019 WildFireChat. All rights reserved.
+//
+
+#import "GroupInfoViewController.h"
+
+@interface GroupInfoViewController ()
+
+@end
+
+@implementation GroupInfoViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+}
+
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+    // Get the new view controller using [segue destinationViewController].
+    // Pass the selected object to the new view controller.
+}
+*/
+
+@end

+ 7 - 1
wfchat/WildFireChat/LBXScan/QQLBXScanViewController.m

@@ -13,6 +13,12 @@
 #import "LBXPermissionSetting.h"
 #import <WFChatClient/WFCChatClient.h>
 
+#define kIs_iPhoneX ([UIScreen mainScreen].bounds.size.height == 812.0f ||[UIScreen mainScreen].bounds.size.height == 896.0f )
+
+#define kStatusBarAndNavigationBarHeight (kIs_iPhoneX ? 88.f : 64.f)
+
+#define  kTabbarSafeBottomMargin        (kIs_iPhoneX ? 34.f : 0.f)
+
 @interface QQLBXScanViewController ()
 @property (nonatomic, strong) LBXScanVideoZoomView *zoomView;
 @end
@@ -143,7 +149,7 @@
         return;
     }
     
-    self.bottomItemsView = [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(self.view.frame)-164,
+    self.bottomItemsView = [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(self.view.bounds)-100 - kTabbarSafeBottomMargin,
                                                                       CGRectGetWidth(self.view.frame), 100)];
     _bottomItemsView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.6];
     

+ 1 - 2
wfchat/WildFireChat/Me/WFCMeTableViewController.m

@@ -13,7 +13,6 @@
 #import "WFCSettingTableViewController.h"
 #import "WFCSecurityTableViewController.h"
 #import "WFCMeTableViewCell.h"
-#import "WFCMyProfileTableViewController.h"
 
 @interface WFCMeTableViewController () <UITableViewDataSource, UITableViewDelegate>
 @property (nonatomic, strong)UITableView *tableView;
@@ -120,7 +119,7 @@
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     if (indexPath.section == 0) {
-        WFCUMyProfileTableViewController *vc = [[WFCMyProfileTableViewController alloc] init];
+        WFCUMyProfileTableViewController *vc = [[WFCUMyProfileTableViewController alloc] init];
         vc.hidesBottomBarWhenPushed = YES;
         [self.navigationController pushViewController:vc animated:YES];
     } else if (indexPath.section == 1) {

+ 1 - 2
wfchat/WildFireChat/WFCBaseTabBarController.m

@@ -11,7 +11,6 @@
 #import <WFChatUIKit/WFChatUIKit.h>
 #import "DiscoverViewController.h"
 #import "WFCMeTableViewController.h"
-#import "WFCConversationTableViewController.h"
 
 #define kClassKey   @"rootVCClassString"
 #define kTitleKey   @"title"
@@ -27,7 +26,7 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     
-    UIViewController *vc = [WFCConversationTableViewController new];
+    UIViewController *vc = [WFCUConversationTableViewController new];
     vc.title = @"消息";
     UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
     UITabBarItem *item = nav.tabBarItem;

+ 0 - 17
wfchat/WildFireChat/WFCConversationTableViewController.h

@@ -1,17 +0,0 @@
-//
-//  WFCConversationTableViewController.h
-//  WildFireChat
-//
-//  Created by heavyrain lee on 2019/3/2.
-//  Copyright © 2019 WildFireChat. All rights reserved.
-//
-
-#import <WFChatUIKit/WFChatUIKit.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface WFCConversationTableViewController : WFCUConversationTableViewController
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 65
wfchat/WildFireChat/WFCConversationTableViewController.m

@@ -1,65 +0,0 @@
-//
-//  WFCConversationTableViewController.m
-//  WildFireChat
-//
-//  Created by heavyrain lee on 2019/3/2.
-//  Copyright © 2019 WildFireChat. All rights reserved.
-//
-
-#import "WFCConversationTableViewController.h"
-#import "QQLBXScanViewController.h"
-#import "StyleDIY.h"
-#import <WFChatClient/WFCChatClient.h>
-#import <WFChatUIKit/WFChatUIKit.h>
-#import "PCLoginConfirmViewController.h"
-
-@interface WFCConversationTableViewController ()
-
-@end
-
-@implementation WFCConversationTableViewController
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    // Do any additional setup after loading the view.
-}
-
-
-- (void)scanQrCodeAction:(id)sender {
-    QQLBXScanViewController *vc = [QQLBXScanViewController new];
-    vc.libraryType = SLT_Native;
-    vc.scanCodeType = SCT_QRCode;
-    
-    vc.style = [StyleDIY qqStyle];
-    
-    //镜头拉远拉近功能
-    vc.isVideoZoom = YES;
-    
-    vc.hidesBottomBarWhenPushed = YES;
-    vc.scanResult = ^(NSString *str) {
-        NSLog(@"str scanned %@", str);
-        if ([str rangeOfString:@"wildfirechat://user" options:NSCaseInsensitiveSearch].location == 0) {
-            NSString *userId = [str lastPathComponent];
-            WFCUProfileTableViewController *vc2 = [[WFCUProfileTableViewController alloc] init];
-            vc2.userInfo = [[WFCCIMService sharedWFCIMService] getUserInfo:userId refresh:NO];
-            if (vc2.userInfo == nil) {
-                return;
-            }
-
-            vc2.hidesBottomBarWhenPushed = YES;
-            [self.navigationController pushViewController:vc2 animated:YES];
-        } else if ([str rangeOfString:@"wildfirechat://group" options:NSCaseInsensitiveSearch].location == 0) {
-            
-        } else if ([str rangeOfString:@"wildfirechat://pcsession" options:NSCaseInsensitiveSearch].location == 0) {
-            NSString *sessionId = [str lastPathComponent];
-            PCLoginConfirmViewController *vc2 = [[PCLoginConfirmViewController alloc] init];
-            vc2.sessionId = sessionId;
-            vc2.hidesBottomBarWhenPushed = YES;
-            [self.navigationController pushViewController:vc2 animated:YES];
-        }
-        
-    };
-    [self.navigationController pushViewController:vc animated:YES];
-}
-
-@end

+ 0 - 17
wfchat/WildFireChat/WFCMyProfileTableViewController.h

@@ -1,17 +0,0 @@
-//
-//  WFCMyProfileTableViewController.h
-//  WildFireChat
-//
-//  Created by heavyrain lee on 2019/3/2.
-//  Copyright © 2019 WildFireChat. All rights reserved.
-//
-
-#import <WFChatUIKit/WFChatUIKit.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface WFCMyProfileTableViewController : WFCUMyProfileTableViewController
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 42
wfchat/WildFireChat/WFCMyProfileTableViewController.m

@@ -1,42 +0,0 @@
-//
-//  WFCMyProfileTableViewController.m
-//  WildFireChat
-//
-//  Created by heavyrain lee on 2019/3/2.
-//  Copyright © 2019 WildFireChat. All rights reserved.
-//
-
-#import "WFCMyProfileTableViewController.h"
-#import "CreateBarCodeViewController.h"
-#import <WFChatClient/WFCChatClient.h>
-
-
-@interface WFCMyProfileTableViewController ()
-
-@end
-
-@implementation WFCMyProfileTableViewController
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    // Do any additional setup after loading the view.
-}
-
-/*
-#pragma mark - Navigation
-
-// In a storyboard-based application, you will often want to do a little preparation before navigation
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
-    // Get the new view controller using [segue destinationViewController].
-    // Pass the selected object to the new view controller.
-}
-*/
-
-- (void)showMyQrCode {
-    CreateBarCodeViewController *vc = [CreateBarCodeViewController new];
-    WFCCUserInfo *userInfo = [[WFCCIMService sharedWFCIMService] getUserInfo:[WFCCNetworkService sharedInstance].userId refresh:NO];
-    vc.str = [NSString stringWithFormat:@"wildfirechat://user/%@", userInfo.userId];
-    vc.logoUrl = userInfo.portrait;
-    [self.navigationController pushViewController:vc animated:YES];
-}
-@end

+ 8 - 0
wfuikit/WFChatUIKit.xcodeproj/project.pbxproj

@@ -318,6 +318,8 @@
 		2F9CE41D21BFE5D9005E1BE1 /* WFCUSearchChannelViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F9CE41B21BFE5D9005E1BE1 /* WFCUSearchChannelViewController.h */; };
 		2F9CE42021BFE63C005E1BE1 /* WFCUChannelProfileViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F9CE41E21BFE63C005E1BE1 /* WFCUChannelProfileViewController.h */; };
 		2F9CE42121BFE63C005E1BE1 /* WFCUChannelProfileViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F9CE41F21BFE63C005E1BE1 /* WFCUChannelProfileViewController.m */; };
+		2F9E85F9222B84690076B82B /* QrCodeHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F9E85F8222B83CE0076B82B /* QrCodeHelper.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		2F9E85FF222B9D600076B82B /* QrCodeHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F9E85FE222B9D600076B82B /* QrCodeHelper.m */; };
 		2FD2EE80218F15B500CBA8B0 /* WFCUVerifyRequestViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FD2EE7E218F15B500CBA8B0 /* WFCUVerifyRequestViewController.h */; };
 		2FD2EE81218F15B500CBA8B0 /* WFCUVerifyRequestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FD2EE7F218F15B500CBA8B0 /* WFCUVerifyRequestViewController.m */; };
 		2FE689A821AE9C0200DE54CC /* WFCUConversationSearchTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FE689A621AE9C0100DE54CC /* WFCUConversationSearchTableViewController.m */; };
@@ -645,6 +647,8 @@
 		2F9CE41B21BFE5D9005E1BE1 /* WFCUSearchChannelViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WFCUSearchChannelViewController.h; sourceTree = "<group>"; };
 		2F9CE41E21BFE63C005E1BE1 /* WFCUChannelProfileViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WFCUChannelProfileViewController.h; sourceTree = "<group>"; };
 		2F9CE41F21BFE63C005E1BE1 /* WFCUChannelProfileViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WFCUChannelProfileViewController.m; sourceTree = "<group>"; };
+		2F9E85F8222B83CE0076B82B /* QrCodeHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QrCodeHelper.h; sourceTree = "<group>"; };
+		2F9E85FE222B9D600076B82B /* QrCodeHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QrCodeHelper.m; sourceTree = "<group>"; };
 		2FD2EE7E218F15B500CBA8B0 /* WFCUVerifyRequestViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WFCUVerifyRequestViewController.h; sourceTree = "<group>"; };
 		2FD2EE7F218F15B500CBA8B0 /* WFCUVerifyRequestViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WFCUVerifyRequestViewController.m; sourceTree = "<group>"; };
 		2FE689A621AE9C0100DE54CC /* WFCUConversationSearchTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WFCUConversationSearchTableViewController.m; sourceTree = "<group>"; };
@@ -745,6 +749,8 @@
 				2F551036217F5CC100F56C26 /* Predefine.h */,
 				2F550BE3217F4D7B00F56C26 /* Info.plist */,
 				2F143A66217F7D4100B3E38A /* Resources */,
+				2F9E85F8222B83CE0076B82B /* QrCodeHelper.h */,
+				2F9E85FE222B9D600076B82B /* QrCodeHelper.m */,
 			);
 			path = WFChatUIKit;
 			sourceTree = "<group>";
@@ -1481,6 +1487,7 @@
 				2F551222217F5CC300F56C26 /* WFCUModifyMyProfileViewController.h in Headers */,
 				2F551223217F5CC300F56C26 /* WFCUMessageNotificationViewController.h in Headers */,
 				2F49910B2189239E005F6A84 /* WFCUVideoViewController.h in Headers */,
+				2F9E85F9222B84690076B82B /* QrCodeHelper.h in Headers */,
 				2F55121A217F5CC300F56C26 /* WFCUMyPortraitViewController.h in Headers */,
 				2F49910D2189239E005F6A84 /* WFCUFloatingWindow.h in Headers */,
 				2F551211217F5CC300F56C26 /* WFCUContactListViewController.h in Headers */,
@@ -1742,6 +1749,7 @@
 				2F5511D8217F5CC300F56C26 /* UIView+TYAutoLayout.m in Sources */,
 				2F551099217F5CC200F56C26 /* WFCUTextCell.m in Sources */,
 				2FE689A821AE9C0200DE54CC /* WFCUConversationSearchTableViewController.m in Sources */,
+				2F9E85FF222B9D600076B82B /* QrCodeHelper.m in Sources */,
 				2F5510B8217F5CC200F56C26 /* WFCUImagePreviewViewController.m in Sources */,
 				2F5510C6217F5CC200F56C26 /* WFCUFavGroupTableViewController.m in Sources */,
 				2F5510A3217F5CC200F56C26 /* WFCUImageCell.m in Sources */,

+ 4 - 1
wfuikit/WFChatUIKit/ConversationList/ViewController/WFCUConversationTableViewController.m

@@ -26,6 +26,7 @@
 #import "MBProgressHUD.h"
 
 #import "WFCUContactTableViewCell.h"
+#import "QrCodeHelper.h"
 
 @interface WFCUConversationTableViewController () <UISearchControllerDelegate, UISearchResultsUpdating, UITableViewDelegate, UITableViewDataSource>
 @property (nonatomic, strong)NSMutableArray<WFCCConversationInfo *> *conversations;
@@ -216,7 +217,9 @@
 }
 
 - (void)scanQrCodeAction:(id)sender {
-    
+    if (gQrCodeDelegate) {
+        [gQrCodeDelegate scanQrCode:self.navigationController];
+    }
 }
 - (void)viewDidLoad {
     [super viewDidLoad];

+ 27 - 4
wfuikit/WFChatUIKit/ConversationSetting/ViewController/WFCUConversationSettingViewController.m

@@ -23,7 +23,7 @@
 #import "WFCUMyProfileTableViewController.h"
 #import "WFCUConversationSearchTableViewController.h"
 #import "WFCUChannelProfileViewController.h"
-
+#import "QrCodeHelper.h"
 
 @interface WFCUConversationSettingViewController () <UITableViewDataSource, UITableViewDelegate, UICollectionViewDelegate, UICollectionViewDataSource>
 @property (nonatomic, strong)UICollectionView *memberCollectionView;
@@ -256,8 +256,15 @@
   return NO;
 }
 
+- (BOOL)isGroupQrCodeCell:(NSIndexPath *)indexPath {
+    if(self.conversation.type == Group_Type && indexPath.section == 0 && indexPath.row == 2) {
+        return YES;
+    }
+    return NO;
+}
+
 - (BOOL)isGroupManageCell:(NSIndexPath *)indexPath {
-  if(self.conversation.type == Group_Type && indexPath.section == 0 && indexPath.row == 2) {
+  if(self.conversation.type == Group_Type && indexPath.section == 0 && indexPath.row == 3) {
     return YES;
   }
   return NO;
@@ -338,9 +345,9 @@
     if (self.conversation.type == Group_Type) {
         if (section == 0) {
             if ([self isGroupManager]) {
-                return 3; //群名称,群头像,群管理
+                return 4; //群名称,群头像,群二维码,群管理,
             } else {
-                return 2; //群名称,群头像
+                return 3; //群名称,群头像,群二维码
             }
             
         } else if(section == 1) {
@@ -420,6 +427,16 @@
     [portraitView sd_setImageWithURL:[NSURL URLWithString:self.groupInfo.portrait] placeholderImage:[UIImage imageNamed:@"group_default_portrait"]];
     cell.accessoryView = portraitView;
     return cell;
+  } else if([self isGroupQrCodeCell:indexPath]) {
+    UITableViewCell *cell = [self cellOfTable:tableView WithTitle:@"群二维码" withDetailTitle:nil withDisclosureIndicator:YES withSwitch:NO withSwitchType:SwitchType_Conversation_None];
+      
+      CGFloat width = [UIScreen mainScreen].bounds.size.width;
+      UIImage *qrcode = [UIImage imageNamed:@"qrcode"];
+      UIImageView *qrview = [[UIImageView alloc] initWithFrame:CGRectMake(width - 56, 5, 30, 30)];
+      qrview.image = qrcode;
+      [cell addSubview:qrview];
+      
+      return cell;
   } else if ([self isGroupManageCell:indexPath]) {
     return [self cellOfTable:tableView WithTitle:@"群管理" withDetailTitle:nil withDisclosureIndicator:YES withSwitch:NO withSwitchType:SwitchType_Conversation_None];
   } else if ([self isSearchMessageCell:indexPath]) {
@@ -583,8 +600,14 @@
       dispatch_async(dispatch_get_main_queue(), ^{
           [self presentViewController:actionSheet animated:YES completion:nil];
       });
+  } else if([self isGroupQrCodeCell:indexPath]) {
+      if (gQrCodeDelegate) {
+          [gQrCodeDelegate showQrCodeViewController:self.navigationController type:QRType_Group target:self.groupInfo.target];
+      }
   }
 }
+
+
 #pragma mark - UICollectionViewDataSource
 - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
     if (self.conversation.type == Group_Type) {

+ 4 - 2
wfuikit/WFChatUIKit/Me/WFCUMyProfileTableViewController.m

@@ -13,7 +13,7 @@
 #import "MBProgressHUD.h"
 #import "WFCUMyPortraitViewController.h"
 #import "WFCUModifyMyProfileViewController.h"
-
+#import "QrCodeHelper.h"
 
 @interface WFCUMyProfileTableViewController () <UITableViewDelegate, UITableViewDataSource>
 @property (strong, nonatomic)UIImageView *portraitView;
@@ -211,7 +211,9 @@
 }
 
 - (void)showMyQrCode {
-    
+    if (gQrCodeDelegate) {
+        [gQrCodeDelegate showQrCodeViewController:self.navigationController type:QRType_Me target:nil];
+    }
 }
 #pragma mark - UITableViewDelegate
 -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

+ 28 - 0
wfuikit/WFChatUIKit/QrCodeHelper.h

@@ -0,0 +1,28 @@
+//
+//  QrCodeHelper.h
+//  WFChatUIKit
+//
+//  Created by heavyrain lee on 2019/3/3.
+//  Copyright © 2019 heavyrain lee. All rights reserved.
+//
+
+
+#ifndef QrCodeHelper_h
+#define QrCodeHelper_h
+#import <UIKit/UIKit.h>
+
+#define QRType_Me  0
+#define QRType_Group 1
+#define QRType_Channel 2
+#define QRType_Chatroom 3
+#define QRType_PC_Session 4
+
+@protocol QrCodeDelegate <NSObject>
+- (void)showQrCodeViewController:(UINavigationController *)navigator type:(int)type target:(NSString *)target;
+- (void)scanQrCode:(UINavigationController *)navigator;
+@end
+
+extern id<QrCodeDelegate> gQrCodeDelegate;
+
+extern void setQrCodeDelegate(id<QrCodeDelegate> delegate);
+#endif /* QrCodeHelper_h */

+ 16 - 0
wfuikit/WFChatUIKit/QrCodeHelper.m

@@ -0,0 +1,16 @@
+//
+//  QrCodeHelper.m
+//  WFChatUIKit
+//
+//  Created by heavyrain lee on 2019/3/3.
+//  Copyright © 2019 heavyrain lee. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "QrCodeHelper.h"
+
+id<QrCodeDelegate> gQrCodeDelegate = nil;
+
+void setQrCodeDelegate(id<QrCodeDelegate> delegate) {
+    gQrCodeDelegate = delegate;
+}

+ 1 - 0
wfuikit/WFChatUIKit/WFChatUIKit.h

@@ -26,4 +26,5 @@ FOUNDATION_EXPORT const unsigned char WFChatUIKitVersionString[];
 #import <WFChatUIKit/WFCUMyProfileTableViewController.h>
 #import <WFChatUIKit/WFCUProfileTableViewController.h>
 #import <WFChatUIKit/WFCUMessageNotificationViewController.h>
+#import <WFChatUIKit/QrCodeHelper.h>