Browse Source

正在增加群功能(未完善),文件服务还是旧版非oss的

ganzf 2 months ago
parent
commit
6eaf38ca0f
34 changed files with 2661 additions and 152 deletions
  1. 3 1
      ABtong/ABtong/ALLController/call/PhoneKeybord.m
  2. 1 0
      ABtong/ABtong/ALLController/friendCtr/FriendListCell.h
  3. 17 2
      ABtong/ABtong/ALLController/friendCtr/FriendListCell.m
  4. 3 0
      ABtong/ABtong/ALLController/friendCtr/FriendListController.h
  5. 212 74
      ABtong/ABtong/ALLController/friendCtr/FriendListController.m
  6. 24 0
      ABtong/ABtong/ALLController/friendCtr/popjiaView.h
  7. 24 0
      ABtong/ABtong/ALLController/friendCtr/popjiaView.m
  8. 60 0
      ABtong/ABtong/ALLController/friendCtr/popjiaView.xib
  9. 18 0
      ABtong/ABtong/ALLController/friendCtr/qunzuCtr/NewQunzuController.h
  10. 322 0
      ABtong/ABtong/ALLController/friendCtr/qunzuCtr/NewQunzuController.m
  11. 29 0
      ABtong/ABtong/ALLController/friendCtr/qunzuCtr/QuncyCell.h
  12. 171 0
      ABtong/ABtong/ALLController/friendCtr/qunzuCtr/QuncyCell.m
  13. 22 0
      ABtong/ABtong/ALLController/friendCtr/qunzuCtr/QuncyController.h
  14. 342 0
      ABtong/ABtong/ALLController/friendCtr/qunzuCtr/QuncyController.m
  15. 19 0
      ABtong/ABtong/ALLController/friendCtr/qunzuCtr/QunzuController.h
  16. 746 0
      ABtong/ABtong/ALLController/friendCtr/qunzuCtr/QunzuController.m
  17. 298 0
      ABtong/ABtong/ALLController/friendCtr/qunzuCtr/qunStoryboard.storyboard
  18. 3 3
      ABtong/ABtong/Assets.xcassets/search_icon.imageset/Contents.json
  19. BIN
      ABtong/ABtong/Assets.xcassets/search_icon.imageset/Group 27.png
  20. BIN
      ABtong/ABtong/Assets.xcassets/search_icon.imageset/Group 27@2x.png
  21. BIN
      ABtong/ABtong/Assets.xcassets/search_icon.imageset/Group 27@3x.png
  22. BIN
      ABtong/ABtong/Assets.xcassets/search_icon.imageset/search_icon.png
  23. BIN
      ABtong/ABtong/Assets.xcassets/search_icon.imageset/search_icon@2x.png
  24. BIN
      ABtong/ABtong/Assets.xcassets/search_icon.imageset/search_icon@3x.png
  25. 48 60
      ABtong/ABtong/Base.lproj/Main.storyboard
  26. 1 1
      ABtong/ABtong/Common/CommonUI/FilePreviewer.m
  27. 61 0
      ABtong/ABtong/Common/Network/FriendNetApi.h
  28. 112 0
      ABtong/ABtong/Common/Network/FriendNetApi.m
  29. 2 0
      ABtong/ABtong/Common/Network/GDBManager.h
  30. 51 11
      ABtong/ABtong/Common/Network/GDBManager.m
  31. 4 0
      ABtong/ABtong/Common/Store/FirendStore.h
  32. 26 0
      ABtong/ABtong/Common/Store/FirendStore.m
  33. 24 0
      ABtong/ABtong/Localizable.xcstrings
  34. 18 0
      ABtong/Pods/AFNetworking/PrivacyInfo.xcprivacy

+ 3 - 1
ABtong/ABtong/ALLController/call/PhoneKeybord.m

@@ -145,7 +145,9 @@
     if(userId&&[userId isEqualToString:info[@"id"]]){
         return;
     }
-    _showDic = info.copy;
+    NSMutableDictionary *mtenp = [info mutableCopy];
+    [mtenp setObject:@"0" forKey:@"type"];
+    _showDic = [mtenp copy];
     _userContentV.layer.cornerRadius = 8;
     _userContentV.alpha = 1;
     _avatar.layer.cornerRadius = 25;

+ 1 - 0
ABtong/ABtong/ALLController/friendCtr/FriendListCell.h

@@ -18,6 +18,7 @@
 
 @property(nonatomic, strong) UIImageView *avatar;
 @property(nonatomic, strong) UILabel *name;
+@property(nonatomic, strong) UILabel *serverName;
 - (void)fillWithData:( NSDictionary*)data;
 
 @end

+ 17 - 2
ABtong/ABtong/ALLController/friendCtr/FriendListCell.m

@@ -31,13 +31,19 @@
     [self.contentView addSubview:_avatar];
     
     _name = [[UILabel alloc] init];
-    _name.frame=CGRectMake(68, 8, 250, 50);
+    _name.frame=CGRectMake(68, 8, 250, 20);
     _name.backgroundColor=[UIColor clearColor];
     [_name setFont:[UIFont boldSystemFontOfSize:18]];
     [_name setTextColor:[UIColor whiteColor]];
-    
     [self.contentView addSubview:_name];
     
+    _serverName = [[UILabel alloc] init];
+    _serverName.frame=CGRectMake(68, 30, 250, 20);
+    _serverName.backgroundColor=[UIColor clearColor];
+    [_serverName setFont:[UIFont systemFontOfSize:17]];
+    [_serverName setTextColor:[UIColor whiteColor]];
+    [self.contentView addSubview:_serverName];
+    
     
 }
 
@@ -54,6 +60,15 @@
    [self.avatar sd_setImageWithURL:[NSURL URLWithString:avatar] placeholderImage:[UIImage imageNamed:@"Avatar"]];
     self.name.text = data[@"name"];
     
+    self.serverName.text = @"";
+   
+    NSDictionary *actuserInfo = [UDManager.shareInstance getDDManager:nkactuserInfo];
+    NSString *severName = actuserInfo[@"serverIP"]?:@"";
+    if(severName.length==0){
+        severName = actuserInfo[@"serverName"]?:@"";
+    }
+    self.serverName.text = severName;
+    
     // tell constraints they need updating
     [self setNeedsUpdateConstraints];
 

+ 3 - 0
ABtong/ABtong/ALLController/friendCtr/FriendListController.h

@@ -14,5 +14,8 @@
 @interface FriendListController : UIViewController
 
 @property(nonatomic, strong) NSArray *friendlist;
+@property(nonatomic, strong) NSArray *grouplist;
+@property(nonatomic, strong) NSArray *showlist;
+
 
 @end

+ 212 - 74
ABtong/ABtong/ALLController/friendCtr/FriendListController.m

@@ -15,22 +15,23 @@
 #import "addFriendController.h"
 #import "GLoginController.h"
 #import "LoginStateManager.h"
-
+#import "popjiaView.h"
 #import "FirendStore.h"
 
-@interface FriendListController()<UITableViewDelegate,UITableViewDataSource,FirendStoreDelegate,UISearchBarDelegate>
+@interface FriendListController()<UITableViewDelegate,UITableViewDataSource,FirendStoreDelegate,UITextFieldDelegate,popjiaViewDelegate>
+
 
+@property (weak, nonatomic) IBOutlet UITextField *searchInput;
+@property (weak, nonatomic) IBOutlet UISegmentedControl *segCtr;
 
-@property (weak, nonatomic) IBOutlet UISearchBar *searchBr;
-@property (weak, nonatomic) IBOutlet UILabel *titleLb;
 @property (weak, nonatomic) IBOutlet UITableView *_tableView;
-@property (weak, nonatomic) IBOutlet UIView *topBview;
 @property (weak, nonatomic) IBOutlet UILabel *countLb;
-
-@property (nonatomic,strong) UIView *markView;
 @property (strong, nonatomic) NSTimer *timer;
-
 @property (strong ,nonatomic) NSString *keyword;
+@property (nonatomic) NSInteger segIndex;
+
+@property (nonatomic,strong) popjiaView *pjiaView;
+
 @end
 
 @implementation FriendListController
@@ -38,44 +39,55 @@
 -(void)viewDidLoad{
     [super viewDidLoad];
     
-    _titleLb.text = NSLocalizedString(@"通讯录", @"");
-    
-    _searchBr.delegate = self;
-    [_searchBr becomeFirstResponder];
-    _searchBr.searchTextField.backgroundColor =[UIColor whiteColor];
-    // 设置文本颜色
-    [[UITextField appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]] setDefaultTextAttributes:@{NSForegroundColorAttributeName: [UIColor blackColor]}];
+    [_segCtr addTarget:self action:@selector(segmentChanged:) forControlEvents:UIControlEventValueChanged];
+    [_segCtr setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor blackColor]} forState:UIControlStateSelected];
+    // 设置未选中状态的字体颜色
+    [_segCtr setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]} forState:UIControlStateNormal];
     
     self._tableView.delegate = self;
     self._tableView.dataSource = self;
     self._tableView.backgroundColor = [UIColor clearColor];
     [self._tableView registerClass:[FriendListCell class] forCellReuseIdentifier:@"friend"]; // 使用 Storyboard 时不需要这行代码,除非你混合使用 Storyboard 和代码配置 Cell。
-    _topBview.backgroundColor=globalColor(GCTypeinpuv);
-    _topBview.layer.cornerRadius = 8.0f;
     
-    _countLb.backgroundColor = globalColor(GCTypeOrangeR);
-    _countLb.textColor = [UIColor whiteColor];
+    _countLb.backgroundColor = [UIColor clearColor];
+    _countLb.textColor = [UIColor redColor];
     _countLb.layer.cornerRadius = 15.0f; // 设置圆角
     _countLb.layer.masksToBounds = YES; // 防止子视图超出边界
     _countLb.alpha = 0;
+    _segIndex=0;
+    
     
-    _markView=[[UIView alloc] init];
-    [self.view addSubview:_markView];
+    NSArray *nibs = [[NSBundle mainBundle] loadNibNamed:@"popjiaView" owner:self options:nil];
+    _pjiaView = [nibs objectAtIndex:0];
+    _pjiaView.alpha = 0;
+    [self.view addSubview:_pjiaView];
+    _pjiaView.delegate= self;
     
     
-    [self initpopView];
+    
+    
+    
+    [self initSubView];
 }
 
 -(void)viewWillAppear:(BOOL)animated{
-    [self gettongxunlulist];
+    
     [self getexfriends];
-//    [self startTimer];
+    [self startTimer];
     // 获取TabBarController
     UITabBarController *tabBarController = (UITabBarController *)self.parentViewController;
     // 移除红点(使用系统方法)
     tabBarController.tabBar.items[1].badgeValue = nil;
     FirendStore.shareInstance.delegate = self;
-    [self getLocalFrends];
+    if(_segIndex==0){
+        [self getLocalFrends];
+        [self gettongxunlulist];
+    }
+    else{
+        [self getlocalGroupList];
+        [self getGroupList];
+    }
+    
 }
 -(void)viewWillDisappear:(BOOL)animated{
     [super viewWillDisappear:animated];
@@ -84,60 +96,101 @@
 }
 
 
-- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {
-    // 当用户点击搜索按钮时调用
-    NSLog(@"Search button clicked with text: %@", searchBar.text);
-    [searchBar resignFirstResponder]; // 隐藏键盘
-    self.keyword = searchBar.text;
-    
+-(void)initSubView{
+    NSString *note1 = NSLocalizedString(@"搜索", @"");
+    NSMutableAttributedString *placeholder3 = [[NSMutableAttributedString alloc] initWithString:note1 attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}];
+    UIView *paddingView3 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 20, 16)];
+    UIImageView *scImg = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"search_icon"]];
+    scImg.frame =CGRectMake(4, 0, 16, 16);
+    [paddingView3 addSubview:scImg];
+    _searchInput.leftView = paddingView3;
+    _searchInput.leftViewMode = UITextFieldViewModeAlways;
+    _searchInput.attributedPlaceholder = placeholder3;
+    self.searchInput.delegate = self;
 }
 
 
-#pragma mark 定时服务
--(void)startTimer{
-    if(self.timer==nil){
-        self.timer = [NSTimer scheduledTimerWithTimeInterval:10 target:self selector:@selector(TimerAction) userInfo:nil repeats:YES];
-        [self.timer setFireDate:[NSDate distantPast]];
-        [[NSRunLoop currentRunLoop] addTimer:_timer forMode:NSRunLoopCommonModes];
-    }
-    
-}
+//- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {
+//    // 当用户点击搜索按钮时调用
+//    NSLog(@"Search button clicked with text: %@", searchBar.text);
+//    [searchBar resignFirstResponder]; // 隐藏键盘
+//    self.keyword = searchBar.text;
+//    
+//}
 
--(void)endTimer{
-    [self.timer invalidate];
-    self.timer = nil;
-}
 
--(void)TimerAction{
-    //处理定时触发事件
-    [self getexfriends];
+-(BOOL)textFieldShouldReturn:(UITextField *)textField{
+   
+    self.keyword =textField.text;
+    NSLog(@"textFieldDidEndEditing:%@",self.keyword);
+    [textField resignFirstResponder]; // 隐藏键盘
+    return YES;
 }
 
 
--(void)getLocalFrends{
-    [FirendStore.shareInstance reloadData:@""];
+- (IBAction)xinpengyou:(id)sender {
+    [self gotoexFriend];
 }
 
-- (void)FirendChange:(NSArray *_Nullable)msgList type:(NSInteger)typpe{
-    NSLog(@"fList-----:%@",msgList);
+- (void)segmentChanged:(UISegmentedControl *)sender {
+    _segIndex = sender.selectedSegmentIndex;
+    NSString *selectedTitle = [sender titleForSegmentAtIndex:_segIndex];
+    NSLog(@"Selected segment: %ld, Title: %@", (long)_segIndex, selectedTitle);
+    
+    if(_segIndex==0){
+        [self gettongxunlulist];
+    }
+    else{
+        [self getGroupList];
+    }
 }
 
 
+#pragma mark 好友列表
+
+-(void)getLocalFrends{
+    [FirendStore.shareInstance reloadAllFrinds];
+}
+
 -(void)gettongxunlulist{
-    
     [FriendNetApi getabtTongxunlus:nil succ:^(int code, NSDictionary * res) {
         self.friendlist = res[@"data"];
         NSLog(@"self.friendlist:%@",self.friendlist);
         if(self.friendlist){
+            self.showlist = [self.friendlist copy];
             [self._tableView reloadData];
             [self updataLocalFirends:self.friendlist];
         }
+        else{
+            [self getLocalFrends];
+        }
     } fail:^(NSError * _Nonnull error) {
-        ;
+        [self getLocalFrends];
     }];
 
 }
 
+
+#pragma mark 定时服务
+-(void)startTimer{
+    if(self.timer==nil){
+        self.timer = [NSTimer scheduledTimerWithTimeInterval:10 target:self selector:@selector(TimerAction) userInfo:nil repeats:YES];
+        [self.timer setFireDate:[NSDate distantPast]];
+        [[NSRunLoop currentRunLoop] addTimer:_timer forMode:NSRunLoopCommonModes];
+    }
+    
+}
+
+-(void)endTimer{
+    [self.timer invalidate];
+    self.timer = nil;
+}
+
+-(void)TimerAction{
+    //处理定时触发事件
+    [self getexfriends];
+}
+
 -(void)getexfriends{
     [FriendNetApi getvalidateList:nil succ:^(int code, NSDictionary * res) {
         NSLog(@"getvalidateList res:%@",res);
@@ -155,15 +208,6 @@
     }];
 }
 
--(void)initpopView{
-    
-   
-    UITapGestureRecognizer *gotoex = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gotoexFriend)];
-    // 将手势添加到主视图上
-    [_topBview addGestureRecognizer:gotoex];
-    
-    
-}
 
 
 -(void)gotoexFriend{
@@ -206,6 +250,60 @@
     }
 }
 
