Steven 1 год назад
Родитель
Сommit
588bc7aa5e
20 измененных файлов с 1060 добавлено и 49 удалено
  1. 20 0
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj
  2. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/arrow_dow_grey.imageset/Contents.json
  3. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/arrow_dow_grey.imageset/arrow_dow_grey@2x.png
  4. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/arrow_dow_grey.imageset/arrow_dow_grey@3x.png
  5. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/CustomNavViewController.m
  6. 21 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h
  7. 36 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m
  8. 15 14
      KulexiuForTeacher/KulexiuForTeacher/Common/Define/KSDomain.h
  9. 150 12
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/TenantGroup/TenantChooseMemberViewController.m
  10. 4 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupSettingViewController.m
  11. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/Tenant/TenantStuModel.h
  12. 24 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenantGroupChooseNavView.h
  13. 52 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenantGroupChooseNavView.m
  14. 100 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenantGroupChooseNavView.xib
  15. 31 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenantGroupSortView.h
  16. 357 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenantGroupSortView.m
  17. 156 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenantGroupSortView.xib
  18. 6 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenentGroupAddMemberCell.m
  19. 61 15
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenentGroupAddMemberCell.xib
  20. 3 3
      KulexiuForTeacher/KulexiuForTeacher/Module/TXLiveModule/Controller/TXLiveRoomViewController.m

+ 20 - 0
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj

@@ -553,6 +553,10 @@
 		BC1553572AB336A200C1C347 /* TenantStuModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BC1553562AB336A200C1C347 /* TenantStuModel.m */; };
 		BC15535A2AB33AFD00C1C347 /* TenantCreateStuView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC1553592AB33AFD00C1C347 /* TenantCreateStuView.m */; };
 		BC15535C2AB33B0300C1C347 /* TenantCreateStuView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC15535B2AB33B0300C1C347 /* TenantCreateStuView.xib */; };
+		BC161CE22AE0DD6A0071530A /* TenantGroupChooseNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC161CE12AE0DD6A0071530A /* TenantGroupChooseNavView.m */; };
+		BC161CE42AE0DD760071530A /* TenantGroupChooseNavView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC161CE32AE0DD760071530A /* TenantGroupChooseNavView.xib */; };
+		BC161CE72AE0FD590071530A /* TenantGroupSortView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC161CE62AE0FD590071530A /* TenantGroupSortView.m */; };
+		BC161CE92AE0FD630071530A /* TenantGroupSortView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC161CE82AE0FD630071530A /* TenantGroupSortView.xib */; };
 		BC221FA128C72B9500F99802 /* MyStyleVideoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC221F9D28C72B9500F99802 /* MyStyleVideoView.xib */; };
 		BC221FA228C72B9500F99802 /* MyStyleVideoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC221F9E28C72B9500F99802 /* MyStyleVideoCell.xib */; };
 		BC221FA328C72B9500F99802 /* MyStyleVideoView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC221F9F28C72B9500F99802 /* MyStyleVideoView.m */; };
@@ -2221,6 +2225,12 @@
 		BC1553582AB33AFD00C1C347 /* TenantCreateStuView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TenantCreateStuView.h; sourceTree = "<group>"; };
 		BC1553592AB33AFD00C1C347 /* TenantCreateStuView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TenantCreateStuView.m; sourceTree = "<group>"; };
 		BC15535B2AB33B0300C1C347 /* TenantCreateStuView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TenantCreateStuView.xib; sourceTree = "<group>"; };
+		BC161CE02AE0DD6A0071530A /* TenantGroupChooseNavView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TenantGroupChooseNavView.h; sourceTree = "<group>"; };
+		BC161CE12AE0DD6A0071530A /* TenantGroupChooseNavView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TenantGroupChooseNavView.m; sourceTree = "<group>"; };
+		BC161CE32AE0DD760071530A /* TenantGroupChooseNavView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TenantGroupChooseNavView.xib; sourceTree = "<group>"; };
+		BC161CE52AE0FD590071530A /* TenantGroupSortView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TenantGroupSortView.h; sourceTree = "<group>"; };
+		BC161CE62AE0FD590071530A /* TenantGroupSortView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TenantGroupSortView.m; sourceTree = "<group>"; };
+		BC161CE82AE0FD630071530A /* TenantGroupSortView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TenantGroupSortView.xib; sourceTree = "<group>"; };
 		BC221F9B28C72B9500F99802 /* MyStyleVideoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyStyleVideoView.h; sourceTree = "<group>"; };
 		BC221F9C28C72B9500F99802 /* MyStyleVideoCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyStyleVideoCell.h; sourceTree = "<group>"; };
 		BC221F9D28C72B9500F99802 /* MyStyleVideoView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MyStyleVideoView.xib; sourceTree = "<group>"; };
@@ -5662,6 +5672,12 @@
 				BC1553582AB33AFD00C1C347 /* TenantCreateStuView.h */,
 				BC1553592AB33AFD00C1C347 /* TenantCreateStuView.m */,
 				BC15535B2AB33B0300C1C347 /* TenantCreateStuView.xib */,
+				BC161CE02AE0DD6A0071530A /* TenantGroupChooseNavView.h */,
+				BC161CE12AE0DD6A0071530A /* TenantGroupChooseNavView.m */,
+				BC161CE32AE0DD760071530A /* TenantGroupChooseNavView.xib */,
+				BC161CE52AE0FD590071530A /* TenantGroupSortView.h */,
+				BC161CE62AE0FD590071530A /* TenantGroupSortView.m */,
+				BC161CE82AE0FD630071530A /* TenantGroupSortView.xib */,
 			);
 			path = TenantGroupCreate;
 			sourceTree = "<group>";
@@ -8080,6 +8096,7 @@
 				BC71D1EB2887FDD40010F14B /* img_1.png in Resources */,
 				BC71DF262A8A014F003F165E /* KSImageDisplayView.xib in Resources */,
 				BC106BB82A8F6EAB000759A9 /* ShareLiveCellContentView.xib in Resources */,
+				BC161CE92AE0FD630071530A /* TenantGroupSortView.xib in Resources */,
 				BC3673DB28A606A500059721 /* live_animation_1.png in Resources */,
 				BC71DEF92A89F470003F165E /* TxClassroomChatOtherCell.xib in Resources */,
 				BCC583FB28A9FA8100BAB4CF /* cloud_animation_27.png in Resources */,
@@ -8233,6 +8250,7 @@
 				BC71D1F02887FDD40010F14B /* img_3.png in Resources */,
 				BC221FAF28C736C300F99802 /* MyCreateGroupBottomView.xib in Resources */,
 				BCC5841128A9FA8100BAB4CF /* cloud_animation_2.png in Resources */,
+				BC161CE42AE0DD760071530A /* TenantGroupChooseNavView.xib in Resources */,
 				BC15534A2AB31EF200C1C347 /* TenangGroupCreateBottomView.xib in Resources */,
 				BCDF820D2A8A2955005F8B82 /* MemberSettingMicAlert.xib in Resources */,
 				275E3DE327F467410010EC30 /* BaseEmoji.plist in Resources */,
@@ -8728,6 +8746,7 @@
 				BCF425ED2AB975D200BCD942 /* TenantMineHeadView.m in Sources */,
 				27FC2F6D27F1BE4800FCC239 /* VideoCourseViewController.m in Sources */,
 				277931DC27E30FC20010E277 /* MBProgressHUD+KSShow.m in Sources */,
+				BC161CE72AE0FD590071530A /* TenantGroupSortView.m in Sources */,
 				2779321227E30FC30010E277 /* YKNodeModel.m in Sources */,
 				27F9CAED27EC17AE003E0FE4 /* ChatAddressBodyView.m in Sources */,
 				BC4110492806706800800BD9 /* HomeworkListCell.m in Sources */,