+#pragma mark  群信息数据操作
+
+#pragma mark 获取当前用户群列表
+//announcement = 1211;
+//avatar = "<null>";
+//id = 1850890333598244865;
+//inviteCheck = 0;
+//master = 66;
+//name = "\U6d4b\U8bd51";
+//openInvite = 1;
+//prohibitFriend = 0;
+//prohibition = 0;
+//userList = "<null>";
+-(void)getGroupList{
+    [FriendNetApi getGroupList:^(int code, NSDictionary * res) {
+        NSLog(@"getGrouplistData res:%@",res);
+        NSNumber *codeD = res[@"code"];
+        if([codeD intValue]==401){
+//            [[NSNotificationCenter defaultCenter] postNotificationName: nkonLogoutSucc object:nil];
+            return;
+        }
+        self.grouplist = res[@"data"];
+        self.showlist = [self.grouplist copy];
+        [self._tableView reloadData];
+        
+        [self updataLocalGrouplist:self.grouplist];
+    } fail:^(NSError * _Nonnull error) {
+        NSLog(@"error");
+    }];
+}
+
+
+-(void)getlocalGroupList{
+    [FirendStore.shareInstance reloadAllGroups];
+}
+
+
+
+#pragma mark FirendStoreDelegate
+
+- (void)FirendChange:(NSArray *_Nullable)msgList type:(NSInteger)typpe{
+    NSLog(@"fList-----:%@",msgList);
+    if(_segIndex==0){
+        self.friendlist = [msgList copy];
+        self.showlist = [self.friendlist copy];
+    }
+    else{
+        self.grouplist = [msgList copy];
+        self.showlist = [self.grouplist copy];
+    }
+    [self._tableView reloadData];
+}
+
+
 #pragma mark UITableViewDelegate
 
 -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
@@ -213,10 +311,10 @@
 }
 -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
     NSLog(@"numberOfRowsInSection:%lu",(unsigned long)self.friendlist.count);
-    return self.friendlist.count;
+    return self.showlist.count;
 }
 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
-    NSDictionary *data=self.friendlist[indexPath.row];
+    NSDictionary *data=self.showlist[indexPath.row];
     NSLog(@"cellForRowAtIndexPath:%@",data);
     if(data){
         
@@ -238,14 +336,20 @@
 
 -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
     NSLog(@"didSelectRowAtIndexPath:%@",indexPath);
+    if(_segIndex==0){
+        NSDictionary *data=self.showlist[indexPath.row];
+        UIStoryboard *board = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
+        FriendController *friendctr = [board instantiateViewControllerWithIdentifier:@"FriendController"];
+        UINavigationController *uiNavC = [[UINavigationController alloc] initWithRootViewController:friendctr];
+        uiNavC.modalPresentationStyle = UIModalPresentationFullScreen;
+        friendctr.friendMsg = data;
+        [self presentViewController :uiNavC animated:YES completion:nil];
+    }
+    else{
+        
+    }
+    
     
-    NSDictionary *data=self.friendlist[indexPath.row];
-    UIStoryboard *board = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
-    FriendController *friendctr = [board instantiateViewControllerWithIdentifier:@"FriendController"];
-    UINavigationController *uiNavC = [[UINavigationController alloc] initWithRootViewController:friendctr];
-    uiNavC.modalPresentationStyle = UIModalPresentationFullScreen;
-    friendctr.friendMsg = data;
-    [self presentViewController :uiNavC animated:YES completion:nil];
 }
 
 -(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -256,7 +360,12 @@
     if (editingStyle == UITableViewCellEditingStyleDelete) {
         // 从数据源中移除数据项
         NSLog(@"indexPath:%ld",(long)indexPath.row);
-        [self deleteFriend:indexPath.row];
+        if(_segIndex==0){
+            [self deleteFriend:indexPath.row];
+        }
+        else{
+            [self deleteGroup:indexPath.row];
+        }
         // 更新表格视图
         //[tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
     }
@@ -265,12 +374,29 @@
 -(void)deleteFriend:(NSInteger)index{
     if(self.friendlist.count>index){
         NSDictionary *dic = self.friendlist[index];
-        
         [FriendNetApi deleteTongxunlu:dic[@"id"] succ:^(int code, NSDictionary * res) {
             NSLog(@"deleteTongxunlu:%@",res);
             NSMutableArray *tempArray = [NSMutableArray arrayWithArray:self.friendlist];
             [tempArray removeObjectAtIndex:index];
             self.friendlist = tempArray;
+            self.showlist = [self.friendlist copy];
+            [self._tableView reloadData];
+            [FirendStore.shareInstance deleteAbtFirend:dic[@"id"]];
+        } fail:^(NSError * _Nonnull error) {
+            ;
+        }];
+    }
+}
+
+-(void)deleteGroup:(NSInteger)index{
+    if(self.grouplist.count>index){
+        NSDictionary *dic = self.grouplist[index];
+        [FriendNetApi exitGroup:dic[@"id"] succ:^(int code, NSDictionary * res) {
+            NSLog(@"deleteTongxunlu:%@",res);
+            NSMutableArray *tempArray = [NSMutableArray arrayWithArray:self.grouplist];
+            [tempArray removeObjectAtIndex:index];
+            self.grouplist = tempArray;
+            self.showlist = [self.friendlist copy];
             [self._tableView reloadData];
             [FirendStore.shareInstance deleteAbtFirend:dic[@"id"]];
         } fail:^(NSError * _Nonnull error) {
@@ -292,8 +418,20 @@
 
 -(void)updataLocalFirends:(NSArray *)array{
     for (NSDictionary *dic in array) {
-        [FirendStore.shareInstance reciveMsg:dic];
+        NSMutableDictionary *mtenp = [dic mutableCopy];
+        [mtenp setObject:@"0" forKey:@"type"];
+        [FirendStore.shareInstance reciveMsg:[mtenp copy]];
     }
+    [self getLocalFrends];
+}
+
+-(void)updataLocalGrouplist:(NSArray *)array{
+    for (NSDictionary *dic in array) {
+        NSMutableDictionary *mtenp = [dic mutableCopy];
+        [mtenp setObject:@"0" forKey:@"type"];
+        [FirendStore.shareInstance reciveMsg:[mtenp copy]];
+    }
+    [self getLocalFrends];
 }
     
 

+ 24 - 0
ABtong/ABtong/ALLController/friendCtr/popjiaView.h

@@ -0,0 +1,24 @@
+//
+//  popjiaView.h
+//  ABtong
+//
+//  Created by gan on 2025/10/3.
+//
+
+#ifndef popjiaView_h
+#define popjiaView_h
+
+
+#endif /* popjiaView_h */
+#import <UIKit/UIKit.h>
+
+@protocol popjiaViewDelegate <NSObject>
+@optional
+- (void)actionNote:(NSString *_Nullable)note;
+@end
+
+@interface popjiaView : UIView
+
+@property (nonatomic,weak) id <popjiaViewDelegate> delegate;
+
+@end

+ 24 - 0
ABtong/ABtong/ALLController/friendCtr/popjiaView.m

@@ -0,0 +1,24 @@
+//
+//  popjiaView.m
+//  ABtong
+//
+//  Created by gan on 2025/10/3.
+//
+
+#import <Foundation/Foundation.h>
+#import "popjiaView.h"
+
+@implementation popjiaView
+
+- (instancetype)init{
+    
+    self = [super init];
+    if (self) {
+        
+    }
+    return self;
+    
+}
+
+
+@end

+ 60 - 0
ABtong/ABtong/ALLController/friendCtr/popjiaView.xib

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" restorationIdentifier="popjiaView" id="iN0-l3-epB" customClass="PopupView">
+            <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <view alpha="0.69999999999999996" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="QqW-Rn-OHD">
+                    <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
+                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                    <color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                </view>
+                <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BaV-ZW-ddq">
+                    <rect key="frame" x="158" y="88" width="208" height="236"/>
+                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                    <subviews>
+                        <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rGW-eF-BEt">
+                            <rect key="frame" x="37" y="51" width="121" height="35"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                            <color key="backgroundColor" red="0.60392156860000001" green="0.60392156860000001" blue="0.60392156860000001" alpha="1" colorSpace="calibratedRGB"/>
+                            <state key="normal" title="Button"/>
+                            <buttonConfiguration key="configuration" style="plain" image="grxi" title="加好友">
+                                <color key="baseForegroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            </buttonConfiguration>
+                        </button>
+                        <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="l2z-FZ-0Ja">
+                            <rect key="frame" x="37" y="101" width="121" height="35"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                            <color key="backgroundColor" red="0.602715373" green="0.602715373" blue="0.60392156860000001" alpha="1" colorSpace="calibratedRGB"/>
+                            <state key="normal" title="Button"/>
+                            <buttonConfiguration key="configuration" style="plain" image="grxi" title="新增群">
+                                <color key="baseForegroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            </buttonConfiguration>
+                        </button>
+                    </subviews>
+                    <color key="backgroundColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                </view>
+            </subviews>
+            <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
+            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+            <point key="canvasLocation" x="136.64122137404578" y="20.422535211267608"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="grxi" width="20" height="20"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 18 - 0
ABtong/ABtong/ALLController/friendCtr/qunzuCtr/NewQunzuController.h

@@ -0,0 +1,18 @@
+//
+//  NewQunzuController.h
+//  AIIM
+//
+//  Created by gan on 2025/4/21.
+//
+
+#ifndef NewQunzuController_h
+#define NewQunzuController_h
+
+
+#endif /* NewQunzuController_h */
+#import <UIKit/UIKit.h>
+
+@interface NewQunzuController:UIViewController
+@property(nonatomic, strong) NSDictionary *groupMsg;
+
+@end

+ 322 - 0
ABtong/ABtong/ALLController/friendCtr/qunzuCtr/NewQunzuController.m

@@ -0,0 +1,322 @@
+//
+//  NewQunzuController.m
+//  AIIM
+//
+//  Created by gan on 2025/4/21.
+//
+
+#import <Foundation/Foundation.h>
+#import "NewQunzuController.h"
+
+#import "FriendNetApi.h"
+
+
+@interface NewQunzuController()<UIImagePickerControllerDelegate,UINavigationControllerDelegate>
+@property (weak, nonatomic) IBOutlet UIImageView *avatar;
+@property (weak, nonatomic) IBOutlet UITextField *inputName;
+@property (weak, nonatomic) IBOutlet UITableViewCell *yaoqingCell;
+@property (weak, nonatomic) IBOutlet UILabel *titleLb;
+
+@property (weak, nonatomic) IBOutlet UITableViewCell *shenheCell;
+
+@property (weak, nonatomic) IBOutlet UITableViewCell *jinyanCell;
+@property (weak, nonatomic) IBOutlet UITableViewCell *jiahaoyCell;
+@property (weak, nonatomic) IBOutlet UIButton *saveBt;
+
+@property (weak, nonatomic) IBOutlet UISwitch *yaoqingS;
+@property (weak, nonatomic) IBOutlet UISwitch *shenheS;
+
+@property (weak, nonatomic) IBOutlet UISwitch *jinyanS;
+@property (weak, nonatomic) IBOutlet UISwitch *jinjiaS;
+
+
+@property (nonatomic,strong) NSString *avatarStr;
+
+@property (nonatomic,strong) NSString *yaoqing;
+@property (nonatomic,strong) NSString *jinyan;
+@property (nonatomic,strong) NSString *jinjia;
+@property (nonatomic,strong) NSString *shenhe;
+
+
+
+@end
+
+@implementation NewQunzuController
+
+-(void)viewDidLoad{
+    [super viewDidLoad];
+    [self.navigationController setNavigationBarHidden:YES animated:NO];
+    _titleLb.text = NSLocalizedString(@"group-addNew", @"");
+    // 创建一个点击手势
+    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboard)];
+    // 将手势添加到主视图上
+    [self.view addGestureRecognizer:tap];
+    _yaoqing=@"1";
+    _jinyan=@"0";
+    _jinjia=@"0";
+    _shenhe=@"1";
+    [self initSubview];
+    [self initGData];
+}
+
+-(void)dismissKeyboard{
+    NSLog(@"dismissKeyboard");
+    [self.view endEditing:YES];
+}
+- (IBAction)gotoback:(id)sender {
+    [self dismissViewControllerAnimated:YES completion:nil];
+}
+
+- (IBAction)yaoqingC:(id)sender {
+    UISwitch *switchButton = (UISwitch*)sender;
+    BOOL isButtonOn = [switchButton isOn];
+    if(isButtonOn){
+        _yaoqing = @"1";
+    }
+    else{
+        _yaoqing = @"0";
+    }
+}
+
+- (IBAction)shenheC:(id)sender {
+    UISwitch *switchButton = (UISwitch*)sender;
+    BOOL isButtonOn = [switchButton isOn];
+    if(isButtonOn){
+        _shenhe = @"1";
+    }
+    else{
+        _shenhe = @"0";
+    }
+}
+
+- (IBAction)jinyanC:(id)sender {
+    UISwitch *switchButton = (UISwitch*)sender;
+    BOOL isButtonOn = [switchButton isOn];
+    if(isButtonOn){
+        _jinyan = @"1";
+    }
+    else{
+        _jinyan = @"0";
+    }
+}
+
+- (IBAction)jinjiaC:(id)sender {
+    UISwitch *switchButton = (UISwitch*)sender;
+    BOOL isButtonOn = [switchButton isOn];
+    if(isButtonOn){
+        _jinjia = @"1";
+    }
+    else{
+        _jinjia = @"0";
+    }
+}
+
+- (IBAction)selectImg:(id)sender {
+    [self openImagePicker];
+}
+
+
+- (IBAction)saveAct:(id)sender {
+    [self addnewGroup];
+}
+
+-(void)initSubview{
+    _yaoqingCell.contentView.layer.borderWidth = 0.5f;
+    _yaoqingCell.contentView.layer.borderColor = [UIColor lightGrayColor].CGColor; //globalColor(GCTypeGreen);
+    _yaoqingCell.contentView.layer.cornerRadius = 8.0f; // 可选,设置圆角
+    _yaoqingCell.textLabel.text =NSLocalizedString(@"NGroupCtr-kaiqiyaoq", @"开启邀请");
+    _yaoqingCell.textLabel.textColor = [UIColor whiteColor];
+    [_yaoqingS setOn:YES];
+    
+    
+    [_saveBt setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
+    [_saveBt setBackgroundColor:globalColor(GCTypeGreen)];
+    _saveBt.layer.cornerRadius = 8;
+    _saveBt.layer.masksToBounds = YES; // 防止子视图超出圆角边界
+    
+    _shenheCell.contentView.layer.borderWidth = 0.5f;
+    _shenheCell.contentView.layer.borderColor = [UIColor lightGrayColor].CGColor;
+    _shenheCell.contentView.layer.cornerRadius = 8.0f; // 可选,设置圆角
+    _shenheCell.textLabel.text =NSLocalizedString(@"NGroupCtr-ruqunxsh", @"入群需审核");
+    _shenheCell.textLabel.textColor = [UIColor whiteColor];
+    [_shenheS setOn:YES];
+    
+    _jinyanCell.contentView.layer.borderWidth = 0.5f;
+    _jinyanCell.contentView.layer.borderColor = [UIColor lightGrayColor].CGColor; //globalColor(GCTypeGreen);
+    _jinyanCell.contentView.layer.cornerRadius = 8.0f; // 可选,设置圆角
+    _jinyanCell.textLabel.text =NSLocalizedString(@"NGroupCtr-quantijy", @"全体禁言");
+    _jinyanCell.textLabel.textColor = [UIColor whiteColor];
+    [_jinyanS setOn:NO];
+    
+    _jiahaoyCell.contentView.layer.borderWidth = 0.5f;
+    _jiahaoyCell.contentView.layer.borderColor = [UIColor lightGrayColor].CGColor; //globalColor(GCTypeGreen);
+    _jiahaoyCell.contentView.layer.cornerRadius = 8.0f; // 可选,设置圆角
+    _jiahaoyCell.textLabel.text =NSLocalizedString(@"NGroupCtr-jinjiahy", @"禁加好友");
+    _jiahaoyCell.textLabel.textColor = [UIColor whiteColor];
+    [_jinjiaS setOn:NO];
+   
+}
+
+-(void)initGData{
+    _avatarStr = @"";
+    if(self.groupMsg){
+        _avatarStr = self.groupMsg[@"avatar"];
+        NSString *temp = self.groupMsg[@"name"];
+        _inputName.text = temp;
+        temp = self.groupMsg[@"openInvite"];
+        _yaoqing=temp;
+        if(temp.intValue ==1){
+            [_yaoqingS setOn:YES];
+        }
+        else{
+            [_yaoqingS setOn:NO];
+        }
+        temp = self.groupMsg[@"inviteCheck"];
+        _shenhe=temp;
+        if(temp.intValue ==1){
+            [_shenheS setOn:YES];
+        }
+        else{
+            [_shenheS setOn:NO];
+        }
+        temp = self.groupMsg[@"prohibition"];
+        _jinyan=temp;
+        if(temp.intValue ==1){
+            [_jinyanS setOn:YES];
+        }
+        else{
+            [_jinyanS setOn:NO];
+        }
+        temp = self.groupMsg[@"prohibitFriend"];
+        _jinjia=temp;
+        if(temp.intValue ==1){
+            [_jinjiaS setOn:YES];
+        }
+        else{
+            [_jinjiaS setOn:NO];
+        }
+    }
+    [_avatar sd_setImageWithURL:[NSURL URLWithString:_avatarStr] placeholderImage:[UIImage imageNamed:@"Avatar"]];
+   
+}
+
+/*
+   * 添加群组
+   * @param name 群名称
+   * @param avatar 群头像
+   * @param openInvite  是否开放邀请
+   * @param inviteCheck 加群是否需要审核
+   * @param prohibition 禁言
+   * @param prohibitFriend 是否允许加好友
+   * @param announcement 群公告
+*/
+
+-(void)addnewGroup{
+    if(self.groupMsg){
+        NSString *groupId = self.groupMsg[@"id"];
+        NSDictionary *dic = @{
+            @"name":_inputName.text,
+            @"avatar":_avatarStr,
+            @"openInvite":_yaoqing,
+            @"inviteCheck":_shenhe,
+            @"prohibition":_jinyan,
+            @"prohibitFriend":_jinjia,
+        };
+        [FriendNetApi updateGroup:dic groupId:groupId succ:^(int code, NSDictionary * res) {
+            NSLog(@"res updateGroup:%@",res);
+            NSString *codestr = res[@"code"];
+            if(codestr.intValue==200){
+                [self dismissViewControllerAnimated:YES completion:nil];
+            }
+        } fail:^(NSError * _Nonnull error) {
+            
+        }];
+    }
+    else{
+        if(_inputName.text.length>0){
+            
+            NSDictionary *dic = @{
+                @"name":_inputName.text,
+                @"avatar":_avatarStr,
+                @"openInvite":_yaoqing,
+                @"inviteCheck":_shenhe,
+                @"prohibition":_jinyan,
+                @"prohibitFriend":_jinjia,
+                @"announcement":@"",
+            };
+            [FriendNetApi addNewGroup:dic succ:^(int code, NSDictionary * res) {
+                NSLog(@"res addNewGroup:%@",res);
+                NSString *codestr = res[@"code"];
+                if(codestr.intValue==200){
+                    [self dismissViewControllerAnimated:YES completion:nil];
+                }
+            } fail:^(NSError * _Nonnull error) {
+                
+            }];
+        }
+        else{
+        }
+    }
+    
+    
+}
+
+
+#pragma  mark imagePicker
+
+- (void)openImagePicker {
+    UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
+    imagePicker.delegate = self;
+    imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; // 或者使用UIImagePickerControllerSourceTypeCamera
+    [self presentViewController:imagePicker animated:YES completion:nil];
+}
+
+
+- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info {
+    UIImage *chosenImage = info[UIImagePickerControllerEditedImage]; // 如果你设置了允许编辑,则使用这个键;否则使用UIImagePickerControllerOriginalImage
+    if (!chosenImage) {
+        chosenImage = info[UIImagePickerControllerOriginalImage];
+    }
+    // 裁剪图片,例如裁剪成一个圆形头像
+    chosenImage = [self imageWithImage:chosenImage scaledToFillSize:CGSizeMake(100, 100)]; // 假设我们想要一个100x100的圆形头像
+    [self dismissViewControllerAnimated:YES completion:nil];
+    // 现在你可以调用上传图片的方法了
+    [self uploadProfilePicture:chosenImage];
+}
+ 
+- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
+    [self dismissViewControllerAnimated:YES completion:nil];
+}
+- (UIImage *)imageWithImage:(UIImage *)image scaledToFillSize:(CGSize)size {
+    UIGraphicsBeginImageContextWithOptions(size, NO, image.scale);
+    UIBezierPath *path = [UIBezierPath bezierPathWithOvalInRect:CGRectMake(0, 0, size.width, size.height)];
+    [path addClip];
+    [image drawInRect:CGRectMake(0, 0, size.width, size.height)];
+    UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
+    UIGraphicsEndImageContext();
+    return newImage;
+}
+
+- (void)uploadProfilePicture:(UIImage *)image {
+    NSDate *now = [NSDate date];
+    NSTimeInterval trt = [now timeIntervalSince1970];
+    NSInteger time = trt*1000;
+    
+    NSString *fileName = [NSString stringWithFormat:@"%ld.png",(long)time];
+    NSData *imageData = UIImagePNGRepresentation(image);
+    [FriendNetApi upLoaddataWToken:imageData fileName:fileName succ:^(int code, NSDictionary * res) {
+        NSLog(@"res:%@",res);
+        self->_avatarStr = res[@"url"];
+        [self->_avatar sd_setImageWithURL:[NSURL URLWithString:self->_avatarStr] placeholderImage:[UIImage imageNamed:@"Avatar"]];
+    } fail:^(NSError * _Nonnull error) {
+        ;
+    }];
+    
+}
+
+#pragma mark statusBar
+- (UIStatusBarStyle)preferredStatusBarStyle{
+    return UIStatusBarStyleLightContent;
+}
+
+@end

+ 29 - 0
ABtong/ABtong/ALLController/friendCtr/qunzuCtr/QuncyCell.h

@@ -0,0 +1,29 @@
+//
+//  QuncyCell.h
+//  AIIM
+//
+//  Created by gan on 2025/4/6.
+//
+
+#ifndef QuncyCell_h
+#define QuncyCell_h
+
+
+#endif /* QuncyCell_h */
+#import <UIKit/UIKit.h>
+@protocol QuncyCellDelegate <NSObject>
+@optional
+- (void)QuncyCellAct:(NSString *_Nullable)actId act:(NSInteger)state;
+@end
+
+@interface QuncyCell : UITableViewCell
+@property (nonatomic,weak) id <QuncyCellDelegate> delegate;
+@property(nonatomic, strong) UIImageView * _Nullable avatar;
+@property(nonatomic, strong) UILabel * _Nullable name;
+@property(nonatomic, strong) UIButton * _Nullable tongyi;
+@property(nonatomic, strong) UIButton * _Nullable jujue;
+- (void)fillWithData:( NSDictionary*_Nullable)data cellType:(NSInteger)type;
+
+@property(nonatomic, strong) NSString * _Nullable actId;
+
+@end

+ 171 - 0
ABtong/ABtong/ALLController/friendCtr/qunzuCtr/QuncyCell.m

@@ -0,0 +1,171 @@
+//
+//  QuncyCell.m
+//  AIIM
+//
+//  Created by gan on 2025/4/6.
+//
+
+#import <Foundation/Foundation.h>
+#import "QuncyCell.h"
+
+
+@implementation QuncyCell
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        [self setupViews];
+    }
+    return self;
+}
+
+- (void)setupViews {
+    CGSize size = self.contentView.frame.size;
+    _avatar =[[UIImageView alloc] init];
+    _avatar.frame=CGRectMake(8, 8, 50, 50);
+    _avatar.contentMode = UIViewContentModeScaleAspectFill;
+    _avatar.layer.cornerRadius = 25;
+    _avatar.layer.masksToBounds = YES;
+    _avatar.backgroundColor=[UIColor lightGrayColor];
+    [self.contentView addSubview:_avatar];
+    
+    _name = [[UILabel alloc] init];
+    _name.frame=CGRectMake(68, 8,190, 50);
+    _name.backgroundColor=[UIColor clearColor];
+    [_name setFont:[UIFont boldSystemFontOfSize:15]];
+    _name.font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline];
+    _name.adjustsFontForContentSizeCategory = YES;
+    [_name setTextColor:[UIColor whiteColor]];
+    
+    [self.contentView addSubview:_name];
+    
+    
+    _tongyi = [[UIButton alloc] init];
+    _tongyi.frame=CGRectMake(size.width-70, 16, 50, 30);
+    _tongyi.backgroundColor =globalColor(GCTypeGreen);
+    _tongyi.layer.cornerRadius = 8;
+    _tongyi.layer.masksToBounds = YES; // 防止子视图超出圆角边界
+    _tongyi.titleLabel.font = [UIFont systemFontOfSize: 14.0];
+    [_tongyi setTitle:@"同意" forState:UIControlStateNormal];
+    _tongyi.titleLabel.textColor = [UIColor whiteColor];
+    [self.contentView addSubview:_tongyi];
+    _jujue = [[UIButton alloc] init];
+//    _jujue.frame=CGRectMake(size.width-10, 16, 50, 30);
+    _jujue.titleLabel.font = [UIFont systemFontOfSize: 14.0];
+    [_jujue setTitle:@"拒绝" forState:UIControlStateNormal];
+    _jujue.backgroundColor =globalColor(GCTypeOrangeR);
+    _jujue.layer.cornerRadius = 8;
+    _jujue.layer.masksToBounds = YES; // 防止子视图超出圆角边界
+    _jujue.titleLabel.textColor = [UIColor whiteColor];
+    [self.contentView addSubview:_jujue];
+    [_tongyi addTarget:self action:@selector(tongyiAct) forControlEvents:UIControlEventTouchUpInside];
+    [_jujue addTarget:self action:@selector(jujueAct) forControlEvents:UIControlEventTouchUpInside];
+    
+    
+    
+}
+
+- (void)fillWithData:( NSDictionary*)data cellType:(NSInteger)type{
+    [_name setTextColor:[UIColor whiteColor]];
+    [_jujue mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.equalTo(self.contentView).offset(-0);
+        make.top.equalTo(self.contentView).offset(16);
+        make.width.height.mas_equalTo(CGSizeMake(50, 30));
+    }];
+    
+    [_tongyi mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.equalTo(_jujue.mas_left).offset(-6);
+        make.top.equalTo(self.contentView).offset(16);
+        make.width.height.mas_equalTo(CGSizeMake(50, 30));
+    }];
+    if(type==0){
+        _tongyi.alpha = 0;
+        _jujue.alpha = 0;
+    }
+    else if(type==1){
+        _tongyi.alpha = 1;
+        _jujue.alpha = 1;
+        _actId =data[@"id"];
+    }
+    else if(type==2){
+        if([self ismaster:data[@"id"]]){
+            _tongyi.alpha = 0;
+            _jujue.alpha = 0;
+            [_name setTextColor:globalColor(GCTypeOrangeR)];
+        }
+        else{
+            _tongyi.alpha = 0;
+            _jujue.alpha = 1;
+            _actId =data[@"id"];
+            [_jujue setTitle:@"转让" forState:UIControlStateNormal];
+        }
+    }
+    else if(type==3){
+        _tongyi.alpha = 0;
+        _jujue.alpha = 1;
+        _actId =data[@"id"];
+        [_jujue setTitle:@"邀请" forState:UIControlStateNormal];
+    }
+    else if(type==4){
+        if([self ismaster:data[@"id"]]){
+            _tongyi.alpha = 0;
+            _jujue.alpha = 0;
+            [_name setTextColor:globalColor(GCTypeOrangeR)];
+        }
+        else{
+            _tongyi.alpha = 0;
+            _jujue.alpha = 1;
+            _actId =data[@"id"];
+            [_jujue setTitle:@"踢出" forState:UIControlStateNormal];
+        }
+        
+    }
+    
+    //NSLog(@"fillWithData:%@",data);
+    NSString *avatar =data[@"avatar"];
+    if([avatar isKindOfClass:[NSString class]]){
+        
+    }
+    else{
+        avatar = @"";
+    }
+    
+   [self.avatar sd_setImageWithURL:[NSURL URLWithString:avatar] placeholderImage:[UIImage imageNamed:@"Avatar"]];
+    if(type==1){
+        self.name.text = data[@"userName"];
+    }
+    else{
+        self.name.text = data[@"name"];
+    }
+    
+    // tell constraints they need updating
+    [self setNeedsUpdateConstraints];
+
+    // update constraints now so we can animate the change
+    [self updateConstraintsIfNeeded];
+
+    [self layoutIfNeeded];
+}
+
+-(void)tongyiAct{
+    if(self.delegate){
+        [self.delegate QuncyCellAct:_actId act:1];
+    }
+}
+
+-(void)jujueAct{
+    if(self.delegate){
+        [self.delegate QuncyCellAct:_actId act:0];
+    }
+}
+
+-(BOOL)ismaster:(NSString *)userId{
+    NSString *usid = [UDManager.shareInstance getSDManager:dkuserId];
+    if([userId isEqualToString:usid]){
+        return YES;
+    }
+    return NO;
+}
+
+
+@end