@@ -9134,6 +9153,7 @@
 				2779362C27E33C2B0010E277 /* LoginBodyView.m in Sources */,
 				BC1191F3280EAB9600A716F7 /* AccompanyDetailViewController.m in Sources */,
 				277931DD27E30FC20010E277 /* UIImage+Resize.m in Sources */,
+				BC161CE22AE0DD6A0071530A /* TenantGroupChooseNavView.m in Sources */,
 				BCB9FA622872C8D2005D766B /* UnderwayLiveCell.m in Sources */,
 				BC71DEF42A89F470003F165E /* TXChatAreaTopView.m in Sources */,
 				BCB399B227F94B5A00AFF376 /* LTSCalendarBottomView.m in Sources */,

+ 22 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/arrow_dow_grey.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "arrow_dow_grey@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "arrow_dow_grey@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/arrow_dow_grey.imageset/arrow_dow_grey@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/arrow_dow_grey.imageset/arrow_dow_grey@3x.png


+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Base/CustomNavViewController.m

@@ -92,7 +92,7 @@
 #pragma mark - UINavigationControllerDelegate
 
 - (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
-    if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)] && ![viewController isKindOfClass:NSClassFromString(@"KSBaseWKWebViewController")] && ![viewController isKindOfClass:NSClassFromString(@"FirstSettingViewController")]) {
+    if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)] && ![viewController isKindOfClass:NSClassFromString(@"KSBaseWKWebViewController")] && ![viewController isKindOfClass:NSClassFromString(@"FirstSettingViewController")] && ![viewController isKindOfClass:NSClassFromString(@"TXLiveRoomViewController")] && ![viewController isKindOfClass:NSClassFromString(@"TXClassroomViewController")]) {
         self.interactivePopGestureRecognizer.enabled = YES;
     }
 }

+ 21 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h

@@ -428,7 +428,9 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param post post
 /// @param success 成功
 /// @param faliure 失败
-+ (void)tenantImUserFriendRequest:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+/// @param subjectId 声部
+/// @param tenantGroupId 小组
++ (void)tenantImUserFriendRequest:(NSString *)post subjectId:(NSString *)subjectId tenantGroupId:(NSString *)tenantGroupId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
 // /api-teacher/imGroup/dismiss
 
@@ -1421,5 +1423,23 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param success 成功
 /// @param faliure 失败
 + (void)setPasswordRequest:(NSString *)post password:(NSString *)password code:(NSString *)code success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
+
+// /api-teacher/open/subject/queryPage
+
+/// 查询声部信息
+/// @param get get
+/// @param success 成功
+/// @param faliure 失败
++ (void)subjectQueryPageRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
+// 查询小组信息
+// tenantGroup/page
+
+/// 查询小组信息
+/// @param post post
+/// @param success 成功
+/// @param faliure 失败
++ (void)tenantGroupRequest:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 @end
 NS_ASSUME_NONNULL_END

+ 36 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m

@@ -946,13 +946,17 @@
 /// @param post post
 /// @param success 成功
 /// @param faliure 失败
-+ (void)tenantImUserFriendRequest:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+/// @param subjectId 声部
+/// @param tenantGroupId 小组
++ (void)tenantImUserFriendRequest:(NSString *)post subjectId:(NSString *)subjectId tenantGroupId:(NSString *)tenantGroupId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
     [self configRequestMethodJSON];
     NSString *url = [NSString stringWithFormat:@"%@%@",hostURL, @"/api-teacher/student/page"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:@(1) forKey:@"bindTenant"];
     [parm setValue:@(1) forKey:@"page"];
     [parm setValue:@(10000) forKey:@"rows"];
+    [parm setValue:subjectId forKey:@"subjectId"];
+    [parm setValue:tenantGroupId forKey:@"tenantGroupId"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 
@@ -2606,4 +2610,35 @@
     NSString *url = [NSString stringWithFormat:@"%@%@",hostURL, @"/api-auth/user/setPassword"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
+
+// /api-teacher/open/subject/queryPage
+
+/// 查询声部信息
+/// @param get get
+/// @param success 成功
+/// @param faliure 失败
++ (void)subjectQueryPageRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    
+    NSString *url = [NSString stringWithFormat:@"%@%@",hostURL, @"/api-teacher/open/subject/queryPage"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:@"list" forKey:@"queryType"];
+    [parm setValue:@(1) forKey:@"page"];
+    [parm setValue:@(9999) forKey:@"rows"];
+    [self request:get andWithUrl:url and:parm success:success faliure:faliure];
+}
+
+// 查询小组信息
+// tenantGroup/page
+
+/// 查询小组信息
+/// @param post post
+/// @param success 成功
+/// @param faliure 失败
++ (void)tenantGroupRequest:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    NSString *url = [NSString stringWithFormat:@"%@%@",hostURL, @"/api-teacher/tenantGroup/page"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+
+}
+
 @end

+ 15 - 14
KulexiuForTeacher/KulexiuForTeacher/Common/Define/KSDomain.h

@@ -11,28 +11,29 @@
 #define FILE_DOMAIN (@"klx/")
 
 //#ifdef DEBUG
-// 测试环境
-#define hostURL (@"https://dev.colexiu.com")
-#define SEALCLASSHOST (@"https://dev.colexiu.com/api-classroom")
-#define WEBHOST (@"https://dev.colexiu.com/teacher")
-#define SOCKET_URL (@"wss://dev.colexiu.com/audioAnalysis")
-#define JSPUSH_ENVIRONMENT (NO)
-#define RCIM_KEY (@"0vnjpoad0jbdz")
-#define SUBMIT_UUID (NO)
-#define CONFIG_TXSDKAPPID (1400805079)
-#define TXOfflinePushCertificateIDForAPNS (39559)
 
 // 开发环境
-//#define hostURL (@"https://test.colexiu.com")
-//#define SEALCLASSHOST (@"https://test.colexiu.com/api-classroom")
-//#define WEBHOST (@"https://test.colexiu.com/teacher")
-//#define SOCKET_URL (@"wss://test.colexiu.com/audioAnalysis")
+//#define hostURL (@"https://dev.colexiu.com")
+//#define SEALCLASSHOST (@"https://dev.colexiu.com/api-classroom")
+//#define WEBHOST (@"https://dev.colexiu.com/teacher")
+//#define SOCKET_URL (@"wss://dev.colexiu.com/audioAnalysis")
 //#define JSPUSH_ENVIRONMENT (NO)
 //#define RCIM_KEY (@"0vnjpoad0jbdz")
 //#define SUBMIT_UUID (NO)
 //#define CONFIG_TXSDKAPPID (1400805079)
 //#define TXOfflinePushCertificateIDForAPNS (39559)
 
+// 测试环境
+#define hostURL (@"https://test.colexiu.com")
+#define SEALCLASSHOST (@"https://test.colexiu.com/api-classroom")
+#define WEBHOST (@"https://test.colexiu.com/teacher")
+#define SOCKET_URL (@"wss://test.colexiu.com/audioAnalysis")
+#define JSPUSH_ENVIRONMENT (NO)
+#define RCIM_KEY (@"0vnjpoad0jbdz")
+#define SUBMIT_UUID (NO)
+#define CONFIG_TXSDKAPPID (1400805079)
+#define TXOfflinePushCertificateIDForAPNS (39559)
+
 // 预生产
 //#define hostURL (@"https://ponline.colexiu.com")
 //#define SEALCLASSHOST (@"https://ponline.colexiu.com/api-classroom")

+ 150 - 12
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/TenantGroup/TenantChooseMemberViewController.m

@@ -9,6 +9,8 @@
 #import "TenangGroupCreateBottomView.h"
 #import "TenentGroupAddMemberCell.h"
 #import "TenantStuModel.h"
+#import "TenantGroupChooseNavView.h"
+#import "TenantGroupSortView.h"
 
 @interface TenantChooseMemberViewController ()<UITableViewDelegate, UITableViewDataSource>
 
@@ -20,6 +22,23 @@
 
 @property (nonatomic, strong) NSMutableArray *chooseArray;
 
+@property (nonatomic, strong) TenantGroupChooseNavView *navView;
+
+@property (nonatomic, assign) BOOL isRequestConfig;
+
+@property (nonatomic, strong) dispatch_group_t requestGroup;
+
+@property (nonatomic, strong) NSMutableArray *subjectArray;
+
+@property (nonatomic, strong) NSMutableArray *groupArray;
+
+@property (nonatomic, strong) NSString *subjectId;
+
+@property (nonatomic, strong) NSString *groupId;
+
+@property (nonatomic, strong) TenantGroupSortView *sortView;
+
+
 @end
 
 @implementation TenantChooseMemberViewController
@@ -33,17 +52,77 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
-    [self allocTitle:@"选择群成员"];
+    self.ks_prefersNavigationBarHidden = YES;
+    [self requsetSortConfig];
     [self configUI];
     [self configEmptyStatus];
     [self requsetData];
 }
 
+- (void)requsetSortConfig {
+    self.isRequestConfig = YES;
+    [self requestSubjectMessage];
+    [self requestGroupMessage];
+    dispatch_group_notify(self.requestGroup, dispatch_get_main_queue(), ^{
+        self.isRequestConfig = NO;
+    });
+}
+
+- (void)requestSubjectMessage {
+    dispatch_group_enter(self.requestGroup);
+
+    [KSNetworkingManager subjectQueryPageRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *subjectArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
+            NSMutableArray *subjectParmArray = [NSMutableArray array];
+            for (NSDictionary *parm in subjectArray) {
+                NSMutableDictionary *orchestParm = [NSMutableDictionary dictionary];
+                [orchestParm setValue:[parm ks_stringValueForKey:@"id"] forKey:@"id"];
+                [orchestParm setValue:[parm ks_stringValueForKey:@"name"] forKey:@"name"];
+                [subjectParmArray addObject:orchestParm];
+            }
+            self.subjectArray = [subjectParmArray mutableCopy];
+        }
+
+        dispatch_group_leave(self.requestGroup);
+
+    } faliure:^(NSError * _Nonnull error) {
+        dispatch_group_leave(self.requestGroup);
+
+    }];
+}
+
+- (void)requestGroupMessage {
+    dispatch_group_enter(self.requestGroup);
+
+    [KSNetworkingManager tenantGroupRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
+        if ([dic ks_integerValueForKey:@"code"] == 200) {
+            NSArray *groupArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
+            NSMutableArray *groupParmArray = [NSMutableArray array];
+            for (NSDictionary *parm in groupArray) {
+                NSMutableDictionary *groupParm = [NSMutableDictionary dictionary];
+                [groupParm setValue:[parm ks_stringValueForKey:@"id"] forKey:@"id"];
+                [groupParm setValue:[parm ks_stringValueForKey:@"name"] forKey:@"name"];
+                [groupParmArray addObject:groupParm];
+            }
+            self.groupArray = [groupParmArray mutableCopy];
+        }
+        else {
+            
+        }
+        dispatch_group_leave(self.requestGroup);
+
+    } faliure:^(NSError * _Nonnull error) {
+        dispatch_group_leave(self.requestGroup);
+
+    }];
+}
+
 - (void)configEmptyStatus {
     [self setPromptString:@"暂无学员" imageName:@"wd_img_zwsj" inView:self.tableView];
 }
 - (void)requsetData {
-    [KSNetworkingManager tenantImUserFriendRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager tenantImUserFriendRequest:KS_POST subjectId:self.subjectId tenantGroupId:self.groupId success:^(NSDictionary * _Nonnull dic) {
         NSMutableArray *memberArray = [NSMutableArray array];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
@@ -106,10 +185,17 @@
 
 - (void)configUI {
     [self.scrollView removeFromSuperview];
+    [self.view addSubview:self.navView];
+    CGFloat navHeight = [TenantGroupChooseNavView getViewHeight];
+    [self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.mas_equalTo(self.view);
+        make.height.mas_equalTo(navHeight);
+    }];
     
     [self.view addSubview:self.tableView];
     [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.right.top.bottom.mas_equalTo(self.view);
+        make.top.mas_equalTo(self.navView.mas_bottom);
+        make.left.right.bottom.mas_equalTo(self.view);
     }];
     
     CGFloat bottomHeight = [TenangGroupCreateBottomView getViewHeight];
@@ -191,15 +277,6 @@
         self.callback(self.chooseArray);
         [self backAction];
     }
-//    if (self.chooseArray.count) {
-//        if (self.callback) {
-//            self.callback(self.chooseArray);
-//            [self backAction];
-//        }
-//    }
-//    else {
-//        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请选择群成员"];
-//    }
 }
 
 - (NSMutableArray *)chooseArray {
@@ -208,6 +285,67 @@
     }
     return _chooseArray;
 }