+ 22 - 0
ABtong/ABtong/ALLController/friendCtr/qunzuCtr/QuncyController.h

@@ -0,0 +1,22 @@
+//
+//  QuncyController.h
+//  AIIM
+//
+//  Created by gan on 2025/4/21.
+//
+
+#ifndef QuncyController_h
+#define QuncyController_h
+
+
+#endif /* QuncyController_h */
+#import <UIKit/UIKit.h>
+
+@interface QuncyController : UIViewController
+
+@property(nonatomic) NSInteger editType;
+@property(nonatomic,strong) NSString *groupId;
+
+
+
+@end

+ 342 - 0
ABtong/ABtong/ALLController/friendCtr/qunzuCtr/QuncyController.m

@@ -0,0 +1,342 @@
+//
+//  QuncyController.m
+//  AIIM
+//
+//  Created by gan on 2025/4/21.
+//
+
+#import <Foundation/Foundation.h>
+#import "QuncyController.h"
+#import "FriendNetApi.h"
+#import "QuncyCell.h"
+
+#import "GWebSocket.h"
+
+
+
+@interface QuncyController()<UITableViewDelegate,UITableViewDataSource,QuncyCellDelegate>
+
+@property (weak, nonatomic) IBOutlet UILabel *titleLb;
+@property (weak, nonatomic) IBOutlet UITableView *tableView;
+
+
+
+@property (strong, nonatomic) NSArray *dataList;
+@property (strong, nonatomic) NSArray *groupUserList;
+@property (strong,nonatomic) NSString *userId;
+
+@end
+
+
+@implementation QuncyController
+
+-(void)viewDidLoad{
+    [super viewDidLoad];
+    [self.navigationController setNavigationBarHidden:YES animated:NO];
+    if(self.editType==1){
+        _titleLb.text = NSLocalizedString(@"EGroupCtr-rqtitle", @"入群审核");
+    }
+    if (self.editType==2) {
+        _titleLb.text = NSLocalizedString(@"EGroupCtr-qunzhuanr", @"转让群");
+    }
+    if (self.editType==3) {
+        _titleLb.text = NSLocalizedString(@"EGroupCtr-yaoqingrq", @"邀请加入群");
+    }
+    if (self.editType==4) {
+        _titleLb.text = NSLocalizedString(@"EGroupCtr-tichuq", @"踢出群");
+    }
+    
+    NSString *userinfo = [UDManager.shareInstance getSDManager:dkuserId];
+    NSLog(@"userinfo:%@",userinfo);
+    _userId = userinfo?:@"";
+    
+    [self initFrame];
+    [self initData];
+}
+- (IBAction)gotoback:(id)sender {
+    [self dismissViewControllerAnimated:YES completion:nil];
+}
+
+
+
+-(void)initFrame{
+    [_tableView registerClass:[QuncyCell class] forCellReuseIdentifier:@"cellT"];
+    _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+    _tableView.backgroundColor = [UIColor clearColor];
+    _tableView.delegate=self;
+    _tableView.dataSource=self;
+}
+
+-(void)initData{
+    if(self.editType==1){
+        [self getshenheList];
+    }
+    else if(self.editType==2){
+        [self getGroupUserList];
+    }
+    else if(self.editType==3){
+        [self getGroupUserList];
+    }
+    else if(self.editType==4){
+        [self getGroupUserList];
+    }
+}
+
+
+#pragma mark 获取待审核入群人员
+-(void)getshenheList{
+    [FriendNetApi getshenheList:self.groupId succ:^(int code, NSDictionary * res) {
+        NSLog(@"res:%@",res);
+        self.dataList = res[@"data"];
+        [self->_tableView reloadData];
+    } fail:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+#pragma mark 获取群成员
+-(void)getGroupUserList{
+    [FriendNetApi getGroupUserList:self.groupId succ:^(int code, NSDictionary * res) {
+        if(self.editType == 3){
+            self.groupUserList = res[@"data"];
+            [self getFriendList];
+        }
+        else{
+            self.dataList = res[@"data"];
+            [self->_tableView reloadData];
+        }
+    } fail:^(NSError * _Nonnull error) {
+        
+    }];
+}
+#pragma mark 获取所有好友
+-(void)getFriendList{
+    [FriendNetApi getfriends:nil succ:^(int code, NSDictionary * res) {
+        self.dataList = res[@"data"];
+        //NSLog(@"self.friendlist:%@",self.friendlist);
+        if(self.dataList){
+            [self dowithFriendList];
+        }
+    } fail:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+-(void)dowithFriendList{
+    NSMutableArray *array = [[NSMutableArray alloc] init];
+    for (NSDictionary *item in self.dataList) {
+        NSString *fid = item[@"id"];
+        BOOL mark=YES;
+        for (NSDictionary *jtem in self.groupUserList) {
+            NSString *jid = jtem[@"id"];
+            if(fid.intValue == jid.intValue){
+                mark=NO;
+                break;
+            }
+        }
+        if(mark){
+            [array addObject:item];
+        }
+    }
+    NSLog(@"self.groupUserList:%@",self.groupUserList);
+    NSLog(@"self.dataList:%@",self.dataList);
+    self.dataList = array;
+    [self.tableView reloadData];
+}
+
+#pragma mark UITableViewDelegate
+
+-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
+    return 1;
+}
+
+-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
+    return self.dataList.count;
+}
+
+-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
+    return 70;
+}
+
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+    NSDictionary *data=self.dataList[indexPath.row];
+    NSLog(@"cellForRowAtIndexPath:%@",data);
+    if(data){
+        
+        QuncyCell *cell =[tableView dequeueReusableCellWithIdentifier:@"cellT" forIndexPath:indexPath];
+        if(cell==nil){
+            cell=[[QuncyCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cellT"];
+        }
+        cell.selectionStyle = UITableViewCellSelectionStyleNone;
+        cell.backgroundColor = [UIColor clearColor];
+        [cell fillWithData:data cellType:self.editType];
+        cell.delegate = self;
+        
+        return cell;
+    }
+    return nil;
+}
+
+-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+}
+
+-(void)QuncyCellAct:(NSString *)actId act:(NSInteger)state{
+    NSLog(@"QuncyCellAct:%@,%ld",actId,(long)state);
+    if(self.editType==1){//入群审核
+        if(state==1){//同意申请
+            [self tongyiruqunshenqing:actId];
+        }
+        else{//拒绝
+            [self jujueruqunshenqing:actId];
+        }
+    }
+    if(self.editType==2){//转让
+        [self zhuanrangqun:actId];
+    }
+    if(self.editType==3){//邀请
+        [self yaoqingruqun:actId];
+    }
+    if(self.editType==4){//踢出
+        [self tichuqun:actId];
+    }
+}
+
+
+#pragma mark net acttion
+//
+-(void)tongyiruqunshenqing:(NSString *)userid{
+    [FriendNetApi Checkagree:userid succ:^(int code, NSDictionary * res) {
+        //发送通知
+        NSString *coder = res[@"code"];
+        if(coder.intValue==200){
+            [self sendNote];
+        }
+        //更新列表
+        [self initData];
+    } fail:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+-(void)jujueruqunshenqing:(NSString *)userid{
+    [FriendNetApi Checkrefuse:userid succ:^(int code, NSDictionary * res) {
+        //更新列表
+        [self initData];
+    } fail:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+-(void)zhuanrangqun:(NSString *)userid{
+    // 创建弹框询问
+    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示"
+                                                                 message:@"是否转让群?"
+                                                          preferredStyle:UIAlertControllerStyleAlert];
+    // 创建取消按钮和确定按钮,并添加到弹框中
+    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
+        NSLog(@"用户点击了取消");
+    }];
+    UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
+        NSLog(@"用户点击了确定");
+        [FriendNetApi transferGroup:self.groupId userId:userid succ:^(int code, NSDictionary * res) {
+            NSString *coder = res[@"code"];
+            if(coder.intValue==200){
+                [self dismissViewControllerAnimated:YES completion:nil];
+            }
+        } fail:^(NSError * _Nonnull error) {
+            
+        }];
+    }];
+    [alert addAction:cancelAction];
+    [alert addAction:okAction];
+    // 显示弹框
+    [self presentViewController:alert animated:YES completion:nil];
+}
+
+-(void)yaoqingruqun:(NSString *)userid{
+    NSArray *userlds = @[userid];
+    //NSString *userlds = [NSString stringWithFormat:@"[%@]",userid];
+    NSDictionary *dic = @{
+        @"userIds":userlds,
+        @"groupId":self.groupId
+    };
+    [FriendNetApi addUsertoGroup:dic groupId:nil succ:^(int code, NSDictionary * res) {
+        NSLog(@"res%@",res);
+        NSString *coder =res[@"code"];
+        if(coder.intValue==200){
+            NSMutableArray *array = [[NSMutableArray alloc] init];
+            for (NSDictionary *item in self.dataList) {
+                NSString *fid = item[@"id"];
+                if(userid.intValue!=fid.intValue){
+                    [array addObject:item];
+                }
+            }
+            self.dataList = array;
+            [self.tableView reloadData];
+        }
+    } fail:^(NSError * _Nonnull error) {
+        NSLog(@"error:%@",error);
+    }];
+}
+
+-(void)tichuqun:(NSString *)userid{
+    // 创建弹框询问
+    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示"
+                                                                 message:@"是否剔除用户出群?"
+                                                          preferredStyle:UIAlertControllerStyleAlert];
+    // 创建取消按钮和确定按钮,并添加到弹框中
+    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
+        NSLog(@"用户点击了取消");
+    }];
+    UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
+        NSLog(@"用户点击了确定");
+        [FriendNetApi getoutUserGroup:self.groupId userId:userid succ:^(int code, NSDictionary * res) {
+            [self initData];
+        } fail:^(NSError * _Nonnull error) {
+            
+        }];
+    }];
+    [alert addAction:cancelAction];
+    [alert addAction:okAction];
+    // 显示弹框
+    [self presentViewController:alert animated:YES completion:nil];
+}
+
+
+-(void)sendNote{
+   
+    NSDate *now = [NSDate date];
+    NSTimeInterval trt = [now timeIntervalSince1970];
+    NSInteger time = trt*1000;
+    NSString *strtime = [NSString stringWithFormat:@"%ld",(long)time];
+   
+    NSString *content = @"有新用户入群";
+    NSDictionary *callMsg = @{
+        @"code":SendCode_MESSAGE,
+        @"message": @{
+            @"chatId":self.groupId,
+            @"fromId":self.userId,
+            @"type":@"1",
+            @"mine":@"ture",
+            @"content":content,
+            @"timestamp":strtime,
+            @"messageType":MessageType_event
+        }
+    };
+    NSError *error;
+    NSData *jsonData = [NSJSONSerialization dataWithJSONObject:callMsg options:0 error:&error];
+    if (!jsonData) {
+        NSLog(@"Got an error: %@", error);
+    } else {
+        NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
+        NSLog(@"%@", jsonString); // 输出: {"name":"John","age":25}
+        [GWebSocket.shareInstance sendMsg:jsonString];
+    }
+}
+
+#pragma mark statusBar
+- (UIStatusBarStyle)preferredStatusBarStyle{
+    return UIStatusBarStyleLightContent;
+}
+@end