+
+- (TenantGroupChooseNavView *)navView {
+    if (!_navView) {
+        _navView = [TenantGroupChooseNavView shareInstance];
+        MJWeakSelf;
+        [_navView sortStuSortCallback:^(BOOL isBack) {
+            if (isBack) {
+                [self backAction];
+            }
+            else {
+                [weakSelf sortAction];
+            }
+        }];
+    }
+    return _navView;
+}
+
+- (void)sortAction {
+    if (self.isRequestConfig) {
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"加载中..."];
+        return;
+    }
+    [self.sortView configSubjectArray:self.subjectArray groupArray:self.groupArray];
+    [self.sortView showInView:self.view];
+}
+
+
+- (dispatch_group_t)requestGroup {
+    if (!_requestGroup) {
+        _requestGroup = dispatch_group_create();
+    }
+    return _requestGroup;
+}
+
+- (TenantGroupSortView *)sortView {
+    if (!_sortView) {
+        _sortView = [TenantGroupSortView shareInstance];
+        MJWeakSelf;
+        [_sortView sortAction:^(SORTACTION action, NSDictionary * _Nonnull parm) {
+            if (action == SORTACTION_SEARCH) {
+                [weakSelf searchWithParm:parm];
+            }
+        }];
+    }
+    return _sortView;
+}
+
+- (void)searchWithParm:(NSDictionary *)parm {
+    NSString *subjectId = [parm ks_stringValueForKey:@"subjectId"];
+    if ([NSString isEmptyString:subjectId]) {
+        subjectId = nil;
+    }
+    self.subjectId = subjectId;
+    
+    NSString *groupId = [parm ks_stringValueForKey:@"groupId"];
+    if ([NSString isEmptyString:groupId]) {
+        groupId = nil;
+    }
+    self.groupId = groupId;
+    [self requsetData];
+}
 /*
 #pragma mark - Navigation
 

+ 4 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupSettingViewController.m

@@ -143,6 +143,9 @@
         }
     } fail:^(int code, NSString *desc) {
         NSLog(@"failure, code:%d, desc:%@", code, desc);
+        [LOADING_MANAGER KSShowMsg:@"获取群信息失败" promptCompletion:^{
+            [self backAction];
+        }];
     }];
 }
 
@@ -274,7 +277,7 @@
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             
             [LOADING_MANAGER KSShowMsg:@"群已解散" promptCompletion:^{
-                [self removeCurrentConversation];
+//                [self removeCurrentConversation];
                 [self.navigationController popToRootViewControllerAnimated:YES];
             }];
         }

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/Tenant/TenantStuModel.h

@@ -44,7 +44,7 @@
 @property (nonatomic, assign) double isReal;
 @property (nonatomic, assign) double lockFlag;
 @property (nonatomic, strong) NSString *membershipStartTime;
-
+//@property (nonatomic, strong) NSString *
 @property (nonatomic, strong) NSString *imUserId;
 
 @property (nonatomic, assign) BOOL isChoose;

+ 24 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenantGroupChooseNavView.h

@@ -0,0 +1,24 @@
+//
+//  TenantGroupChooseNavView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2023/10/19.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef void(^ChooseStuSortCallback)(BOOL isBack);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface TenantGroupChooseNavView : UIView
+
++ (instancetype)shareInstance;
+
+- (void)sortStuSortCallback:(ChooseStuSortCallback)callback;
+
++ (CGFloat)getViewHeight;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 52 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenantGroupChooseNavView.m

@@ -0,0 +1,52 @@
+//
+//  TenantGroupChooseNavView.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2023/10/19.
+//
+
+#import "TenantGroupChooseNavView.h"
+
+@interface TenantGroupChooseNavView ()
+
+@property (nonatomic, copy) ChooseStuSortCallback callback;
+
+@end
+
+@implementation TenantGroupChooseNavView
+
++ (instancetype)shareInstance {
+    TenantGroupChooseNavView *view = [[[NSBundle mainBundle] loadNibNamed:@"TenantGroupChooseNavView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)sortStuSortCallback:(ChooseStuSortCallback)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+}
+
+- (IBAction)backAction:(id)sender {
+    if (self.callback) {
+        self.callback(YES);
+    }
+}
+
+- (IBAction)sortAction:(id)sender {
+    if (self.callback) {
+        self.callback(NO);
+    }
+}
+
++ (CGFloat)getViewHeight {
+    return kNaviBarHeight;
+}
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 100 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenantGroupChooseNavView.xib

@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
+        <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" id="iN0-l3-epB" customClass="TenantGroupChooseNavView">
+            <rect key="frame" x="0.0" y="0.0" width="393" height="105"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oU3-vz-Ghz">
+                    <rect key="frame" x="0.0" y="61" width="393" height="44"/>
+                    <subviews>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="courseware_back" translatesAutoresizingMaskIntoConstraints="NO" id="6ue-zB-8AM">
+                            <rect key="frame" x="14" y="11" width="22" height="22"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="22" id="6f4-vb-oSo"/>
+                                <constraint firstAttribute="height" constant="22" id="th8-rS-us8"/>
+                            </constraints>
+                        </imageView>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="选择群成员" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hZ2-gB-hLt">
+                            <rect key="frame" x="150.66666666666666" y="11.666666666666671" width="92" height="21"/>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
+                            <color key="textColor" red="0.074509803921568626" green="0.078431372549019607" blue="0.082352941176470587" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="v49-kw-5CC">
+                            <rect key="frame" x="0.0" y="0.0" width="44" height="44"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="44" id="oCg-JD-bAs"/>
+                            </constraints>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <connections>
+                                <action selector="backAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="st7-e7-HJC"/>
+                            </connections>
+                        </button>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="筛选" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RxY-mx-9XG">
+                            <rect key="frame" x="340" y="13.666666666666671" width="29" height="17"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                            <color key="textColor" red="0.10196078431372549" green="0.10196078431372549" blue="0.10196078431372549" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="arrow_dow_grey" translatesAutoresizingMaskIntoConstraints="NO" id="WZL-V4-C54">
+                            <rect key="frame" x="373" y="19.666666666666671" width="8" height="5"/>
+                        </imageView>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="keV-Sd-H6s">
+                            <rect key="frame" x="340" y="0.0" width="53" height="44"/>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <connections>
+                                <action selector="sortAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="NVi-jN-O7C"/>
+                            </connections>
+                        </button>
+                    </subviews>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                    <constraints>
+                        <constraint firstItem="hZ2-gB-hLt" firstAttribute="centerY" secondItem="oU3-vz-Ghz" secondAttribute="centerY" id="5f8-lJ-SwI"/>
+                        <constraint firstItem="v49-kw-5CC" firstAttribute="leading" secondItem="oU3-vz-Ghz" secondAttribute="leading" id="AhZ-j2-Vlb"/>
+                        <constraint firstItem="WZL-V4-C54" firstAttribute="centerY" secondItem="hZ2-gB-hLt" secondAttribute="centerY" id="BX9-gT-Rh9"/>
+                        <constraint firstItem="hZ2-gB-hLt" firstAttribute="centerX" secondItem="oU3-vz-Ghz" secondAttribute="centerX" id="JOB-X2-xhe"/>
+                        <constraint firstItem="6ue-zB-8AM" firstAttribute="centerY" secondItem="oU3-vz-Ghz" secondAttribute="centerY" id="RBa-Ga-svK"/>
+                        <constraint firstAttribute="height" constant="44" id="W1n-3N-YMO"/>
+                        <constraint firstAttribute="trailing" secondItem="keV-Sd-H6s" secondAttribute="trailing" id="bUh-b0-vbG"/>
+                        <constraint firstAttribute="bottom" secondItem="v49-kw-5CC" secondAttribute="bottom" id="h4d-h7-Oo0"/>
+                        <constraint firstAttribute="trailing" secondItem="WZL-V4-C54" secondAttribute="trailing" constant="12" id="iQ2-0n-dMm"/>
+                        <constraint firstItem="WZL-V4-C54" firstAttribute="leading" secondItem="RxY-mx-9XG" secondAttribute="trailing" constant="4" id="l3X-FJ-lFO"/>
+                        <constraint firstItem="RxY-mx-9XG" firstAttribute="centerY" secondItem="hZ2-gB-hLt" secondAttribute="centerY" id="ma7-Ee-vZo"/>
+                        <constraint firstItem="keV-Sd-H6s" firstAttribute="top" secondItem="oU3-vz-Ghz" secondAttribute="top" id="mdM-x7-Y0T"/>
+                        <constraint firstAttribute="bottom" secondItem="keV-Sd-H6s" secondAttribute="bottom" id="nZg-mc-KD4"/>
+                        <constraint firstItem="6ue-zB-8AM" firstAttribute="leading" secondItem="oU3-vz-Ghz" secondAttribute="leading" constant="14" id="rX1-7Q-I9j"/>
+                        <constraint firstItem="v49-kw-5CC" firstAttribute="top" secondItem="oU3-vz-Ghz" secondAttribute="top" id="uAo-zP-osp"/>
+                        <constraint firstItem="RxY-mx-9XG" firstAttribute="leading" secondItem="keV-Sd-H6s" secondAttribute="leading" id="xo5-Vl-2HK"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstAttribute="bottom" secondItem="oU3-vz-Ghz" secondAttribute="bottom" id="KEF-Jj-aRd"/>
+                <constraint firstItem="oU3-vz-Ghz" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="ZQx-8y-VzZ"/>
+                <constraint firstAttribute="trailing" secondItem="oU3-vz-Ghz" secondAttribute="trailing" id="ozM-VD-7PO"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <point key="canvasLocation" x="72.51908396946564" y="32.04225352112676"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="arrow_dow_grey" width="8" height="5"/>
+        <image name="courseware_back" width="22" height="22"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 31 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenantGroupSortView.h

@@ -0,0 +1,31 @@
+//
+//  TenantGroupSortView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2023/10/19.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef NS_ENUM(NSInteger, SORTACTION) {
+    SORTACTION_HIDE,
+    SORTACTION_SEARCH,
+};
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef void(^TenantSortCallback)(SORTACTION action, NSDictionary *parm);
+
+@interface TenantGroupSortView : UIView
+
++ (instancetype)shareInstance;
+
+- (void)configSubjectArray:(NSMutableArray *)subjectArray groupArray:(NSMutableArray *)groupArray;
+
+- (void)sortAction:(TenantSortCallback)callback;
+
+- (void)showInView:(UIView *)displayView;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 357 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenantGroupSortView.m

@@ -0,0 +1,357 @@
+//
+//  TenantGroupSortView.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2023/10/19.
+//
+
+#import "TenantGroupSortView.h"
+
+@interface TenantGroupSortView ()<UIGestureRecognizerDelegate>
+
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *viewHeight;
+
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottomHeight;
+
+@property (weak, nonatomic) IBOutlet UIView *bgView;
+
+@property (weak, nonatomic) IBOutlet UIView *bottomView;
+
+@property (nonatomic, strong) UIScrollView *containerScrollView;
+
+@property (nonatomic, strong) NSMutableArray *subjectArray;
+
+@property (nonatomic, strong) NSMutableArray *groupArray;
+
+@property (nonatomic, assign) NSInteger subjectChooseIndex;
+
+@property (nonatomic, assign) NSInteger groupChooseIndex;
+
+@property (nonatomic, copy) TenantSortCallback callback;
+
+@end
+
+@implementation TenantGroupSortView
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    [self configDefaultUI];
+}
+
+- (void)configDefaultUI {
+    if (IS_iPhoneX) {
+        self.bottomHeight.constant = 25 + 44 + iPhoneXSafeBottomMargin;
+    }
+    else {
+        self.bottomHeight.constant = 25 + 44 + 20;
+    }
+    [self.bgView addSubview:self.containerScrollView];
+    [self.containerScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.mas_equalTo(self.bgView);
+        make.top.mas_equalTo(self.bgView.mas_top).offset(69);
+        make.bottom.mas_equalTo(self.bgView.mas_bottom);
+    }];
+    self.bgView.layer.cornerRadius = 20;
+    self.bgView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
+    
+    UITapGestureRecognizer *gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction:)];
+    gesture.delegate = self;
+    [self addGestureRecognizer:gesture];
+}
+
+- (void)sortAction:(TenantSortCallback)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+}
+
++ (instancetype)shareInstance {
+    TenantGroupSortView *view = [[[NSBundle mainBundle] loadNibNamed:@"TenantGroupSortView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)configSubjectArray:(NSMutableArray *)subjectArray groupArray:(NSMutableArray *)groupArray {
+    self.subjectArray = [subjectArray mutableCopy];
+    self.groupArray = [groupArray mutableCopy];
+    [self configUI];
+}
+
+- (void)configUI {
+    [self.containerScrollView removeAllSubViews];
+    CGFloat topHeight = 0;
+    
+    UILabel *subjectTitle = [self createLabel:@"声部"];
+    [self.containerScrollView addSubview:subjectTitle];
+    [subjectTitle mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.mas_left).offset(16);
+        make.height.mas_equalTo(22.0f);
+        make.top.mas_equalTo(self.containerScrollView.mas_top);
+    }];
+    topHeight += 22.0f;
+    CGFloat midSpace = 8.0f;
+    CGFloat leftSpace = 16.0f;
+    CGFloat topSpace = 12.0f;
+    CGFloat buttonHeight = 32.0f;
+    CGFloat minWidth = 70.0f;
+    CGFloat maxWidth = KPortraitWidth - 16 - 15;
+    CGFloat xSpace = leftSpace;
+    CGFloat ySpace = topHeight + 14.0f;
+    for (NSInteger index = 0; index < self.subjectArray.count; index++) {
+        NSDictionary *parm = self.subjectArray[index];
+        NSString *title = [parm ks_stringValueForKey:@"name"];
+        UIButton *button = [self createButton:1000+index buttonTitle:title];
+        [self.containerScrollView addSubview:button];
+        if (self.subjectChooseIndex == 1000 + index) {
+            [self modifyButtonStatus:YES buttonIndex:1000+index];
+        }
+        CGFloat buttonWidth = [self getWidthWithString:title];
+        // 按钮宽度最小和最大限定
+        if (buttonWidth < minWidth) {
+            buttonWidth = minWidth;
+        }
+        else if (buttonWidth > maxWidth) {
+            buttonWidth = maxWidth;
+        }
+        
+        if (xSpace + buttonWidth - 16 > maxWidth) {
+            xSpace = leftSpace;
+            ySpace = ySpace + topSpace + buttonHeight;
+        }
+        [button mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.mas_equalTo(self.bgView.mas_left).offset(xSpace);
+            make.width.mas_equalTo(buttonWidth);
+            make.height.mas_equalTo(buttonHeight);
+            make.top.mas_equalTo(subjectTitle.mas_bottom).offset(ySpace);
+        }];
+        
+        xSpace += buttonWidth + midSpace;
+    }
+    xSpace = leftSpace;
+    topHeight = ySpace + 32 + 28;
+    
+    // 小组
+    UILabel *groupTitle = [self createLabel:@"小组"];
+    [self.containerScrollView addSubview:groupTitle];
+    [groupTitle mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.mas_left).offset(16);
+        make.height.mas_equalTo(22.0f);
+        make.top.mas_equalTo(subjectTitle.mas_bottom).offset(topHeight);
+    }];
+    topHeight += 22.0f;
+    ySpace = topHeight + 20;
+    for (NSInteger index = 0; index < self.groupArray.count; index++) {
+        NSDictionary *parm = self.groupArray[index];
+        NSString *title = [parm ks_stringValueForKey:@"name"];
+        UIButton *button = [self createButton:2000+index buttonTitle:title];
+        [self.containerScrollView addSubview:button];
+        if (self.groupChooseIndex == 2000 + index) {
+            [self modifyButtonStatus:YES buttonIndex:2000+index];
+        }
+        
+        CGFloat buttonWidth = [self getWidthWithString:title];
+        // 按钮宽度最小和最大限定
+        if (buttonWidth < minWidth) {
+            buttonWidth = minWidth;
+        }
+        else if (buttonWidth > maxWidth) {
+            buttonWidth = maxWidth;
+        }
+        
+        if (xSpace + buttonWidth - 16 > maxWidth) {
+            xSpace = leftSpace;
+            ySpace = ySpace + topSpace + buttonHeight;
+        }
+        
+        if (index == self.groupArray.count - 1) {
+            [button mas_makeConstraints:^(MASConstraintMaker *make) {
+                make.left.mas_equalTo(self.bgView.mas_left).offset(xSpace);
+                make.width.mas_equalTo(buttonWidth);
+                make.height.mas_equalTo(buttonHeight);
+                make.top.mas_equalTo(subjectTitle.mas_bottom).offset(ySpace);
+                make.bottom.mas_equalTo(self.containerScrollView.mas_bottom).offset(-28);
+            }];
+        }
+        else {
+            [button mas_makeConstraints:^(MASConstraintMaker *make) {
+                make.left.mas_equalTo(self.bgView.mas_left).offset(xSpace);
+                make.width.mas_equalTo(buttonWidth);
+                make.height.mas_equalTo(buttonHeight);
+                make.top.mas_equalTo(subjectTitle.mas_bottom).offset(ySpace);
+            }];
+        }
+        xSpace += buttonWidth + midSpace;
+    }
+    topHeight = ySpace + 28;
+
+    CGFloat viewHeight = topHeight + 69;
+    if (viewHeight> KPortraitHeight - kNaviBarHeight - self.bottomHeight.constant) {
+        self.viewHeight.constant = KPortraitHeight - kNaviBarHeight - self.bottomHeight.constant;
+    }
+    else {
+        self.viewHeight.constant = topHeight;
+    }
+}
+
+- (CGFloat)getWidthWithString:(NSString *)name {
+    CGFloat width = [name boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, 20.0f) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14.0f]} context:nil].size.width + 16;
+    return width;
+}
+
+
+- (void)modifyButtonStatus:(BOOL)isChoose buttonIndex:(NSInteger)buttonIndex {
+    UIButton *button = (UIButton *)[self.containerScrollView viewWithTag:buttonIndex];
+    if (isChoose) {
+        [button setBackgroundColor:HexRGB(0xF0FFFC)];
+        [button setTitleColor:HexRGB(0x2DC7AA) forState:UIControlStateNormal];
+        button.layer.borderColor = HexRGB(0x2DC7AA).CGColor;
+    }
+    else {
+        [button setBackgroundColor:HexRGB(0xF2F2F2)];
+        [button setTitleColor:HexRGB(0xAAAAAA) forState:UIControlStateNormal];
+        button.layer.borderColor = [UIColor clearColor].CGColor;
+    }
+}
+
+- (void)showInView:(UIView *)displayView {
+    [displayView addSubview:self];
+    [self mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.bottom.mas_equalTo(displayView);
+    }];
+}
+
+- (void)hideView {
+    [self removeFromSuperview];
+}
+
+- (UILabel *)createLabel:(NSString *)title {
+    UILabel *label = [[UILabel alloc] init];
+    label.text = title;
+    label.textColor = HexRGB(0x333333);
+    label.font = [UIFont systemFontOfSize:16.0f weight:UIFontWeightRegular];
+    return label;
+}
+
+- (UIButton *)createButton:(NSInteger)tag buttonTitle:(NSString *)buttonTitle {
+    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
+    button.tag = tag;
+    [button setTitle:buttonTitle forState:UIControlStateNormal];
+    [button.titleLabel setFont:[UIFont systemFontOfSize:14.0f weight:UIFontWeightRegular]];
+    button.titleLabel.lineBreakMode = NSLineBreakByTruncatingMiddle;
+    [button setTitleColor:HexRGB(0xAAAAAA) forState:UIControlStateNormal];
+    [button addTarget:self action:@selector(buttonClickAction:) forControlEvents:UIControlEventTouchUpInside];
+    button.layer.cornerRadius =  16.0f;
+    button.backgroundColor = HexRGB(0xF2F2F2);
+    button.layer.borderWidth = 1.0f;
+    button.layer.borderColor = [UIColor clearColor].CGColor;
+    return button;
+}
+
+- (void)buttonClickAction:(UIButton *)sender {
+    if (sender.tag >= 1000 && sender.tag < 2000) {
+        if (self.subjectChooseIndex > 0) {
+            if (self.subjectChooseIndex == sender.tag) {
+                self.subjectChooseIndex = 0;
+                [self modifyButtonStatus:NO buttonIndex:sender.tag];
+            }
+            else {
+                [self modifyButtonStatus:NO buttonIndex:self.subjectChooseIndex];
+                [self modifyButtonStatus:YES buttonIndex:sender.tag];
+                self.subjectChooseIndex = sender.tag;
+            }
+        }
+        else {
+            self.subjectChooseIndex = sender.tag;
+            [self modifyButtonStatus:YES buttonIndex:sender.tag];
+        }
+    }
+    else if (sender.tag >= 2000 && sender.tag < 3000) { // 小组
+        if (self.groupChooseIndex > 0) {
+            if (self.groupChooseIndex == sender.tag) {
+                self.groupChooseIndex = 0;
+                [self modifyButtonStatus:NO buttonIndex:sender.tag];
+            }
+            else {
+                [self modifyButtonStatus:NO buttonIndex:self.groupChooseIndex];
+                [self modifyButtonStatus:YES buttonIndex:sender.tag];
+                self.groupChooseIndex = sender.tag;
+            }
+        }
+        else {
+            self.groupChooseIndex = sender.tag;
+            [self modifyButtonStatus:YES buttonIndex:sender.tag];
+        }
+    }
+}
+
+- (IBAction)cancleAction:(id)sender {
+    [self hideView];
+}
+
+- (IBAction)resetAction:(id)sender {
+    [self resetView];
+    self.callback(SORTACTION_SEARCH, @{});
+}
+- (void)resetView {
+    if (self.subjectChooseIndex != 0) {
+        [self modifyButtonStatus:NO buttonIndex:self.subjectChooseIndex];
+        self.subjectChooseIndex = 0;
+    }
+    
+    if (self.groupChooseIndex != 0) {
+        [self modifyButtonStatus:NO buttonIndex:self.groupChooseIndex];
+        self.groupChooseIndex = 0;
+    }
+}
+- (IBAction)checkAction:(id)sender {
+    [self hideView];
+    if (self.callback) {
+        NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+        if (self.subjectChooseIndex != 0) {
+            NSDictionary *subjectParm = self.subjectArray[self.subjectChooseIndex - 1000];
+            [parm setValue:[subjectParm ks_stringValueForKey:@"id"] forKey:@"subjectId"];
+        }
+        else {
+            [parm setValue:@"" forKey:@"subjectId"];
+        }
+        
+        if (self.groupChooseIndex != 0) {
+            NSDictionary *roleParm = self.groupArray[self.groupChooseIndex - 2000];
+            [parm setValue:[roleParm ks_stringValueForKey:@"id"] forKey:@"groupId"];
+        }
+        else {
+            [parm setValue:@"" forKey:@"groupId"];
+        }
+        self.callback(SORTACTION_SEARCH, parm);
+    }
+}
+
+- (UIScrollView *)containerScrollView {
+    if (!_containerScrollView) {
+        _containerScrollView = [[UIScrollView alloc] init];
+    }
+    return _containerScrollView;
+}
+
+- (void)tapAction:(UITapGestureRecognizer *)gesture {
+    [self hideView];
+    if (self.callback) {
+        self.callback(SORTACTION_HIDE, @{});
+    }
+}
+
+
+- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
+    if ([touch.view isDescendantOfView:self.bgView] || [touch.view isDescendantOfView:self.bottomView]) {
+        return NO;
+    }
+    return YES;
+}
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 156 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenantGroupSortView.xib

@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
+        <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" id="iN0-l3-epB" customClass="TenantGroupSortView">
+            <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cuc-Y8-b12">
+                    <rect key="frame" x="0.0" y="369" width="393" height="380"/>
+                    <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="筛选" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="q0o-LW-PGb">
+                            <rect key="frame" x="178" y="19" width="37" height="25"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="25" id="3Kc-5t-cZz"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
+                            <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check_cancle" translatesAutoresizingMaskIntoConstraints="NO" id="g64-HX-Fcy">
+                            <rect key="frame" x="361" y="27" width="13" height="13"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="13" id="2pZ-Ro-dM3"/>
+                                <constraint firstAttribute="height" constant="13" id="E9C-eB-lwC"/>
+                            </constraints>
+                        </imageView>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YFw-7f-1Ue">
+                            <rect key="frame" x="349" y="11.666666666666686" width="44" height="44"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="44" id="ISv-hC-ekg"/>
+                                <constraint firstAttribute="width" constant="44" id="coS-mr-NdV"/>
+                            </constraints>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <connections>
+                                <action selector="cancleAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="gpI-P3-TAh"/>
+                            </connections>
+                        </button>
+                    </subviews>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                    <constraints>
+                        <constraint firstItem="q0o-LW-PGb" firstAttribute="centerX" secondItem="cuc-Y8-b12" secondAttribute="centerX" id="5QA-rr-dmi"/>
+                        <constraint firstItem="g64-HX-Fcy" firstAttribute="top" secondItem="cuc-Y8-b12" secondAttribute="top" constant="27" id="Dzu-lg-T63"/>
+                        <constraint firstItem="q0o-LW-PGb" firstAttribute="top" secondItem="cuc-Y8-b12" secondAttribute="top" constant="19" id="Htl-2l-5ee"/>
+                        <constraint firstItem="g64-HX-Fcy" firstAttribute="centerY" secondItem="YFw-7f-1Ue" secondAttribute="centerY" id="JEL-59-bqO"/>
+                        <constraint firstAttribute="height" constant="380" id="Org-pV-w2L"/>
+                        <constraint firstAttribute="trailing" secondItem="YFw-7f-1Ue" secondAttribute="trailing" id="Sli-AJ-918"/>
+                        <constraint firstAttribute="trailing" secondItem="g64-HX-Fcy" secondAttribute="trailing" constant="19" id="bdE-0v-Cy0"/>
+                    </constraints>
+                </view>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="p2L-JI-1Z7">
+                    <rect key="frame" x="0.0" y="749" width="393" height="103"/>
+                    <subviews>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fPn-f8-VJi">
+                            <rect key="frame" x="16" y="25" width="173" height="44"/>
+                            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="44" id="VzS-4X-Bpt"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="18"/>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" title="重置">
+                                <color key="titleColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
+                            </state>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                    <real key="value" value="1"/>
+                                </userDefinedRuntimeAttribute>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="22"/>
+                                </userDefinedRuntimeAttribute>
+                                <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                    <color key="value" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                            <connections>
+                                <action selector="resetAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="q2D-WI-iEe"/>
+                            </connections>
+                        </button>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Wla-wM-RJP">
+                            <rect key="frame" x="204" y="25" width="173" height="44"/>
+                            <color key="backgroundColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="44" id="Img-OC-4AJ"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="18"/>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" title="查询"/>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="22"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                            <connections>
+                                <action selector="checkAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="KTW-bQ-G2b"/>
+                            </connections>
+                        </button>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tTP-F6-N9m">
+                            <rect key="frame" x="0.0" y="0.0" width="393" height="1"/>
+                            <color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="1" id="gsu-0c-na1"/>
+                            </constraints>
+                        </view>
+                    </subviews>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="103" id="3RU-4o-XhD"/>
+                        <constraint firstItem="Wla-wM-RJP" firstAttribute="top" secondItem="fPn-f8-VJi" secondAttribute="top" id="3d9-mc-BW7"/>
+                        <constraint firstAttribute="trailing" secondItem="tTP-F6-N9m" secondAttribute="trailing" id="9n1-40-CRp"/>
+                        <constraint firstItem="fPn-f8-VJi" firstAttribute="top" secondItem="tTP-F6-N9m" secondAttribute="bottom" constant="24" id="CCu-Yj-ysz"/>
+                        <constraint firstItem="tTP-F6-N9m" firstAttribute="leading" secondItem="p2L-JI-1Z7" secondAttribute="leading" id="U1C-1Q-RQv"/>
+                        <constraint firstItem="fPn-f8-VJi" firstAttribute="leading" secondItem="p2L-JI-1Z7" secondAttribute="leading" constant="16" id="kXl-w9-EhN"/>
+                        <constraint firstAttribute="trailing" secondItem="Wla-wM-RJP" secondAttribute="trailing" constant="16" id="mfm-OT-6JV"/>
+                        <constraint firstItem="Wla-wM-RJP" firstAttribute="width" secondItem="fPn-f8-VJi" secondAttribute="width" id="mit-UD-zO1"/>
+                        <constraint firstItem="tTP-F6-N9m" firstAttribute="top" secondItem="p2L-JI-1Z7" secondAttribute="top" id="oI9-mo-cgb"/>
+                        <constraint firstItem="Wla-wM-RJP" firstAttribute="leading" secondItem="fPn-f8-VJi" secondAttribute="trailing" constant="15" id="q9V-rl-x3Y"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
+            <constraints>
+                <constraint firstAttribute="bottom" secondItem="p2L-JI-1Z7" secondAttribute="bottom" id="7r3-pR-UbS"/>
+                <constraint firstAttribute="trailing" secondItem="cuc-Y8-b12" secondAttribute="trailing" id="CUw-z9-gVy"/>
+                <constraint firstItem="cuc-Y8-b12" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="bR1-pW-6jo"/>
+                <constraint firstAttribute="trailing" secondItem="p2L-JI-1Z7" secondAttribute="trailing" id="jhx-Ry-aE0"/>
+                <constraint firstItem="p2L-JI-1Z7" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="pqT-tg-gVh"/>
+                <constraint firstItem="p2L-JI-1Z7" firstAttribute="top" secondItem="cuc-Y8-b12" secondAttribute="bottom" id="sPU-Cu-Sus"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="bgView" destination="cuc-Y8-b12" id="gzM-Nj-aPX"/>
+                <outlet property="bottomHeight" destination="3RU-4o-XhD" id="6kz-zf-GfL"/>
+                <outlet property="bottomView" destination="p2L-JI-1Z7" id="uMg-QA-GMC"/>
+                <outlet property="viewHeight" destination="Org-pV-w2L" id="mRa-eL-Jdx"/>
+            </connections>
+            <point key="canvasLocation" x="72.51908396946564" y="-12.67605633802817"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="check_cancle" width="14" height="14"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 6 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenentGroupAddMemberCell.m

@@ -9,11 +9,14 @@
 
 @interface TenentGroupAddMemberCell ()
 
+@property (weak, nonatomic) IBOutlet UILabel *subjectName;
+
 @property (weak, nonatomic) IBOutlet UIImageView *studentAvatar;
 
 @property (weak, nonatomic) IBOutlet UILabel *studentName;
 
 @property (weak, nonatomic) IBOutlet UIImageView *chooseImge;
+@property (weak, nonatomic) IBOutlet UILabel *tenantGroupName;
 
 @end
 
@@ -30,6 +33,9 @@
     self.studentName.text = [NSString returnNoNullStringWithString:model.username];
     NSString *statusImage = model.isChoose ? @"tenant_group_choose" : @"tenant_group_unchoose";
     [self.chooseImge setImage:[UIImage imageNamed:statusImage]];
+    
+    self.subjectName.text = [NSString returnNoNullStringWithString:model.subjectName];
+    self.tenantGroupName.text = [NSString returnNoNullStringWithString:model.tenantName];
 }
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {

+ 61 - 15
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenentGroupAddMemberCell.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" 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="21679"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -18,10 +18,10 @@
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_avatarRectangle" translatesAutoresizingMaskIntoConstraints="NO" id="nlI-f2-DdF">
-                        <rect key="frame" x="18" y="18" width="39" height="39"/>
+                        <rect key="frame" x="15" y="18" width="40" height="40"/>
                         <constraints>
-                            <constraint firstAttribute="height" constant="39" id="JiH-jP-SLa"/>
-                            <constraint firstAttribute="width" constant="39" id="zec-Qq-d6n"/>
+                            <constraint firstAttribute="height" constant="40" id="JiH-jP-SLa"/>
+                            <constraint firstAttribute="width" constant="40" id="zec-Qq-d6n"/>
                         </constraints>
                         <userDefinedRuntimeAttributes>
                             <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
@@ -36,33 +36,77 @@
                             <constraint firstAttribute="height" constant="1" id="MOs-uI-mtV"/>
                         </constraints>
                     </view>
-                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Mvz-r4-out">
-                        <rect key="frame" x="71" y="26" width="0.0" height="24"/>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="gagaga " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Mvz-r4-out">
+                        <rect key="frame" x="68" y="18" width="60.333333333333343" height="22"/>
                         <constraints>
-                            <constraint firstAttribute="height" constant="24" id="fga-dz-bG5"/>
+                            <constraint firstAttribute="height" constant="22" id="fga-dz-bG5"/>
                         </constraints>
-                        <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="17"/>
+                        <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/>
                         <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tenant_group_unchoose" translatesAutoresizingMaskIntoConstraints="NO" id="MdD-xr-8Fs">
-                        <rect key="frame" x="272" y="27" width="18" height="18"/>
+                        <rect key="frame" x="269" y="27" width="18" height="18"/>
                         <constraints>
                             <constraint firstAttribute="width" constant="18" id="l57-sS-Vc6"/>
                             <constraint firstAttribute="height" constant="18" id="ul9-P6-e5Q"/>
                         </constraints>
                     </imageView>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wYJ-rN-29v">
+                        <rect key="frame" x="134.33333333333334" y="20" width="32.666666666666657" height="18"/>
+                        <subviews>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" text="竖笛" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4hx-lm-7oc">
+                                <rect key="frame" x="5.0000000000000018" y="0.0" width="24.666666666666671" height="18"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                                <color key="textColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                        </subviews>
+                        <color key="backgroundColor" red="0.93725490196078431" green="0.98431372549019602" blue="0.97647058823529409" alpha="1" colorSpace="calibratedRGB"/>
+                        <constraints>
+                            <constraint firstItem="4hx-lm-7oc" firstAttribute="top" secondItem="wYJ-rN-29v" secondAttribute="top" id="6ww-JQ-XF4"/>
+                            <constraint firstAttribute="height" constant="18" id="Yjg-ZM-LR8"/>
+                            <constraint firstItem="4hx-lm-7oc" firstAttribute="leading" secondItem="wYJ-rN-29v" secondAttribute="leading" constant="5" id="lhC-UI-RjB"/>
+                            <constraint firstAttribute="bottom" secondItem="4hx-lm-7oc" secondAttribute="bottom" id="mGL-jA-RSB"/>
+                            <constraint firstAttribute="trailing" secondItem="4hx-lm-7oc" secondAttribute="trailing" constant="3" id="ny6-Ch-QT4"/>
+                        </constraints>
+                        <userDefinedRuntimeAttributes>
+                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                <real key="value" value="4"/>
+                            </userDefinedRuntimeAttribute>
+                            <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                <real key="value" value="1"/>
+                            </userDefinedRuntimeAttribute>
+                            <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                <color key="value" red="0.58823529411764708" green="0.88627450980392153" blue="0.83137254901960778" alpha="1" colorSpace="calibratedRGB"/>
+                            </userDefinedRuntimeAttribute>
+                        </userDefinedRuntimeAttributes>
+                    </view>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="武汉市洪山区街道第二小学小组" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OaN-4i-kZE">
+                        <rect key="frame" x="68" y="41" width="196" height="20"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="20" id="r6k-eg-MAw"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                        <color key="textColor" red="0.46666666666666667" green="0.46666666666666667" blue="0.46666666666666667" alpha="1" colorSpace="calibratedRGB"/>
+                        <nil key="highlightedColor"/>
+                    </label>
                 </subviews>
                 <constraints>
-                    <constraint firstItem="MdD-xr-8Fs" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Mvz-r4-out" secondAttribute="trailing" constant="10" id="0RG-GH-Z3F"/>
+                    <constraint firstItem="MdD-xr-8Fs" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="wYJ-rN-29v" secondAttribute="trailing" constant="10" id="2HT-gp-uwZ"/>
                     <constraint firstAttribute="trailing" secondItem="ZLW-LU-SQ0" secondAttribute="trailing" constant="25" id="2zM-RJ-PRM"/>
+                    <constraint firstItem="OaN-4i-kZE" firstAttribute="leading" secondItem="Mvz-r4-out" secondAttribute="leading" id="LMH-d5-nyP"/>
                     <constraint firstItem="MdD-xr-8Fs" firstAttribute="top" secondItem="nlI-f2-DdF" secondAttribute="top" constant="9" id="LtV-IZ-KoZ"/>
                     <constraint firstItem="ZLW-LU-SQ0" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="Qao-le-m1c"/>
-                    <constraint firstItem="nlI-f2-DdF" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="18" id="ei7-gW-OVt"/>
+                    <constraint firstItem="wYJ-rN-29v" firstAttribute="leading" secondItem="Mvz-r4-out" secondAttribute="trailing" constant="6" id="Urs-uK-dP0"/>
+                    <constraint firstItem="MdD-xr-8Fs" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="OaN-4i-kZE" secondAttribute="trailing" constant="5" id="Z89-X6-aa8"/>
+                    <constraint firstItem="nlI-f2-DdF" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="ei7-gW-OVt"/>
                     <constraint firstAttribute="bottom" secondItem="ZLW-LU-SQ0" secondAttribute="bottom" id="hUW-Nw-qXg"/>
-                    <constraint firstItem="Mvz-r4-out" firstAttribute="leading" secondItem="nlI-f2-DdF" secondAttribute="trailing" constant="14" id="qLy-2I-1cX"/>
-                    <constraint firstItem="Mvz-r4-out" firstAttribute="top" secondItem="nlI-f2-DdF" secondAttribute="top" constant="8" id="svb-aW-kvf"/>
-                    <constraint firstAttribute="trailing" secondItem="MdD-xr-8Fs" secondAttribute="trailing" constant="30" id="vGy-m2-yyQ"/>
+                    <constraint firstItem="OaN-4i-kZE" firstAttribute="top" secondItem="Mvz-r4-out" secondAttribute="bottom" constant="1" id="iuj-QN-Jez"/>
+                    <constraint firstItem="Mvz-r4-out" firstAttribute="leading" secondItem="nlI-f2-DdF" secondAttribute="trailing" constant="13" id="qLy-2I-1cX"/>
+                    <constraint firstItem="wYJ-rN-29v" firstAttribute="centerY" secondItem="Mvz-r4-out" secondAttribute="centerY" id="rvk-xx-o4O"/>
+                    <constraint firstItem="Mvz-r4-out" firstAttribute="top" secondItem="nlI-f2-DdF" secondAttribute="top" id="svb-aW-kvf"/>
+                    <constraint firstAttribute="trailing" secondItem="MdD-xr-8Fs" secondAttribute="trailing" constant="33" id="vGy-m2-yyQ"/>
                     <constraint firstItem="nlI-f2-DdF" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="18" id="vse-rB-Xdy"/>
                 </constraints>
             </tableViewCellContentView>
@@ -71,6 +115,8 @@
                 <outlet property="chooseImge" destination="MdD-xr-8Fs" id="F2U-2i-DB9"/>
                 <outlet property="studentAvatar" destination="nlI-f2-DdF" id="jed-Ik-PQW"/>
                 <outlet property="studentName" destination="Mvz-r4-out" id="816-Ua-uHs"/>
+                <outlet property="subjectName" destination="4hx-lm-7oc" id="vtG-mX-Gye"/>
+                <outlet property="tenantGroupName" destination="OaN-4i-kZE" id="h9O-Vh-P25"/>
             </connections>
             <point key="canvasLocation" x="80.916030534351137" y="1.7605633802816902"/>
         </tableViewCell>

+ 3 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/TXLiveModule/Controller/TXLiveRoomViewController.m

@@ -1200,9 +1200,9 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
                 return;
             }
             else if ([message isMemberOfClass:[TXLiveMessageMemberUp class]]) {
-                TXLiveMessageMemberUp *member = (TXLiveMessageMemberUp *)message;
-                __blockSelf.totalCount = member.count;
-                [__blockSelf countMemberCount];
+//                TXLiveMessageMemberUp *member = (TXLiveMessageMemberUp *)message;
+//                __blockSelf.totalCount = member.count;
+//                [__blockSelf countMemberCount];
                 return;
             }
             else if ([message isMemberOfClass:[TXLiveMessageStatSync class]]) { // 数据同步 不取点赞数