+ 19 - 0
ABtong/ABtong/ALLController/friendCtr/qunzuCtr/QunzuController.h

@@ -0,0 +1,19 @@
+//
+//  QunzuController.h
+//  AIIM
+//
+//  Created by qin on 2025/9/21.
+//
+
+#ifndef QunzuController_h
+#define QunzuController_h
+
+
+#endif /* QunzuController_h */
+#import <UIKit/UIKit.h>
+@interface QunzuController : UIViewController
+
+@property(nonatomic, strong) NSDictionary *groupMsg;
+@property(nonatomic, strong) NSString *groupId;
+
+@end

+ 746 - 0
ABtong/ABtong/ALLController/friendCtr/qunzuCtr/QunzuController.m

@@ -0,0 +1,746 @@
+//
+//  QunzuController.m
+//  AIIM
+//
+//  Created by gan on 2025/4/21.
+//
+
+#import <Foundation/Foundation.h>
+#import "QunzuController.h"
+#import "FriendNetApi.h"
+#import <SDWebImage/UIImageView+WebCache.h>
+#import "ChatController.h"
+#import "ChatListStore.h"
+
+#import "NewQunzuController.h"
+#import "QuncyController.h"
+
+#import "ChatHistoryController.h"
+
+
+@interface QunzuController()<UITableViewDelegate,UITableViewDataSource,UICollectionViewDelegate,UICollectionViewDataSource>
+@property (weak, nonatomic) IBOutlet UICollectionView *collView;
+@property (weak, nonatomic) IBOutlet UITableView *tableView;
+@property (weak, nonatomic) IBOutlet UIScrollView *ctScrollView;
+@property (weak, nonatomic) IBOutlet UILabel *bartitleLb;
+@property (weak, nonatomic) IBOutlet UIButton *rightBt;
+
+
+@property (nonatomic,strong) NSMutableArray *cellDatas;
+@property (nonatomic,strong) NSMutableArray *collDatas;
+@property (nonatomic,strong) NSString *master;
+@property (nonatomic) BOOL ismaster;
+@property (nonatomic) BOOL reloadMsg;
+@property (nonatomic, strong) NSDictionary * noDisturbDict;
+@end
+
+@implementation QunzuController
+
+-(void)viewDidLoad{
+    [super viewDidLoad];
+    [self.navigationController setNavigationBarHidden:YES animated:NO];
+    _bartitleLb.text = @"";
+    _reloadMsg=NO;
+    _cellDatas = [[NSMutableArray alloc] init];
+    _collDatas = [[NSMutableArray alloc] init];
+    _rightBt.alpha = 0;
+    if(self.groupMsg){
+        [self initData];
+        [self getNoDiturbSettingData];
+    }
+    else{
+        if(self.groupId){
+            [self getNetGroupMsg];
+        }
+    }
+    [self initSubView];
+}
+
+-(void)viewWillAppear:(BOOL)animated{
+    [super viewWillAppear:YES];
+    if(_reloadMsg){
+        [self getNetGroupMsg];
+    }
+}
+
+-(void)viewDidDisappear:(BOOL)animated{
+    [super viewDidDisappear:YES];
+    _reloadMsg=YES;
+}
+
+
+-(void)initData{
+    
+    _ismaster=NO;
+    
+    if (self.groupMsg) {
+        _master = self.groupMsg[@"master"]?:@"";
+        _groupId =self.groupMsg[@"id"];
+        NSString *userId = [UDManager.shareInstance getSDManager:dkuserId];
+        if ([_master isEqualToString:userId]) {
+            _ismaster=YES;
+            _rightBt.alpha = 1;
+        }
+    }
+    _bartitleLb.text = self.groupMsg[@"name"];
+    
+    NSDictionary *d1 =@{
+        @"name":@"GroupCtr-xiaoximdr",
+        @"image":@"noDisturb_chat_icon",
+    };
+    NSDictionary *d2 =@{
+        @"name":@"GroupCtr-ruquanshe",
+        @"image":@"check_group_icon",
+    };
+    NSDictionary *d3 =@{
+        @"name":@"GroupCtr-zhuanrangq",
+        @"image":@"transfer_group_icon",
+    };
+    NSDictionary *d4 =@{
+        @"name":@"GroupCtr-liaotianjl",
+        @"image":@"record_chat_icon",
+    };
+    NSDictionary *d5 =@{
+        @"name":@"GroupCtr-gonggao",
+        @"image":@"announce_group_icon",
+    };
+    NSDictionary *d6 =@{
+        @"name":@"GroupCtr-liaotian",
+        @"image":@"wzhuxiaozz",
+    };
+    
+    NSString *d7name = @"GroupCtr-tuichuql";
+    if(_ismaster){
+        d7name = @"GroupCtr-jiesanquz";
+    }
+    
+    NSDictionary *d7 =@{
+        @"name":d7name,
+        @"image":@"wzhuxiaozz",
+    };
+    
+    
+    [_cellDatas removeAllObjects];
+    
+    if(_ismaster){
+        [_cellDatas addObject:d2];
+        [_cellDatas addObject:d3];
+    }
+    [_cellDatas addObject:d4];
+    [_cellDatas addObject:d5];
+    [_cellDatas addObject:d1];
+    [_cellDatas addObject:d6];
+    [_cellDatas addObject:d7];
+    
+    
+    [self getGroupUsers];
+}
+
+-(void)getNetGroupMsg{
+    [FriendNetApi getGroupInfo:self.groupId succ:^(int code, NSDictionary * res) {
+        NSLog(@"res:%@",res);
+        self.groupMsg = [self replaceNullsWithEmptyStringInDictionary:res[@"data"]];
+        [self initData];
+        [self getNoDiturbSettingData];
+        [self.tableView reloadData];
+    } fail:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+-(void)getNoDiturbSettingData{
+    [FriendNetApi getNoDisturbSetting:self.groupMsg[@"id"] succ:^(int code, NSDictionary * _Nullable result) {
+        NSLog(@"noDisturbSetting:-----%@",result);
+        NSArray * dataArray = result[@"data"];
+        if (dataArray.count!=0) {
+            self.noDisturbDict = dataArray[0];
+        }
+        [self.tableView reloadData];
+    } fail:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+- (void)saveNoDisturbSetting{
+    NSDictionary * param = @{
+        @"userId":self.groupMsg[@"id"],
+        @"chatId":self.groupMsg[@"id"]
+    };
+    [FriendNetApi saveNoDisturbSetting:param succ:^(int code, NSDictionary * _Nullable result) {
+        [MBProgressHUD showWithText:result[@"msg"]];
+    } fail:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+- (void)cancelNoDisturbSetting{
+    [FriendNetApi cancelNoDisturbSettingWithUserId:self.groupMsg[@"id"] chatId:self.groupMsg[@"id"] succ:^(int code, NSDictionary * _Nullable result) {
+        [MBProgressHUD showWithText:result[@"msg"]];
+    } fail:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+-(void)initSubView{
+    [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cellT"];
+    [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cellTT"];
+    [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cellTT3"];
+    _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+    _tableView.backgroundColor = [UIColor clearColor];
+    _tableView.delegate = self;
+    _tableView.dataSource = self;
+    _tableView.scrollEnabled = NO;
+    
+    UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
+    layout.scrollDirection = UICollectionViewScrollDirectionVertical; // 设置垂直流布局
+    CGFloat width = _collView.frame.size.width;
+    width=(width-20)/3;
+    layout.itemSize = CGSizeMake(width, width); // 设置每个item的大小
+    layout.minimumInteritemSpacing = 5; // 设置单元格之间的间距
+    [_collView setCollectionViewLayout:layout];
+    [_collView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"collT"];
+    [_collView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"collTT"];
+    _collView.dataSource = self;
+    _collView.delegate = self;
+    _collView.backgroundColor = [UIColor clearColor];
+    _ctScrollView.showsVerticalScrollIndicator =NO;
+    _ctScrollView.backgroundColor = [UIColor clearColor];
+       
+}
+
+-(void)resetframe{
+    NSLog(@"_ismaster");
+    CGFloat tableH = _cellDatas.count*62;
+    NSInteger row =_collDatas.count/3;
+    
+    if(_ismaster){
+        NSLog(@"_ismaster11-----");
+        row =(_collDatas.count+2)/3;
+        if((_collDatas.count+2)>row*3) {
+            row=row+1;
+        }
+    }
+    else{
+        NSString *openInvite = self.groupMsg[@"openInvite"];
+        if(openInvite.intValue==1){
+            row =(_collDatas.count+1)/3;
+            if((_collDatas.count+1)>row*3) {
+                row=row+1;
+            }
+        }
+        else{
+            row =_collDatas.count/3;
+            if(_collDatas.count>row*3) {
+                row=row+1;
+            }
+        }
+    }
+    
+    CGFloat width = _collView.frame.size.width;
+    width=(width-20)/3;
+    
+    CGFloat collVH = row*(width+10);
+    
+    CGRect r = _collView.frame;
+    r.origin.x =0.0f;
+    r.origin.y = 0.0f;
+    r.size.height = collVH;
+    _collView.frame = r;
+    
+    CGRect t = _tableView.frame;
+    t.origin.x =0.0f;
+    t.origin.y = collVH +10.0f;
+    t.size.height = tableH;
+    _tableView.frame = t;
+    
+    _ctScrollView.contentSize = CGSizeMake(_ctScrollView.frame.size.width, tableH+collVH+20);
+    [_collView reloadData];
+    [_tableView reloadData];
+}
+
+- (IBAction)gotoBack:(id)sender {
+    [self dismissViewControllerAnimated:YES completion:nil];
+}
+- (IBAction)rightBt:(id)sender {
+    UIStoryboard *board = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
+    NewQunzuController *groupctr = [board instantiateViewControllerWithIdentifier:@"NewQunzuController"];
+    groupctr.groupMsg = self.groupMsg;
+    UINavigationController *uiNavC = [[UINavigationController alloc] initWithRootViewController:groupctr];
+    uiNavC.modalPresentationStyle = UIModalPresentationFullScreen;
+    [self presentViewController :uiNavC animated:YES completion:nil];
+}
+
+- (void)switchAction:(id)sender {
+    UISwitch *switchButton = (UISwitch*)sender;
+    BOOL isButtonOn = [switchButton isOn];
+    if (isButtonOn) {
+        // 处理开关打开的情况
+        NSLog(@"isButtonOn");
+        [self saveNoDisturbSetting];
+    } else {
+        // 处理开关关闭的情况
+        NSLog(@"isButtonOff");
+        [self cancelNoDisturbSetting];
+    }
+}
+
+#pragma mark UICollectionViewDelegate
+
+-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
+    return 1;
+}
+
+-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
+    if(_ismaster){
+        return self.collDatas.count +2;
+    }
+    else{
+        NSString *openInvite = self.groupMsg[@"openInvite"];
+        if(openInvite.intValue==1){
+            return self.collDatas.count +1;
+        }
+        else{
+            return self.collDatas.count;
+        }
+        
+    }
+}
+
+- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
+    
+    // 配置cell的内容
+    if(indexPath.row==self.collDatas.count){
+        UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"collTT" forIndexPath:indexPath];
+        CGFloat width = cell.frame.size.width;
+        UIImageView *img = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"jiaqun"]];
+        [cell addSubview:img];
+        img.contentMode = UIViewContentModeScaleAspectFill;
+        img.frame = CGRectMake(20, 0, width-40, width-40);
+        img.layer.cornerRadius = (width-40)/2;
+        img.layer.masksToBounds = YES;
+        img.backgroundColor=[UIColor lightGrayColor];
+        cell.backgroundColor=[UIColor clearColor];
+        return cell;
+    }
+    else if(indexPath.row==self.collDatas.count+1){
+        UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"collTT" forIndexPath:indexPath];
+        CGFloat width = cell.frame.size.width;
+        UIImageView *img = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"tichuqun"]];
+        [cell addSubview:img];
+        img.contentMode = UIViewContentModeScaleAspectFill;
+        img.frame = CGRectMake(20, 0, width-40, width-40);
+        img.layer.cornerRadius = (width-40)/2;
+        img.layer.masksToBounds = YES;
+        img.backgroundColor=[UIColor lightGrayColor];
+        cell.backgroundColor=[UIColor clearColor];
+        return cell;
+    }
+    else{
+       
+        UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"collT" forIndexPath:indexPath];
+        
+        NSArray *array = cell.contentView.subviews;
+        for (id sbv in array) {
+            [sbv removeFromSuperview];
+        }
+        NSDictionary *dic = self.collDatas[indexPath.row];
+        CGFloat width = cell.frame.size.width;
+        UIImageView *img = [[UIImageView alloc] init];
+        [cell.contentView addSubview:img];
+        [img sd_setImageWithURL:[NSURL URLWithString:dic[@"avatar"]] placeholderImage:[UIImage imageNamed:@"Avatar"]];
+        img.contentMode = UIViewContentModeScaleAspectFill;
+        img.frame = CGRectMake(20, 0, width-40, width-40);
+        img.layer.cornerRadius = (width-40)/2;
+        img.layer.masksToBounds = YES;
+        img.backgroundColor=[UIColor lightGrayColor];
+        
+        UILabel *name = [[UILabel alloc] init];
+        name.text = dic[@"name"];
+        [cell.contentView addSubview:name];
+        name.frame = CGRectMake(0, width-40, width, 30.0f);
+        name.textAlignment = NSTextAlignmentCenter;
+        if([_master isEqualToString:dic[@"id"]]){
+            name.textColor = globalColor(GCTypeOrangeR);
+            name.font = [UIFont systemFontOfSize:15.0f];
+        }
+        else{
+            name.textColor = [UIColor whiteColor];
+            name.font = [UIFont systemFontOfSize:14.0f];
+        }
+        cell.backgroundColor=[UIColor clearColor];
+        return cell;
+    }
+    return nil;
+}
+
+-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
+    if(indexPath.row==self.collDatas.count){//邀请加入群
+        UIStoryboard *board = [UIStoryboard storyboardWithName:@"groupstory" bundle:[NSBundle mainBundle]];
+        QuncyController *chatctr = [board instantiateViewControllerWithIdentifier:@"QuncyController"];
+        UINavigationController *uiNavC = [[UINavigationController alloc] initWithRootViewController:chatctr];
+        uiNavC.modalPresentationStyle = UIModalPresentationFullScreen;
+        chatctr.editType = 3;
+        chatctr.groupId = self.groupMsg[@"id"];
+        [self presentViewController :uiNavC animated:YES completion:nil];
+        
+    }else if(indexPath.row==self.collDatas.count+1){//踢出群
+        UIStoryboard *board = [UIStoryboard storyboardWithName:@"groupstory" bundle:[NSBundle mainBundle]];
+        QuncyController *chatctr = [board instantiateViewControllerWithIdentifier:@"QuncyController"];
+        UINavigationController *uiNavC = [[UINavigationController alloc] initWithRootViewController:chatctr];
+        uiNavC.modalPresentationStyle = UIModalPresentationFullScreen;
+        chatctr.editType = 4;
+        chatctr.groupId = self.groupMsg[@"id"];
+        [self presentViewController :uiNavC animated:YES completion:nil];
+    }
+    
+    NSLog(@"");
+}
+
+
+#pragma mark UITableViewDelegate
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    NSInteger section =indexPath.section;
+    NSDictionary *time =_cellDatas[section];
+    NSString *cellT =@"cellT";
+    if(section>_cellDatas.count-3){
+        cellT =@"cellTT";
+        UITableViewCell *cell =[tableView dequeueReusableCellWithIdentifier:cellT forIndexPath:indexPath];
+        if(cell==nil){
+            cell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellT];
+        }
+        cell.selectionStyle = UITableViewCellSelectionStyleNone;
+        cell.backgroundColor = [UIColor clearColor];
+        cell.contentView.layer.borderWidth = 0.5f;
+        cell.contentView.layer.borderColor = [UIColor lightGrayColor].CGColor; //globalColor(GCTypeGreen);
+        cell.contentView.layer.cornerRadius = 8.0f; // 可选,设置圆角
+        if(section==_cellDatas.count-1){
+            cell.contentView.backgroundColor = globalColor(GCTypeOrangeR);
+        }
+        else{
+            cell.contentView.backgroundColor = globalColor(GCTypeGreen);
+            
+        }
+        
+        cell.textLabel.text =NSLocalizedString(time[@"name"], @"");
+        cell.textLabel.textAlignment = NSTextAlignmentCenter;
+        
+        return cell;
+    }
+    else if(indexPath.section == self.cellDatas.count-3){
+        cellT =@"cellTT3";
+        UITableViewCell *cell =[tableView dequeueReusableCellWithIdentifier:cellT forIndexPath:indexPath];
+        if(cell==nil){
+            cell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellT];
+        }
+        cell.selectionStyle = UITableViewCellSelectionStyleNone;
+        cell.backgroundColor = [UIColor clearColor];
+        NSString *title = NSLocalizedString(time[@"name"], @"");
+        
+        cell.imageView.image = [UIImage imageNamed:time[@"image"]];
+        cell.textLabel.text =title;
+        cell.textLabel.textColor = [UIColor whiteColor];
+        CGRect ctfrm = cell.contentView.frame;
+        UISwitch * stateSwitch = [[UISwitch alloc] initWithFrame:CGRectMake(ctfrm.size.width-66, 10, 20, 10)];
+        stateSwitch.onImage = kImageMake(@"switch_on");
+        stateSwitch.offImage = kImageMake(@"switch_off");
+        
+        if (self.noDisturbDict && [self.noDisturbDict jk_hasKey:@"id"]) {
+            [stateSwitch setOn:YES];
+        }else{
+            [stateSwitch setOn:NO];
+        }
+        [stateSwitch addTarget:self action:@selector(switchAction:) forControlEvents:UIControlEventValueChanged];
+        [cell.contentView addSubview:stateSwitch];
+        cell.contentView.layer.borderWidth = 0.5f;
+        cell.contentView.layer.borderColor = [UIColor lightGrayColor].CGColor; //globalColor(GCTypeGreen);
+        cell.contentView.layer.cornerRadius = 8.0f; // 可选,设置圆角
+        return cell;
+    }
+    else{
+        UITableViewCell *cell =[tableView dequeueReusableCellWithIdentifier:cellT forIndexPath:indexPath];
+        if(cell==nil){
+            cell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellT];
+        }
+        cell.selectionStyle = UITableViewCellSelectionStyleNone;
+        cell.backgroundColor = [UIColor clearColor];
+        NSString *title = NSLocalizedString(time[@"name"], @"");
+        
+        cell.imageView.image = [UIImage imageNamed:time[@"image"]];
+        cell.textLabel.text =title;
+        cell.textLabel.textColor = [UIColor whiteColor];
+        CGRect ctfrm = cell.contentView.frame;
+        UIImageView *right = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"arrow-right"]];
+        right.frame = CGRectMake(ctfrm.size.width-30, 21, 20, 20);
+        [cell.contentView addSubview:right];
+        cell.contentView.layer.borderWidth = 0.5f;
+        cell.contentView.layer.borderColor = [UIColor lightGrayColor].CGColor; //globalColor(GCTypeGreen);
+        cell.contentView.layer.cornerRadius = 8.0f; // 可选,设置圆角
+        return cell;
+    }
+    
+
+}
+-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+    if(_ismaster){//群主
+        if(indexPath.section == 0){
+            [self gotoRuqunshenhe];
+        }
+        if(indexPath.section == 1){
+            [self zhuanrangqun];
+        }
+        if(indexPath.section == 2){
+            [self gotoLiaotianjilu];
+        }
+        if(indexPath.section == 3){
+            [self gotoGonggao];
+        }
+        
+        if(indexPath.section == 5){
+            [self gotoChart];
+        }
+        if(indexPath.section == 6){
+            [self jiesanqun];
+        }
+    }
+    else{//非群主
+        if(indexPath.section == 0){
+            [self gotoLiaotianjilu];
+        }
+        if(indexPath.section == 1){
+            [self gotoGonggao];
+        }
+        
+        if(indexPath.section == 3){
+            [self gotoChart];
+        }
+        if(indexPath.section == 4){
+            [self tuichuqun];
+        }
+    }
+}
+
+-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
+    return 1;
+}
+
+-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
+    return _cellDatas.count;
+}
+
+-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
+    return 52.0;
+}
+
+-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
+    CGFloat height =10.0;
+    if(section==0){
+        height =0.0;
+    }
+    return height;
+}
+
+-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
+    CGFloat height =10.0;
+    if(section==0){
+        height =0.0;
+    }
+    UIView *view =[[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, height)];
+    view.backgroundColor = [UIColor clearColor];
+    return view;
+}
+
+
+-(void)getGroupUsers{
+    NSLog(@"self.groupMsg:%@",self.groupMsg);
+    if (self.groupMsg) {
+        [FriendNetApi getGroupUserList:self.groupMsg[@"id"] succ:^(int code, NSDictionary *res) {
+            NSLog(@"res:%@",res);
+            self.collDatas = [NSMutableArray arrayWithArray:[self replaceNullsWithEmptyStringInArray:res[@"data"]]];
+            [self resetframe];
+        } fail:^(NSError * _Nonnull error) {
+            NSLog(@"errer");
+        }];
+    }
+}
+
+#pragma mark 入群审核
+-(void)gotoRuqunshenhe{
+    UIStoryboard *board = [UIStoryboard storyboardWithName:@"qunStoryboard" bundle:[NSBundle mainBundle]];
+    QuncyController *chatctr = [board instantiateViewControllerWithIdentifier:@"QuncyController"];
+    UINavigationController *uiNavC = [[UINavigationController alloc] initWithRootViewController:chatctr];
+    uiNavC.modalPresentationStyle = UIModalPresentationFullScreen;
+    chatctr.editType = 1;
+    chatctr.groupId = self.groupMsg[@"id"];
+    [self presentViewController :uiNavC animated:YES completion:nil];
+}
+#pragma mark 转让群
+-(void)zhuanrangqun{
+    UIStoryboard *board = [UIStoryboard storyboardWithName:@"qunStoryboard" bundle:[NSBundle mainBundle]];
+    QuncyController *chatctr = [board instantiateViewControllerWithIdentifier:@"QuncyController"];
+    UINavigationController *uiNavC = [[UINavigationController alloc] initWithRootViewController:chatctr];
+    uiNavC.modalPresentationStyle = UIModalPresentationFullScreen;
+    chatctr.editType = 2;
+    chatctr.groupId = self.groupMsg[@"id"];
+    [self presentViewController :uiNavC animated:YES completion:nil];
+}
+
+#pragma mark 聊天记录
+-(void)gotoLiaotianjilu{
+    UIStoryboard *board = [UIStoryboard storyboardWithName:@"ChatHistory" bundle:[NSBundle mainBundle]];
+    ChatHistoryController *chatctr = [board instantiateViewControllerWithIdentifier:@"ChatHistoryController"];
+    UINavigationController *uiNavC = [[UINavigationController alloc] initWithRootViewController:chatctr];
+    uiNavC.modalPresentationStyle = UIModalPresentationFullScreen;
+    chatctr.chatId = self.groupMsg[@"id"];
+    chatctr.type = 1;
+    chatctr.titlename = self.groupMsg[@"name"];
+    chatctr.avatar = self.groupMsg[@"avatar"];
+    [self presentViewController :uiNavC animated:YES completion:nil];
+}
+#pragma mark 公告
+-(void)gotoGonggao{
+//    UIStoryboard *board = [UIStoryboard storyboardWithName:@"groupstory" bundle:[NSBundle mainBundle]];
+//    GroupGonggaoController *chatctr = [board instantiateViewControllerWithIdentifier:@"GroupGonggaoController"];
+//    UINavigationController *uiNavC = [[UINavigationController alloc] initWithRootViewController:chatctr];
+//    uiNavC.modalPresentationStyle = UIModalPresentationFullScreen;
+//    chatctr.groupId = self.groupMsg[@"id"];
+//    chatctr.gonggao =self.groupMsg[@"announcement"];
+//    if(_ismaster){
+//        chatctr.editType = 1;
+//    }
+//    else{
+//        chatctr.editType = 2;
+//    }
+//    
+//    [self presentViewController :uiNavC animated:YES completion:nil];
+}
+
+#pragma mark 消息免打扰
+-(void)changeXiaoximdr{
+    
+}
+
+
+#pragma mark 聊天
+-(void)gotoChart{
+    UIStoryboard *board = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
+    
+    ChatController *chatctr = [board instantiateViewControllerWithIdentifier:@"ChatController"];
+    
+    UINavigationController *uiNavC = [[UINavigationController alloc] initWithRootViewController:chatctr];
+    
+    uiNavC.modalPresentationStyle = UIModalPresentationFullScreen;
+    
+    chatctr.chatId = self.groupMsg[@"id"];
+    chatctr.type = 1;
+    ChatListStore.shareInstance.chatId =self.groupMsg[@"id"];
+    chatctr.titlename = self.groupMsg[@"name"];
+    chatctr.avatar = self.groupMsg[@"avatar"];
+    [self presentViewController :uiNavC animated:YES completion:nil];
+}
+
+#pragma mark 退出群
+-(void)tuichuqun{
+    // 创建弹框询问
+    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示"
+                                                                 message:@"是否确认退出群?"
+                                                          preferredStyle:UIAlertControllerStyleAlert];
+    // 创建取消按钮和确定按钮,并添加到弹框中
+    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
+        NSLog(@"用户点击了取消");
+    }];
+    UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
+        NSLog(@"用户点击了确定");
+        [FriendNetApi exitGroup:self.groupId succ:^(int code, NSDictionary * res) {
+            NSString *coder = res[@"code"];
+            if(coder.intValue==200){
+                [self dismissViewControllerAnimated:YES completion:nil];
+            }
+        } fail:^(NSError * _Nonnull error) {
+            
+        }];
+    }];
+    [alert addAction:cancelAction];
+    [alert addAction:okAction];
+    // 显示弹框
+    [self presentViewController:alert animated:YES completion:nil];
+}
+
+#pragma mark 解散群
+-(void)jiesanqun{
+    // 创建弹框询问
+    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示"
+                                                                 message:@"是否确认解散群?"
+                                                          preferredStyle:UIAlertControllerStyleAlert];
+    // 创建取消按钮和确定按钮,并添加到弹框中
+    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
+        NSLog(@"用户点击了取消");
+    }];
+    UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
+        NSLog(@"用户点击了确定");
+        [FriendNetApi deleteGroup:self.groupId succ:^(int code, NSDictionary * res) {
+            NSString *coder = res[@"code"];
+            if(coder.intValue==200){
+                [self dismissViewControllerAnimated:YES completion:nil];
+            }
+        } fail:^(NSError * _Nonnull error) {
+            
+        }];
+    }];
+    [alert addAction:cancelAction];
+    [alert addAction:okAction];
+    // 显示弹框
+    [self presentViewController:alert animated:YES completion:nil];
+}
+
+#pragma mark statusBar
+- (UIStatusBarStyle)preferredStatusBarStyle{
+    return UIStatusBarStyleLightContent;
+}
+
+#pragma mark 工具
+// 递归替换字典中的 NSNull 为 @""
+- (NSDictionary *)replaceNullsWithEmptyStringInDictionary:(NSDictionary *)dictionary {
+    NSMutableDictionary *mutableDict = [NSMutableDictionary dictionaryWithDictionary:dictionary];
+    
+    for (id key in [mutableDict allKeys]) {
+        id value = [mutableDict objectForKey:key];
+        
+        if ([value isKindOfClass:[NSNull class]]) {
+            [mutableDict setObject:@"" forKey:key];
+        } else if ([value isKindOfClass:[NSDictionary class]]) {
+            // 递归处理子字典
+            [mutableDict setObject:[self replaceNullsWithEmptyStringInDictionary:value] forKey:key];
+        } else if ([value isKindOfClass:[NSArray class]]) {
+            // 递归处理数组
+            [mutableDict setObject:[self replaceNullsWithEmptyStringInArray:value] forKey:key];
+        }
+    }
+    
+    return [NSDictionary dictionaryWithDictionary:mutableDict];
+}
+
+// 递归替换数组中的 NSNull 为 @""
+- (NSArray *)replaceNullsWithEmptyStringInArray:(NSArray *)array {
+    NSMutableArray *mutableArray = [NSMutableArray arrayWithArray:array];
+    
+    for (NSInteger i = 0; i < [mutableArray count]; i++) {
+        id value = [mutableArray objectAtIndex:i];
+        
+        if ([value isKindOfClass:[NSNull class]]) {
+            [mutableArray replaceObjectAtIndex:i withObject:@""];
+        } else if ([value isKindOfClass:[NSDictionary class]]) {
+            // 递归处理子字典
+            [mutableArray replaceObjectAtIndex:i withObject:[self replaceNullsWithEmptyStringInDictionary:value]];
+        } else if ([value isKindOfClass:[NSArray class]]) {
+            // 递归处理子数组
+            [mutableArray replaceObjectAtIndex:i withObject:[self replaceNullsWithEmptyStringInArray:value]];
+        }
+    }
+    
+    return [NSArray arrayWithArray:mutableArray];
+}
+
+@end

+ 298 - 0
ABtong/ABtong/ALLController/friendCtr/qunzuCtr/qunStoryboard.storyboard

@@ -0,0 +1,298 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
+        <capability name="collection view cell content view" minToolsVersion="11.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--Qunzu Controller-->
+        <scene sceneID="65d-xs-lZr">
+            <objects>
+                <viewController storyboardIdentifier="QunzuController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="CsL-Nd-CNs" customClass="QunzuController" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="cb9-jr-PxQ">
+                        <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="bgset" translatesAutoresizingMaskIntoConstraints="NO" id="mF3-Ln-5O5">
+                                <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                            </imageView>
+                            <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="RtO-CM-mZd">
+                                <rect key="frame" x="16" y="111" width="349" height="707"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                <subviews>
+                                    <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="je2-oh-K8N">
+                                        <rect key="frame" x="-6" y="8" width="361" height="128"/>
+                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                        <collectionViewFlowLayout key="collectionViewLayout" automaticEstimatedItemSize="YES" minimumLineSpacing="10" minimumInteritemSpacing="10" id="TLn-xA-pAY">
+                                            <size key="itemSize" width="128" height="128"/>
+                                            <size key="headerReferenceSize" width="0.0" height="0.0"/>
+                                            <size key="footerReferenceSize" width="0.0" height="0.0"/>
+                                            <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                        </collectionViewFlowLayout>
+                                        <cells>
+                                            <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="RRF-aO-LVA">
+                                                <rect key="frame" x="0.0" y="0.0" width="128" height="128"/>
+                                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                <collectionViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="qet-SK-fv0">
+                                                    <rect key="frame" x="0.0" y="0.0" width="128" height="128"/>
+                                                    <autoresizingMask key="autoresizingMask"/>
+                                                </collectionViewCellContentView>
+                                            </collectionViewCell>
+                                        </cells>
+                                    </collectionView>
+                                    <tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="fcF-EL-NGY">
+                                        <rect key="frame" x="0.0" y="289" width="341" height="128"/>
+                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                    </tableView>
+                                </subviews>
+                                <viewLayoutGuide key="contentLayoutGuide" id="me6-Hk-iNS"/>
+                                <viewLayoutGuide key="frameLayoutGuide" id="wSc-Ao-4L2"/>
+                            </scrollView>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="c49-PW-r2o">
+                                <rect key="frame" x="16" y="59" width="44" height="44"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <state key="normal" title="Button"/>
+                                <buttonConfiguration key="configuration" style="plain" image="fanhui"/>
+                                <connections>
+                                    <action selector="gotoBack:" destination="CsL-Nd-CNs" eventType="touchUpInside" id="EEM-aE-bmj"/>
+                                </connections>
+                            </button>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uhf-RO-DVc">
+                                <rect key="frame" x="81" y="71" width="230" height="21"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <button opaque="NO" tag="999" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="c2u-n8-08R">
+                                <rect key="frame" x="321" y="59" width="44" height="44"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                <state key="normal" title="Button"/>
+                                <buttonConfiguration key="configuration" style="plain" image="rightdian"/>
+                                <connections>
+                                    <action selector="rightBt:" destination="CsL-Nd-CNs" eventType="touchUpInside" id="JGm-4t-vJA"/>
+                                </connections>
+                            </button>
+                        </subviews>
+                        <viewLayoutGuide key="safeArea" id="tMm-Ck-PYc"/>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                    </view>
+                    <connections>
+                        <outlet property="bartitleLb" destination="uhf-RO-DVc" id="cIv-ok-nxE"/>
+                        <outlet property="collView" destination="je2-oh-K8N" id="kSt-7E-fnB"/>
+                        <outlet property="ctScrollView" destination="RtO-CM-mZd" id="MhV-Au-Gk2"/>
+                        <outlet property="rightBt" destination="c2u-n8-08R" id="U4N-Ni-Kq7"/>
+                        <outlet property="tableView" destination="fcF-EL-NGY" id="A1f-fg-dPG"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="sae-kY-upa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="1750" y="-26"/>
+        </scene>
+        <!--New Qunzu Controller-->
+        <scene sceneID="lio-6q-wba">
+            <objects>
+                <viewController storyboardIdentifier="NewQunzuController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="67q-Rh-F2W" customClass="NewQunzuController" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="DNi-ba-tWP">
+                        <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="bgset" translatesAutoresizingMaskIntoConstraints="NO" id="0Ao-ya-6aT">
+                                <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                            </imageView>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="twP-lP-e0x">
+                                <rect key="frame" x="16" y="37" width="44" height="44"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <state key="normal" title="Button"/>
+                                <buttonConfiguration key="configuration" style="plain" image="fanhui"/>
+                                <connections>
+                                    <action selector="gotoback:" destination="67q-Rh-F2W" eventType="touchUpInside" id="5uI-2V-P9S"/>
+                                </connections>
+                            </button>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="w8k-ep-q6V">
+                                <rect key="frame" x="81" y="37" width="230" height="36"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="DsL-ua-Dlj">
+                                <rect key="frame" x="166" y="115" width="60" height="60"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                            </imageView>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="群名称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dw9-hi-R9b">
+                                <rect key="frame" x="34" y="220" width="320" height="21"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Pm8-57-nuo">
+                                <rect key="frame" x="36" y="249" width="320" height="34"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <textInputTraits key="textInputTraits"/>
+                            </textField>
+                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" translatesAutoresizingMaskIntoConstraints="NO" id="fb8-FM-qnG">
+                                <rect key="frame" x="36" y="320" width="320" height="50"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES"/>
+                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="fb8-FM-qnG" id="jqa-Ct-hXt">
+                                    <rect key="frame" x="0.0" y="0.0" width="320" height="50"/>
+                                    <autoresizingMask key="autoresizingMask"/>
+                                    <subviews>
+                                        <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="SIb-Xk-HJm">
+                                            <rect key="frame" x="260" y="10" width="49" height="31"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+                                            <connections>
+                                                <action selector="yaoqingC:" destination="67q-Rh-F2W" eventType="valueChanged" id="Et9-gN-VPj"/>
+                                            </connections>
+                                        </switch>
+                                    </subviews>
+                                </tableViewCellContentView>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            </tableViewCell>
+                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" translatesAutoresizingMaskIntoConstraints="NO" id="LrH-Th-8AB">
+                                <rect key="frame" x="36" y="391" width="320" height="50"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES"/>
+                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="LrH-Th-8AB" id="JBs-O7-sjf">
+                                    <rect key="frame" x="0.0" y="0.0" width="320" height="50"/>
+                                    <autoresizingMask key="autoresizingMask"/>
+                                    <subviews>
+                                        <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="tIP-yU-hC8">
+                                            <rect key="frame" x="260" y="9" width="49" height="31"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+                                            <connections>
+                                                <action selector="jinyanC:" destination="67q-Rh-F2W" eventType="valueChanged" id="cNf-Bk-cUl"/>
+                                            </connections>
+                                        </switch>
+                                    </subviews>
+                                </tableViewCellContentView>
+                            </tableViewCell>
+                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" translatesAutoresizingMaskIntoConstraints="NO" id="bgb-fi-NdP">
+                                <rect key="frame" x="36" y="465" width="320" height="50"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES"/>
+                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="bgb-fi-NdP" id="EJc-AR-C9F">
+                                    <rect key="frame" x="0.0" y="0.0" width="320" height="50"/>
+                                    <autoresizingMask key="autoresizingMask"/>
+                                    <subviews>
+                                        <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="4Lf-G5-K6L">
+                                            <rect key="frame" x="260" y="9" width="49" height="31"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+                                            <connections>
+                                                <action selector="jinjiaC:" destination="67q-Rh-F2W" eventType="valueChanged" id="JBt-bT-go4"/>
+                                            </connections>
+                                        </switch>
+                                    </subviews>
+                                </tableViewCellContentView>
+                            </tableViewCell>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vFT-Lx-reQ">
+                                <rect key="frame" x="166" y="115" width="60" height="60"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <state key="normal" title="Button"/>
+                                <buttonConfiguration key="configuration" style="plain">
+                                    <backgroundConfiguration key="background"/>
+                                </buttonConfiguration>
+                                <connections>
+                                    <action selector="selectImg:" destination="67q-Rh-F2W" eventType="touchUpInside" id="h7P-Sl-RRN"/>
+                                </connections>
+                            </button>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cIy-B8-TwM">
+                                <rect key="frame" x="37" y="725" width="319" height="44"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                                <color key="tintColor" systemColor="systemGreenColor"/>
+                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                <state key="normal" title="保存"/>
+                                <connections>
+                                    <action selector="saveAct:" destination="67q-Rh-F2W" eventType="touchUpInside" id="qVU-ls-foS"/>
+                                </connections>
+                            </button>
+                        </subviews>
+                        <viewLayoutGuide key="safeArea" id="VKC-gs-hbF"/>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                    </view>
+                    <connections>
+                        <outlet property="avatar" destination="DsL-ua-Dlj" id="fI2-e4-vOF"/>
+                        <outlet property="inputName" destination="Pm8-57-nuo" id="hKp-EO-bMf"/>
+                        <outlet property="jiahaoyCell" destination="bgb-fi-NdP" id="3GD-hN-0jA"/>
+                        <outlet property="jinjiaS" destination="4Lf-G5-K6L" id="a5h-jI-Dsc"/>
+                        <outlet property="jinyanCell" destination="LrH-Th-8AB" id="vsS-Kw-rFZ"/>
+                        <outlet property="jinyanS" destination="tIP-yU-hC8" id="uEf-ET-0MW"/>
+                        <outlet property="saveBt" destination="cIy-B8-TwM" id="8x2-He-u9r"/>
+                        <outlet property="titleLb" destination="w8k-ep-q6V" id="aJe-EU-5ql"/>
+                        <outlet property="yaoqingCell" destination="fb8-FM-qnG" id="aAm-W6-gih"/>
+                        <outlet property="yaoqingS" destination="SIb-Xk-HJm" id="qir-4u-O1m"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="61u-u1-3gR" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="937" y="-28"/>
+        </scene>
+        <!--Quncy Controller-->
+        <scene sceneID="tPZ-JU-9Mz">
+            <objects>
+                <viewController storyboardIdentifier="QuncyController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="zdE-Eq-7d7" customClass="QuncyController" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="DUT-XW-31e">
+                        <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cIl-UP-Emr">
+                                <rect key="frame" x="32" y="51" width="44" height="44"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <state key="normal" title="Button"/>
+                                <buttonConfiguration key="configuration" style="plain" image="fanhui"/>
+                                <connections>
+                                    <action selector="gotoback:" destination="zdE-Eq-7d7" eventType="touchUpInside" id="frQ-fI-WmD"/>
+                                </connections>
+                            </button>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qLn-g0-EDa">
+                                <rect key="frame" x="77" y="63" width="238" height="21"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="fre-Vl-hZb">
+                                <rect key="frame" x="16" y="118" width="361" height="666"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                            </tableView>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="bgset" translatesAutoresizingMaskIntoConstraints="NO" id="JKO-5F-H22">
+                                <rect key="frame" x="0.0" y="25" width="393" height="852"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                            </imageView>
+                        </subviews>
+                        <viewLayoutGuide key="safeArea" id="sD9-tU-YAU"/>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                    </view>
+                    <connections>
+                        <outlet property="tableView" destination="fre-Vl-hZb" id="NiY-eZ-fdd"/>
+                        <outlet property="titleLb" destination="qLn-g0-EDa" id="eux-bZ-699"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="B0T-hl-pM4" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="130.53435114503816" y="-28.169014084507044"/>
+        </scene>
+    </scenes>
+    <resources>
+        <image name="bgset" width="375" height="812"/>
+        <image name="fanhui" width="10" height="18"/>
+        <image name="rightdian" width="20" height="20"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+        <systemColor name="systemGreenColor">
+            <color red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+        </systemColor>
+    </resources>
+</document>

+ 3 - 3
ABtong/ABtong/Assets.xcassets/search_icon.imageset/Contents.json

@@ -1,17 +1,17 @@
 {
   "images" : [
     {
-      "filename" : "search_icon.png",
+      "filename" : "Group 27.png",
       "idiom" : "universal",
       "scale" : "1x"
     },
     {
-      "filename" : "search_icon@2x.png",
+      "filename" : "Group 27@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
     {
-      "filename" : "search_icon@3x.png",
+      "filename" : "Group 27@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

BIN
ABtong/ABtong/Assets.xcassets/search_icon.imageset/Group 27.png


BIN
ABtong/ABtong/Assets.xcassets/search_icon.imageset/Group 27@2x.png


BIN
ABtong/ABtong/Assets.xcassets/search_icon.imageset/Group 27@3x.png


BIN
ABtong/ABtong/Assets.xcassets/search_icon.imageset/search_icon.png


BIN
ABtong/ABtong/Assets.xcassets/search_icon.imageset/search_icon@2x.png


BIN
ABtong/ABtong/Assets.xcassets/search_icon.imageset/search_icon@3x.png


+ 48 - 60
ABtong/ABtong/Base.lproj/Main.storyboard

@@ -315,7 +315,7 @@
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             </imageView>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="kb1-Ah-Kb0">
-                                <rect key="frame" x="16" y="92" width="361" height="677"/>
+                                <rect key="frame" x="16" y="244" width="361" height="525"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                             </tableView>
@@ -336,6 +336,41 @@
                                 <rect key="frame" x="16" y="57" width="105" height="22"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                             </imageView>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="fill" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VEQ-6H-Ywo">
+                                <rect key="frame" x="16" y="152" width="361" height="35"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <state key="normal" title="Button"/>
+                                <buttonConfiguration key="configuration" style="plain" image="arrow-right" imagePlacement="trailing" title="新朋友">
+                                    <color key="baseForegroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                </buttonConfiguration>
+                                <connections>
+                                    <action selector="xinpengyou:" destination="8Gs-Us-sU1" eventType="touchUpInside" id="2IQ-Pc-kBD"/>
+                                </connections>
+                            </button>
+                            <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="DbR-dE-IP2">
+                                <rect key="frame" x="24" y="110" width="353" height="34"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <color key="backgroundColor" red="0.14509803921568626" green="0.16470588235294117" blue="0.30196078431372547" alpha="1" colorSpace="calibratedRGB"/>
+                                <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <textInputTraits key="textInputTraits" returnKeyType="search"/>
+                            </textField>
+                            <segmentedControl opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="GZ0-AX-icB">
+                                <rect key="frame" x="24" y="195" width="353" height="32"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <segments>
+                                    <segment title="好友"/>
+                                    <segment title="群组"/>
+                                </segments>
+                            </segmentedControl>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ep2-mW-eb1">
+                                <rect key="frame" x="293" y="159" width="40" height="23"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="19"/>
+                                <color key="textColor" red="0.94509803921568625" green="0.0" blue="0.0" alpha="0.84705882352941175" colorSpace="calibratedRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
                         </subviews>
                         <viewLayoutGuide key="safeArea" id="caQ-go-QjV"/>
                         <color key="backgroundColor" systemColor="tertiarySystemGroupedBackgroundColor"/>
@@ -343,61 +378,15 @@
                     <tabBarItem key="tabBarItem" title="通讯录" id="Nzv-VL-XR5"/>
                     <connections>
                         <outlet property="_tableView" destination="kb1-Ah-Kb0" id="2de-IC-QPD"/>
+                        <outlet property="countLb" destination="Ep2-mW-eb1" id="p2f-8h-0Ji"/>
+                        <outlet property="searchInput" destination="DbR-dE-IP2" id="nGr-zE-agC"/>
+                        <outlet property="segCtr" destination="GZ0-AX-icB" id="eEH-2h-kS9"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="aMR-Na-VH2" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
             </objects>
             <point key="canvasLocation" x="719.84732824427476" y="1232.3943661971832"/>
         </scene>
-        <!--群组-->
-        <scene sceneID="YpD-K2-dVf">
-            <objects>
-                <viewController id="lbQ-Pn-hMT" customClass="GroupListController" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="ci3-fL-9lb">
-                        <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="bgset" translatesAutoresizingMaskIntoConstraints="NO" id="gQ8-ym-Z9h">
-                                <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                            </imageView>
-                            <tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="Pwb-vc-Ijk">
-                                <rect key="frame" x="16" y="119" width="361" height="650"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
-                            </tableView>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="群组" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="frO-5h-3I5">
-                                <rect key="frame" x="78" y="55" width="236" height="36"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                                <fontDescription key="fontDescription" type="italicSystem" pointSize="26"/>
-                                <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                <nil key="highlightedColor"/>
-                            </label>
-                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IeR-6K-JJf">
-                                <rect key="frame" x="347" y="58" width="30" height="30"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
-                                <state key="normal" title="Button"/>
-                                <buttonConfiguration key="configuration" style="plain">
-                                    <backgroundConfiguration key="background" image="Cjiahao"/>
-                                </buttonConfiguration>
-                                <connections>
-                                    <action selector="addNewGroup:" destination="lbQ-Pn-hMT" eventType="touchUpInside" id="x5k-5Z-KJD"/>
-                                </connections>
-                            </button>
-                        </subviews>
-                        <viewLayoutGuide key="safeArea" id="woA-wT-Zz7"/>
-                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
-                    </view>
-                    <tabBarItem key="tabBarItem" title="群组" image="qunzu" selectedImage="qunzu_cur" id="h6T-VY-p82"/>
-                    <connections>
-                        <outlet property="tableView" destination="Pwb-vc-Ijk" id="aqC-bx-RY4"/>
-                        <outlet property="titleLb" destination="frO-5h-3I5" id="Wpz-Ta-W1b"/>
-                    </connections>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="yA1-qS-KgJ" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="3223.6641221374043" y="680.98591549295782"/>
-        </scene>
         <!--我的-->
         <scene sceneID="uBu-6Y-PfD">
             <objects>
@@ -448,7 +437,7 @@
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="CiZ-m6-iyE" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="1382.4427480916031" y="1250"/>
+            <point key="canvasLocation" x="2016" y="1244"/>
         </scene>
         <!--我的-->
         <scene sceneID="psC-LC-uda">
@@ -465,7 +454,7 @@
                 </navigationController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="710-PG-o3H" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="2051" y="1227"/>
+            <point key="canvasLocation" x="2683" y="1221"/>
         </scene>
         <!--Group Controller-->
         <scene sceneID="Mdf-vz-SD4">
@@ -1006,7 +995,7 @@
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="GKq-P0-3dv" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="3619" y="2021"/>
+            <point key="canvasLocation" x="3311" y="2001"/>
         </scene>
         <!--Friend Controller-->
         <scene sceneID="9Sr-iK-lDf">
@@ -1397,6 +1386,7 @@
     </scenes>
     <resources>
         <image name="Cjiahao" width="20" height="20"/>
+        <image name="arrow-right" width="20" height="20"/>
         <image name="bgset" width="375" height="812"/>
         <image name="callhuixiao" width="24" height="24"/>
         <image name="checkbox_selected" width="16" height="16"/>
@@ -35302,8 +35292,6 @@ gaMAAAAAAAAEAQAAAAAAAABYAAAAAAAAAAAAAAAAAA+Bpg
         <image name="launch" width="250" height="541.33331298828125"/>
         <image name="liaotian" width="24" height="24"/>
         <image name="logozi" width="78" height="22"/>
-        <image name="qunzu" width="32" height="32"/>
-        <image name="qunzu_cur" width="32" height="32"/>
         <image name="rightdian" width="20" height="20"/>
         <image name="sandic" width="24" height="24"/>
         <image name="shipinth" width="28" height="20"/>
@@ -35314,22 +35302,22 @@ gaMAAAAAAAAEAQAAAAAAAABYAAAAAAAAAAAAAAAAAA+Bpg
             <color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>
         <systemColor name="opaqueSeparatorColor">
-            <color red="0.77647058820000003" green="0.77647058820000003" blue="0.7843137255" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <color red="0.77647058823529413" green="0.77647058823529413" blue="0.78431372549019607" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
         </systemColor>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>
         <systemColor name="systemBlueColor">
-            <color red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <color red="0.0" green="0.47843137254901963" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
         </systemColor>
         <systemColor name="systemGreenColor">
-            <color red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <color red="0.20392156862745098" green="0.7803921568627451" blue="0.34901960784313724" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
         </systemColor>
         <systemColor name="systemPinkColor">
-            <color red="1" green="0.1764705882" blue="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <color red="1" green="0.17647058823529413" blue="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
         </systemColor>
         <systemColor name="tertiarySystemGroupedBackgroundColor">
-            <color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
         </systemColor>
     </resources>
 </document>

+ 1 - 1
ABtong/ABtong/Common/CommonUI/FilePreviewer.m

@@ -369,7 +369,7 @@
     return [videoExtensions containsObject:fileExtension];
 }
 
-#pragma mark 保存图片、视频、文件
+#pragma mark 保存图片
 
 -(void)savephotoVidio{
     // 调用保存图片到相册的方法

+ 61 - 0
ABtong/ABtong/Common/Network/FriendNetApi.h

@@ -58,6 +58,67 @@
 //删除安博通通讯录
 +(void)deleteTongxunlu:(NSString *_Nullable)friendId succ:(nullable GSucc)succ fail:(nullable GFail)fail;
 
+//群列表
+//新建群组
++(void)addNewGroup:(NSDictionary *_Nullable)parameters succ:(nullable GSucc)succ fail:(nullable GFail)fail;
+
+//更新群组信息
++(void)updateGroup:(NSDictionary *_Nullable)parameters groupId:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail;
+
+//获取群组信息
++(void)getGroupInfo:(NSString *_Nullable)groupId  succ:(nullable GSucc)succ fail:(nullable GFail)fail;
+
+//获取用户加入的群组列表
++(void)getGroupList:(nullable GSucc)succ fail:(nullable GFail)fail;
+
+//获取群组内用户列表
++(void)getGroupUserList:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail;
+
+
+//删除自己的群
++(void)deleteGroup:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail;
+
+//退出群
++(void)exitGroup:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail;
+
+
+//将用户添加入群
++(void)addUsertoGroup:(NSDictionary *_Nullable)parameters groupId:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail;
+
+
+//将用户踢出群
++(void)getoutUserGroup:(NSString *_Nullable)groupId userId:(NSString *_Nullable)userId succ:(nullable GSucc)succ fail:(nullable GFail)fail;
+
+
+//批量将用户踢出群
++(void)getoutUsersGroup:(NSDictionary *_Nullable)parameters succ:(nullable GSucc)succ fail:(nullable GFail)fail;
+
+
+//转让群主
++(void)transferGroup:(NSString *_Nullable)groupId userId:(NSString *_Nullable)userId succ:(nullable GSucc)succ fail:(nullable GFail)fail;
+//上传头像
++(void)upLoaddataWToken:(NSData *_Nonnull)data fileName:(NSString *_Nullable)fileName succ:(GSucc _Nullable )succ fail:(GFail _Nullable )fail;
+
+/**
+ * 查询当前待审核的群邀请
+ */
++(void)getshenheList:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail;
+/**
+ * 查询当前待审核的群邀请数量
+ */
++(void)waitCheckList:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail;
+//同意加入
++(void)Checkagree:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail;
+//拒绝加入
++(void)Checkrefuse:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail;
+
+///获取群消息列表(/api/sys/messages/queryGroupMessage)
++(void)getGroupMsgListWithChatId:(NSString * _Nonnull)chatId time:(NSInteger)timestamp pageSize:(NSInteger)size succ:(nullable GSucc)succ fail:(nullable GFail)fail;
+
+
+
+
+
 @end
 
 

+ 112 - 0
ABtong/ABtong/Common/Network/FriendNetApi.m

@@ -103,4 +103,116 @@
     [GBaseNetApi.shareInstance httpGetToken:nil url:urlstr succ:succ fail:fail];
 }
 
+
+
+//群列表
+//新建群组
++(void)addNewGroup:(NSDictionary *_Nullable)parameters succ:(nullable GSucc)succ fail:(nullable GFail)fail{
+    [GBaseNetApi.shareInstance httpPostToken:parameters url:@"/api/sys/groups?" succ:succ fail:fail];
+}
+
+//更新群组信息
++(void)updateGroup:(NSDictionary *_Nullable)parameters groupId:(NSString *)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail{
+    NSString *urlstr=[NSString stringWithFormat:@"/api/sys/groups/%@",groupId];
+    [GBaseNetApi.shareInstance httpPatchToken:parameters url:urlstr succ:succ fail:fail];
+}
+
+//获取群组信息
++(void)getGroupInfo:(NSString *)groupId  succ:(nullable GSucc)succ fail:(nullable GFail)fail{
+    NSString *urlstr=[NSString stringWithFormat:@"/api/sys/groups/%@",groupId];
+    [GBaseNetApi.shareInstance httpGetToken:nil url:urlstr succ:succ fail:fail];
+}
+
+//获取用户加入的群组列表
++(void)getGroupList:(nullable GSucc)succ fail:(nullable GFail)fail{
+    NSString *urlstr=[NSString stringWithFormat:@"/api/sys/groups"];
+    [GBaseNetApi.shareInstance httpGetToken:nil url:urlstr succ:succ fail:fail];
+}
+
+//获取群组内用户列表
++(void)getGroupUserList:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail{
+    NSString *urlstr=[NSString stringWithFormat:@"/api/sys/groups/%@/users",groupId];
+    [GBaseNetApi.shareInstance httpGetToken:nil url:urlstr succ:succ fail:fail];
+}
+
+
+//删除自己的群
++(void)deleteGroup:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail{
+    NSString *urlstr=[NSString stringWithFormat:@"/api/sys/groups/%@",groupId];
+    [GBaseNetApi.shareInstance httpDelToken:nil url:urlstr succ:succ fail:fail];
+}
+
+//退出群
++(void)exitGroup:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail{
+    NSString *urlstr=[NSString stringWithFormat:@"/api/sys/groups/%@/exit",groupId];
+    [GBaseNetApi.shareInstance httpDelToken:nil url:urlstr succ:succ fail:fail];
+}
+
+
+//将用户添加入群
++(void)addUsertoGroup:(NSDictionary *_Nullable)parameters groupId:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail{
+    NSString *urlstr=[NSString stringWithFormat:@"/api/sys/groups/addGroup"];
+    [GBaseNetApi.shareInstance httpPostToken:parameters url:urlstr succ:succ fail:fail];
+}
+
+
+//将用户踢出群
++(void)getoutUserGroup:(NSString *_Nullable)groupId userId:(NSString *_Nullable)userId succ:(nullable GSucc)succ fail:(nullable GFail)fail{
+    NSString *urlstr=[NSString stringWithFormat:@"/api/sys/groups/%@/users/%@",groupId,userId];
+    [GBaseNetApi.shareInstance httpDelToken:nil url:urlstr succ:succ fail:fail];
+}
+
+
+//批量将用户踢出群
++(void)getoutUsersGroup:(NSDictionary *_Nullable)parameters succ:(nullable GSucc)succ fail:(nullable GFail)fail{
+    
+}
+
+
+//转让群主
++(void)transferGroup:(NSString *_Nullable)groupId userId:(NSString *_Nullable)userId succ:(nullable GSucc)succ fail:(nullable GFail)fail{
+    NSString *urlstr=[NSString stringWithFormat:@"/api/sys/groups/%@/transference/%@",groupId,userId];
+    [GBaseNetApi.shareInstance httpPostToken:nil url:urlstr succ:succ fail:fail];
+}
+
+//上传头像
++(void)upLoaddataWToken:(NSData *_Nonnull)data fileName:(NSString *_Nullable)fileName succ:(GSucc _Nullable )succ fail:(GFail _Nullable )fail{
+    [GBaseNetApi.shareInstance upLoaddataWToken:data fileName:fileName succ:succ fail:fail];
+}
+
+
+/**
+ * 查询当前待审核的群邀请
+ */
++(void)getshenheList:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail{
+    NSString *urlstr=[NSString stringWithFormat:@"/api/sys/groupInvites?groupId=%@",groupId];
+    [GBaseNetApi.shareInstance httpGetToken:nil url:urlstr succ:succ fail:fail];
+}
+/**
+ * 查询当前待审核的群邀请数量
+ */
++(void)waitCheckList:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail{
+    NSString *urlstr=[NSString stringWithFormat:@"/api/sys/groupInvites/waitCheckList"];
+    [GBaseNetApi.shareInstance httpGetToken:nil url:urlstr succ:succ fail:fail];
+}
+
+//同意加入
++(void)Checkagree:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail{
+    NSString *urlstr=[NSString stringWithFormat:@"/api/sys/groupInvites/agree/%@",groupId];
+    [GBaseNetApi.shareInstance httpPostToken:nil url:urlstr succ:succ fail:fail];
+}
+//拒绝加入
++(void)Checkrefuse:(NSString *_Nullable)groupId succ:(nullable GSucc)succ fail:(nullable GFail)fail{
+    NSString *urlstr=[NSString stringWithFormat:@"/api/sys/groupInvites/refuse/%@",groupId];
+    [GBaseNetApi.shareInstance httpPostToken:nil url:urlstr succ:succ fail:fail];
+}
+
++(void)getGroupMsgListWithChatId:(NSString * _Nonnull)chatId time:(NSInteger)timestamp pageSize:(NSInteger)size succ:(nullable GSucc)succ fail:(nullable GFail)fail{
+    //http://br1.qihg091ew.com:8080/api/sys/messages/queryGroupMessage?type=1&chatId=1936003432742780929&timestamp=-1&size=20
+    NSString *urlstr=[NSString stringWithFormat:@"/api/sys/messages/queryGroupMessage?type=1&chatId=%@&timestamp=%ld&size=%ld",chatId,timestamp,size];
+    [GBaseNetApi.shareInstance httpGetToken:nil url:urlstr succ:succ fail:fail];
+}
+
+
+
 @end

+ 2 - 0
ABtong/ABtong/Common/Network/GDBManager.h

@@ -101,5 +101,7 @@ typedef void (^DBSucc)(NSArray * _Nullable array);
 //根据类型查询全部用户
 -(void)selectFirendwithKW:(NSString *_Nullable)keyword succ:(DBSucc _Nullable )succ fail:(DBFail _Nullable )fail;
 -(void)selectFirendwithID:(NSString *_Nullable)firendId succ:(DBSucc _Nullable )succ fail:(DBFail _Nullable )fail;
+//根据type查询用户
+-(void)selectFirendwithtype:(NSString *_Nullable)type succ:(DBSucc _Nullable )succ fail:(DBFail _Nullable )fail;
 
 @end

+ 51 - 11
ABtong/ABtong/Common/Network/GDBManager.m

@@ -1506,7 +1506,7 @@
     }
     
     NSString *sql1=@"create table if not exists Firendslist_";
-    NSString *tablejg = @"(id CHAR PRIMARY KEY,deptId CHAR,mobile CHAR,name CHAR,avatar CHAR,username CHAR)";
+    NSString *tablejg = @"(id CHAR PRIMARY KEY,type CHAR,mobile CHAR,name CHAR,avatar CHAR,username CHAR,severName CHAR)";
     NSString *sql = [NSString stringWithFormat:@"%@%@ %@",sql1,userid,tablejg];
     NSLog(@"createFirendslist_ --- sql:%@",sql);
     BOOL success = [self.db executeUpdate:sql];
@@ -1518,7 +1518,7 @@
         
     }
 }
--(void)insertFirend:(NSDictionary *_Nonnull)firend succ:(DBSucc _Nullable )succ fail:(DBFail _Nullable )fail{
+-(void)insertFirend:(NSDictionary *_Nonnull)firend  succ:(DBSucc _Nullable )succ fail:(DBFail _Nullable )fail{
     
     if (![self.db isOpen]) {
         return;
@@ -1541,7 +1541,11 @@
     
     // 2. 处理firendId
     NSString *firendId = [NSString stringWithFormat:@"%@", safeDict[@"id"]];
-
+    NSDictionary *actuserInfo = [UDManager.shareInstance getDDManager:nkactuserInfo];
+    NSData *jsonDatas = [NSJSONSerialization dataWithJSONObject:actuserInfo options:0 error:nil];
+    NSString *severName = [[NSString alloc] initWithData:jsonDatas encoding:NSUTF8StringEncoding];
+    
+    
     // 3. 开启事务
     [self.db beginTransaction];
     BOOL shouldRollback = NO;
@@ -1559,17 +1563,18 @@
         NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
         
         NSString *insertSQL = [NSString stringWithFormat:
-                               @"INSERT  INTO %@ (id,deptId,mobile,name,avatar,username) VALUES (?,?,?,?,?,?)",
+                               @"INSERT  INTO %@ (id,type,mobile,name,avatar,username,severName) VALUES (?,?,?,?,?,?,?)",
                                tableName];
         
         // 6. 执行插入
         BOOL success = [self.db executeUpdate:insertSQL,
                         safeDict[@"id"],
-                        safeDict[@"deptId"],
+                        safeDict[@"type"],
                         safeDict[@"mobile"],
                         safeDict[@"name"],
                         safeDict[@"avatar"],
-                        safeDict[@"username"]];
+                        safeDict[@"username"],
+                        severName];
         
         if (!success) {
             shouldRollback = YES;
@@ -1606,7 +1611,7 @@
         NSLog(@"删除消息表成功");
     }
 }
-//根据类型查询全部用户
+//根据g关键字查询全部用户
 -(void)selectFirendwithKW:(NSString *_Nullable)keyword succ:(DBSucc _Nullable )succ fail:(DBFail _Nullable )fail{
     NSString *userid = [UDManager.shareInstance getSDManager:dkuserId];
     NSString *vstr = @"select * from Firendslist_";
@@ -1616,7 +1621,7 @@
     if(keyword.length>0){
         vstr=[NSString stringWithFormat:@"%@ where name LIKE %@%@%@",vstr,@"'%",keyword,@"%'"];
     }
-    vstr=[NSString stringWithFormat:@"%@ %@",vstr,@"ORDER BY name ASC LIMIT 16;"];
+    vstr=[NSString stringWithFormat:@"%@ %@",vstr,@"ORDER BY name ASC;"];
     
     //NSLog(@"vstr:%@",vstr);
     
@@ -1626,11 +1631,12 @@
         //NSLog(@"rs:%@",rs);
         NSDictionary *chatD=@{
             @"id":[rs stringForColumn:@"id"]?:@"",
-            @"deptId":[rs stringForColumn:@"deptId"]?:@"",
+            @"type":[rs stringForColumn:@"type"]?:@"",
             @"mobile":[rs stringForColumn:@"mobile"]?:@"",
             @"name":[rs stringForColumn:@"name"]?:@"",
             @"avatar":[rs stringForColumn:@"avatar"]?:@"",
             @"username":[rs stringForColumn:@"username"]?:@"",
+            @"severName":[rs stringForColumn:@"severName"]?:@"",
         };
         [array addObject:chatD];
     }
@@ -1641,7 +1647,7 @@
 }
 
 
-//根据类型查询全部用户
+//根据id查询用户
 -(void)selectFirendwithID:(NSString *_Nullable)firendId succ:(DBSucc _Nullable )succ fail:(DBFail _Nullable )fail{
     NSString *userid = [UDManager.shareInstance getSDManager:dkuserId];
     NSString *vstr = @"select * from Firendslist_";
@@ -1661,11 +1667,44 @@
         //NSLog(@"rs:%@",rs);
         NSDictionary *chatD=@{
             @"id":[rs stringForColumn:@"id"]?:@"",
-            @"deptId":[rs stringForColumn:@"deptId"]?:@"",
+            @"type":[rs stringForColumn:@"type"]?:@"",
+            @"mobile":[rs stringForColumn:@"mobile"]?:@"",
+            @"name":[rs stringForColumn:@"name"]?:@"",
+            @"avatar":[rs stringForColumn:@"avatar"]?:@"",
+            @"username":[rs stringForColumn:@"username"]?:@"",
+            @"severName":[rs stringForColumn:@"severName"]?:@"",
+        };
+        [array addObject:chatD];
+    }
+    [rs close]; // 关闭结果集
+    if(succ){
+        succ(array);
+    }
+}
+
+
+//根据type查询用户
+-(void)selectFirendwithtype:(NSString *_Nullable)type succ:(DBSucc _Nullable )succ fail:(DBFail _Nullable )fail{
+    NSString *userid = [UDManager.shareInstance getSDManager:dkuserId];
+    
+    NSString *vstr=[NSString stringWithFormat:@"select * from Firendslist_%@",userid];
+    vstr=[NSString stringWithFormat:@"%@ where type=%@",vstr,type];
+    vstr=[NSString stringWithFormat:@"%@ %@",vstr,@"ORDER BY name ASC;"];
+    
+    //NSLog(@"vstr:%@",vstr);
+    
+    FMResultSet *rs = [self.db executeQuery:vstr];
+    NSMutableArray *array=[[NSMutableArray alloc] init];
+    while ([rs next]) {
+        //NSLog(@"rs:%@",rs);
+        NSDictionary *chatD=@{
+            @"id":[rs stringForColumn:@"id"]?:@"",
+            @"type":[rs stringForColumn:@"type"]?:@"",
             @"mobile":[rs stringForColumn:@"mobile"]?:@"",
             @"name":[rs stringForColumn:@"name"]?:@"",
             @"avatar":[rs stringForColumn:@"avatar"]?:@"",
             @"username":[rs stringForColumn:@"username"]?:@"",
+            @"severName":[rs stringForColumn:@"severName"]?:@"",
         };
         [array addObject:chatD];
     }
@@ -1677,6 +1716,7 @@
 
 
 
+
 -(void)deleatFirendtable:(NSString *)userid{
     if(userid.length==0){
         userid = [UDManager.shareInstance getSDManager:dkuserId];

+ 4 - 0
ABtong/ABtong/Common/Store/FirendStore.h

@@ -32,6 +32,10 @@
 -(void)reciveMsg:(NSDictionary *_Nonnull)msg;
 -(void)reloadData:(NSString *_Nullable)kyeWD;
 
+-(void)reloadAllFrinds;
+
+-(void)reloadAllGroups;
+
 -(void)deleteAbtFirend:(NSString *_Nullable)firebId;
 
 -(void)updataTongxunlu:(NSString *_Nullable)firendId;

+ 26 - 0
ABtong/ABtong/Common/Store/FirendStore.m

@@ -44,6 +44,31 @@
 }
 
 
+-(void)reloadAllFrinds{
+    [GDBManager.shareInstance selectFirendwithtype:@"0" succ:^(NSArray * _Nullable array) {
+        if(self.delegate){
+            [self.flList removeAllObjects];
+            [self.flList addObjectsFromArray:array];
+            [self.delegate FirendChange:self.flList type:1];
+        }
+    } fail:^(NSString * _Nullable error) {
+        ;
+    }];
+}
+
+-(void)reloadAllGroups{
+    [GDBManager.shareInstance selectFirendwithtype:@"1" succ:^(NSArray * _Nullable array) {
+        if(self.delegate){
+            [self.flList removeAllObjects];
+            [self.flList addObjectsFromArray:array];
+            [self.delegate FirendChange:self.flList type:1];
+        }
+    } fail:^(NSString * _Nullable error) {
+        ;
+    }];
+}
+
+
 -(void)reloadData:(NSString *)kyeWD{
     
     [GDBManager.shareInstance selectFirendwithKW:kyeWD succ:^(NSArray * _Nullable array) {
@@ -59,6 +84,7 @@
 }
 
 
+
 -(void)selectFirend:(NSString *)userid{
     [GDBManager.shareInstance selectFirendwithKW:userid succ:^(NSArray * _Nullable array) {
         if(self.delegate){

+ 24 - 0
ABtong/ABtong/Localizable.xcstrings

@@ -1561,6 +1561,30 @@
         }
       }
     },
+    "搜索" : {
+      "comment" : "搜索",
+      "extractionState" : "manual",
+      "localizations" : {
+        "en" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "Search"
+          }
+        },
+        "zh-Hans" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "搜索"
+          }
+        },
+        "zh-Hant" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "搜索"
+          }
+        }
+      }
+    },
     "撤回" : {
       "comment" : "撤回",
       "extractionState" : "manual",

+ 18 - 0
ABtong/Pods/AFNetworking/PrivacyInfo.xcprivacy

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+    <key>NSPrivacyAccessedAPITypes</key>
+    <array>
+        <dict>
+            <key>NSPrivacyAccessedAPIType</key>
+            <string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
+            <key>NSPrivacyAccessedAPITypeReasons</key>
+            <array>
+                <string>DDA9.1</string>
+            </array>
+        </dict>
+    </array>
+</dict>
+</plist>
+