Browse Source

老师端粉丝群

Steven 3 years ago
parent
commit
69eb7e76fb

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

@@ -525,6 +525,7 @@
 		BC8C2C7A28264CF400FBA5D5 /* ReceiveEvaluateListController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8C2C7928264CF400FBA5D5 /* ReceiveEvaluateListController.m */; };
 		BC9473FD282A5E71004B3B27 /* NoticeSourceModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9473FB282A5E71004B3B27 /* NoticeSourceModel.m */; };
 		BCA193B5282A80AA004A585D /* RecentCourseModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA193B3282A80A9004A585D /* RecentCourseModel.m */; };
+		BCA193BE282B9866004A585D /* MinePageGroupModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA193BC282B9866004A585D /* MinePageGroupModel.m */; };
 		BCA723FB2806A96000DA0D0D /* HomeworkDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA723FA2806A96000DA0D0D /* HomeworkDetailViewController.m */; };
 		BCA723FF2806AEA000DA0D0D /* AccompanyHomeworkCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA723FD2806AEA000DA0D0D /* AccompanyHomeworkCell.m */; };
 		BCA724002806AEA000DA0D0D /* AccompanyHomeworkCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCA723FE2806AEA000DA0D0D /* AccompanyHomeworkCell.xib */; };
@@ -1667,6 +1668,8 @@
 		BC9473FC282A5E71004B3B27 /* NoticeSourceModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NoticeSourceModel.h; sourceTree = "<group>"; };
 		BCA193B3282A80A9004A585D /* RecentCourseModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RecentCourseModel.m; sourceTree = "<group>"; };
 		BCA193B4282A80A9004A585D /* RecentCourseModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecentCourseModel.h; sourceTree = "<group>"; };
+		BCA193BC282B9866004A585D /* MinePageGroupModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MinePageGroupModel.m; sourceTree = "<group>"; };
+		BCA193BD282B9866004A585D /* MinePageGroupModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MinePageGroupModel.h; sourceTree = "<group>"; };
 		BCA723F92806A96000DA0D0D /* HomeworkDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeworkDetailViewController.h; sourceTree = "<group>"; };
 		BCA723FA2806A96000DA0D0D /* HomeworkDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeworkDetailViewController.m; sourceTree = "<group>"; };
 		BCA723FC2806AEA000DA0D0D /* AccompanyHomeworkCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccompanyHomeworkCell.h; sourceTree = "<group>"; };
@@ -2275,6 +2278,8 @@
 		275FA55B27F31A7400EB6240 /* Model */ = {
 			isa = PBXGroup;
 			children = (
+				BCA193BD282B9866004A585D /* MinePageGroupModel.h */,
+				BCA193BC282B9866004A585D /* MinePageGroupModel.m */,
 			);
 			path = Model;
 			sourceTree = "<group>";
@@ -5572,6 +5577,7 @@
 				2779321C27E30FC30010E277 /* prodectButton.m in Sources */,
 				BCE6A08B27F823A300C97704 /* AccompanyCourseCell.m in Sources */,
 				BCC9F42627F69BD200647449 /* KSWhiteboardView.m in Sources */,
+				BCA193BE282B9866004A585D /* MinePageGroupModel.m in Sources */,
 				27F9CAEA27EC1780003E0FE4 /* KSJXBodyView.m in Sources */,
 				BCB633F827F6A18200ACFDCF /* KSTipsView.m in Sources */,
 				275E3DF627F467ED0010EC30 /* KSChatroomTextCell.m in Sources */,

BIN
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate


+ 4 - 84
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -83,22 +83,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "FD38EDFC-31E9-4CA2-9E97-5C867C7DC46D"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Mine/LiveCourse/View/MyLiveCourseBodyView.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "162"
-            endingLineNumber = "162"
-            landmarkName = "-requestData"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "BE815144-D68B-47B8-AA5D-BA2F41E7BB3D"
             shouldBeEnabled = "No"
             ignoreCount = "0"
@@ -227,22 +211,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "C7415961-E73D-41C2-86F5-7507AFF36BEC"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "990"
-            endingLineNumber = "990"
-            landmarkName = "-submitUrlWith:videoUrl:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "46F327E8-372B-4494-B693-F95593F0689E"
             shouldBeEnabled = "No"
             ignoreCount = "0"
@@ -330,8 +298,8 @@
             filePath = "KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1082"
-            endingLineNumber = "1082"
+            startingLineNumber = "1079"
+            endingLineNumber = "1079"
             landmarkName = "-documentPicker:didPickDocumentAtURL:"
             landmarkType = "7">
          </BreakpointContent>
@@ -346,59 +314,11 @@
             filePath = "KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1052"
-            endingLineNumber = "1052"
+            startingLineNumber = "1049"
+            endingLineNumber = "1049"
             landmarkName = "-documentPicker:didPickDocumentAtURL:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "971014A9-C061-43E3-81DA-63AF8A88A09B"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "938"
-            endingLineNumber = "938"
-            landmarkName = "-uploadImageArray:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "5C38C352-734D-4E17-9E58-6F01BA04271B"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "946"
-            endingLineNumber = "946"
-            landmarkName = "-uploadImageArray:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "58FB6DF8-7978-4C70-BAC3-A5B8F3BF24C9"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "933"
-            endingLineNumber = "933"
-            landmarkName = "-uploadImageArray:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 0 - 3
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m

@@ -1041,9 +1041,6 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     }
 }
 
-//- (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls {
-//    NSLog(@"---");
-//}
 - (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentAtURL:(NSURL *)url {
     NSArray *array = [[url absoluteString] componentsSeparatedByString:@"/"];
     NSString *fileName = [array lastObject];

+ 7 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h

@@ -436,6 +436,13 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param faliure 失败
 + (void)imGroupModify:(NSString *)post name:(NSString *)name groupId:(NSString *)groupId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
+// /api-teacher/imGroup/queryTeacherGroup
+
+/// 获取老师粉丝群列表
+/// @param post post
+/// @param success 成功
+/// @param faliure 失败
++ (void)queryTeacherGroupRequest:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 #pragma mark ---- 群公告
 // /api-teacher/imGroupNotice/queryPage
 

+ 14 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m

@@ -941,6 +941,20 @@
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 
+// /api-teacher/imGroup/queryTeacherGroup
+
+/// 获取老师粉丝群列表
+/// @param post post
+/// @param success 成功
+/// @param faliure 失败
++ (void)queryTeacherGroupRequest:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@",hostURL, @"/api-teacher/imGroup/queryTeacherGroup"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:UserDefault(UIDKey) forKey:@"createUserId"];
+    [parm setValue:@"FAN" forKey:@"type"];
+    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+}
 #pragma mark ---- 群公告
 // /api-teacher/imGroupNotice/queryPage
 

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Define/PrefixHeader.pch

@@ -115,7 +115,7 @@ shouldPrevent = NO; \
 #define SEALCLASSHOST (@"http://dev.colexiu.com/api-im")
 #define WEBHOST (@"http://dev.colexiu.com/teacher")
 //#define WEBHOST (@"http://192.168.3.13:5002")
-#define WEBHOST (@"http://192.168.3.63:5000")
+//#define WEBHOST (@"http://192.168.3.63:5000")
 
 #define SOCKET_URL (@"ws://mteadev.colexiu.com/audioAnalysis")
 #define JSPUSH_ENVIRONMENT (NO)

+ 32 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/Model/MinePageGroupModel.h

@@ -0,0 +1,32 @@
+//
+//  MinePageGroupModel.h
+//
+//  Created by Steven  on 2022/5/11
+//  Copyright (c) 2022 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+
+
+@interface MinePageGroupModel : NSObject <NSCoding, NSCopying>
+
+@property (nonatomic, strong) NSString *internalBaseClassIdentifier;
+@property (nonatomic, strong) NSString *name;
+@property (nonatomic, assign) double createBy;
+@property (nonatomic, strong) NSString *memo;
+@property (nonatomic, assign) BOOL autoPassFlag;
+@property (nonatomic, strong) NSString *img;
+@property (nonatomic, strong) NSString *type;
+@property (nonatomic, assign) double memberNum;
+@property (nonatomic, strong) NSString *createTime;
+@property (nonatomic, assign) BOOL hasWaitAuditFlag;
+@property (nonatomic, assign) BOOL existFlag;
+@property (nonatomic, strong) NSString *introduce;
+@property (nonatomic, strong) NSString *updateTime;
+
++ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
+- (instancetype)initWithDictionary:(NSDictionary *)dict;
+- (NSDictionary *)dictionaryRepresentation;
+
+@end

+ 183 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/Model/MinePageGroupModel.m

@@ -0,0 +1,183 @@
+//
+//  MinePageGroupModel.m
+//
+//  Created by Steven  on 2022/5/11
+//  Copyright (c) 2022 __MyCompanyName__. All rights reserved.
+//
+
+#import "MinePageGroupModel.h"
+
+
+NSString *const kMinePageGroupModelId = @"id";
+NSString *const kMinePageGroupModelName = @"name";
+NSString *const kMinePageGroupModelCreateBy = @"createBy";
+NSString *const kMinePageGroupModelMemo = @"memo";
+NSString *const kMinePageGroupModelAutoPassFlag = @"autoPassFlag";
+NSString *const kMinePageGroupModelImg = @"img";
+NSString *const kMinePageGroupModelType = @"type";
+NSString *const kMinePageGroupModelMemberNum = @"memberNum";
+NSString *const kMinePageGroupModelCreateTime = @"createTime";
+NSString *const kMinePageGroupModelHasWaitAuditFlag = @"hasWaitAuditFlag";
+NSString *const kMinePageGroupModelExistFlag = @"existFlag";
+NSString *const kMinePageGroupModelIntroduce = @"introduce";
+NSString *const kMinePageGroupModelUpdateTime = @"updateTime";
+
+
+@interface MinePageGroupModel ()
+
+- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
+
+@end
+
+@implementation MinePageGroupModel
+
+@synthesize internalBaseClassIdentifier = _internalBaseClassIdentifier;
+@synthesize name = _name;
+@synthesize createBy = _createBy;
+@synthesize memo = _memo;
+@synthesize autoPassFlag = _autoPassFlag;
+@synthesize img = _img;
+@synthesize type = _type;
+@synthesize memberNum = _memberNum;
+@synthesize createTime = _createTime;
+@synthesize hasWaitAuditFlag = _hasWaitAuditFlag;
+@synthesize existFlag = _existFlag;
+@synthesize introduce = _introduce;
+@synthesize updateTime = _updateTime;
+
+
++ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
+{
+    return [[self alloc] initWithDictionary:dict];
+}
+
+- (instancetype)initWithDictionary:(NSDictionary *)dict
+{
+    self = [super init];
+    
+    // This check serves to make sure that a non-NSDictionary object
+    // passed into the model class doesn't break the parsing.
+    if(self && [dict isKindOfClass:[NSDictionary class]]) {
+            self.internalBaseClassIdentifier = [self objectOrNilForKey:kMinePageGroupModelId fromDictionary:dict];
+            self.name = [self objectOrNilForKey:kMinePageGroupModelName fromDictionary:dict];
+            self.createBy = [[self objectOrNilForKey:kMinePageGroupModelCreateBy fromDictionary:dict] doubleValue];
+            self.memo = [self objectOrNilForKey:kMinePageGroupModelMemo fromDictionary:dict];
+            self.autoPassFlag = [[self objectOrNilForKey:kMinePageGroupModelAutoPassFlag fromDictionary:dict] boolValue];
+            self.img = [self objectOrNilForKey:kMinePageGroupModelImg fromDictionary:dict];
+            self.type = [self objectOrNilForKey:kMinePageGroupModelType fromDictionary:dict];
+            self.memberNum = [[self objectOrNilForKey:kMinePageGroupModelMemberNum fromDictionary:dict] doubleValue];
+            self.createTime = [self objectOrNilForKey:kMinePageGroupModelCreateTime fromDictionary:dict];
+            self.hasWaitAuditFlag = [[self objectOrNilForKey:kMinePageGroupModelHasWaitAuditFlag fromDictionary:dict] boolValue];
+            self.existFlag = [[self objectOrNilForKey:kMinePageGroupModelExistFlag fromDictionary:dict] boolValue];
+            self.introduce = [self objectOrNilForKey:kMinePageGroupModelIntroduce fromDictionary:dict];
+            self.updateTime = [self objectOrNilForKey:kMinePageGroupModelUpdateTime fromDictionary:dict];
+
+    }
+    
+    return self;
+    
+}
+
+- (NSDictionary *)dictionaryRepresentation
+{
+    NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
+    [mutableDict setValue:self.internalBaseClassIdentifier forKey:kMinePageGroupModelId];
+    [mutableDict setValue:self.name forKey:kMinePageGroupModelName];
+    [mutableDict setValue:[NSNumber numberWithDouble:self.createBy] forKey:kMinePageGroupModelCreateBy];
+    [mutableDict setValue:self.memo forKey:kMinePageGroupModelMemo];
+    [mutableDict setValue:[NSNumber numberWithBool:self.autoPassFlag] forKey:kMinePageGroupModelAutoPassFlag];
+    [mutableDict setValue:self.img forKey:kMinePageGroupModelImg];
+    [mutableDict setValue:self.type forKey:kMinePageGroupModelType];
+    [mutableDict setValue:[NSNumber numberWithDouble:self.memberNum] forKey:kMinePageGroupModelMemberNum];
+    [mutableDict setValue:self.createTime forKey:kMinePageGroupModelCreateTime];
+    [mutableDict setValue:[NSNumber numberWithBool:self.hasWaitAuditFlag] forKey:kMinePageGroupModelHasWaitAuditFlag];
+    [mutableDict setValue:[NSNumber numberWithBool:self.existFlag] forKey:kMinePageGroupModelExistFlag];
+    [mutableDict setValue:self.introduce forKey:kMinePageGroupModelIntroduce];
+    [mutableDict setValue:self.updateTime forKey:kMinePageGroupModelUpdateTime];
+
+    return [NSDictionary dictionaryWithDictionary:mutableDict];
+}
+
+- (NSString *)description 
+{
+    return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
+}
+
+#pragma mark - Helper Method
+- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict
+{
+    id object = [dict objectForKey:aKey];
+    if ([object isKindOfClass:[NSNumber class]]) {
+        NSNumber *number = object;
+        object = [number stringValue];
+    }
+    return [object isEqual:[NSNull null]] ? nil : object;
+}
+
+
+#pragma mark - NSCoding Methods
+
+- (id)initWithCoder:(NSCoder *)aDecoder
+{
+    self = [super init];
+
+    self.internalBaseClassIdentifier = [aDecoder decodeObjectForKey:kMinePageGroupModelId];
+    self.name = [aDecoder decodeObjectForKey:kMinePageGroupModelName];
+    self.createBy = [aDecoder decodeDoubleForKey:kMinePageGroupModelCreateBy];
+    self.memo = [aDecoder decodeObjectForKey:kMinePageGroupModelMemo];
+    self.autoPassFlag = [aDecoder decodeBoolForKey:kMinePageGroupModelAutoPassFlag];
+    self.img = [aDecoder decodeObjectForKey:kMinePageGroupModelImg];
+    self.type = [aDecoder decodeObjectForKey:kMinePageGroupModelType];
+    self.memberNum = [aDecoder decodeDoubleForKey:kMinePageGroupModelMemberNum];
+    self.createTime = [aDecoder decodeObjectForKey:kMinePageGroupModelCreateTime];
+    self.hasWaitAuditFlag = [aDecoder decodeBoolForKey:kMinePageGroupModelHasWaitAuditFlag];
+    self.existFlag = [aDecoder decodeBoolForKey:kMinePageGroupModelExistFlag];
+    self.introduce = [aDecoder decodeObjectForKey:kMinePageGroupModelIntroduce];
+    self.updateTime = [aDecoder decodeObjectForKey:kMinePageGroupModelUpdateTime];
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)aCoder
+{
+
+    [aCoder encodeObject:_internalBaseClassIdentifier forKey:kMinePageGroupModelId];
+    [aCoder encodeObject:_name forKey:kMinePageGroupModelName];
+    [aCoder encodeDouble:_createBy forKey:kMinePageGroupModelCreateBy];
+    [aCoder encodeObject:_memo forKey:kMinePageGroupModelMemo];
+    [aCoder encodeBool:_autoPassFlag forKey:kMinePageGroupModelAutoPassFlag];
+    [aCoder encodeObject:_img forKey:kMinePageGroupModelImg];
+    [aCoder encodeObject:_type forKey:kMinePageGroupModelType];
+    [aCoder encodeDouble:_memberNum forKey:kMinePageGroupModelMemberNum];
+    [aCoder encodeObject:_createTime forKey:kMinePageGroupModelCreateTime];
+    [aCoder encodeBool:_hasWaitAuditFlag forKey:kMinePageGroupModelHasWaitAuditFlag];
+    [aCoder encodeBool:_existFlag forKey:kMinePageGroupModelExistFlag];
+    [aCoder encodeObject:_introduce forKey:kMinePageGroupModelIntroduce];
+    [aCoder encodeObject:_updateTime forKey:kMinePageGroupModelUpdateTime];
+}
+
+- (id)copyWithZone:(NSZone *)zone
+{
+    MinePageGroupModel *copy = [[MinePageGroupModel alloc] init];
+    
+    if (copy) {
+
+        copy.internalBaseClassIdentifier = [self.internalBaseClassIdentifier copyWithZone:zone];
+        copy.name = [self.name copyWithZone:zone];
+        copy.createBy = self.createBy;
+        copy.memo = [self.memo copyWithZone:zone];
+        copy.autoPassFlag = self.autoPassFlag;
+        copy.img = [self.img copyWithZone:zone];
+        copy.type = [self.type copyWithZone:zone];
+        copy.memberNum = self.memberNum;
+        copy.createTime = [self.createTime copyWithZone:zone];
+        copy.hasWaitAuditFlag = self.hasWaitAuditFlag;
+        copy.existFlag = self.existFlag;
+        copy.introduce = [self.introduce copyWithZone:zone];
+        copy.updateTime = [self.updateTime copyWithZone:zone];
+    }
+    
+    return copy;
+}
+
+
+@end

+ 5 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MineFansGroupCell.h

@@ -6,11 +6,16 @@
 //
 
 #import <UIKit/UIKit.h>
+#import "MinePageGroupModel.h"
+
+typedef void(^ChatCallback)(NSString *groupName, NSString *groupId);
 
 NS_ASSUME_NONNULL_BEGIN
 
 @interface MineFansGroupCell : UITableViewCell
 
+- (void)configWithSource:(MinePageGroupModel *)sourceModel chatAction:(ChatCallback)callback;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 6 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MineFansGroupCell.m

@@ -13,7 +13,6 @@
 @property (weak, nonatomic) IBOutlet UILabel *groupName;
 @property (weak, nonatomic) IBOutlet UILabel *desc;
 
-
 @end
 
 
@@ -25,6 +24,12 @@
     self.selectionStyle = UITableViewCellSelectionStyleNone;
 }
 
+- (void)configWithSource:(MinePageGroupModel *)sourceModel chatAction:(ChatCallback)callback {
+    [self.groupAvatar sd_setImageWithURL:[NSURL URLWithString:[sourceModel.img getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:GROUP_LOGO]];
+    self.groupName.text = [NSString returnNoNullStringWithString:sourceModel.name];
+    self.desc.text = [NSString returnNoNullStringWithString:sourceModel.introduce];
+}
+
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
     [super setSelected:selected animated:animated];
 

+ 3 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MineFansGroupCell.xib

@@ -38,7 +38,7 @@
                                 </constraints>
                                 <userDefinedRuntimeAttributes>
                                     <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                        <real key="value" value="6"/>
+                                        <real key="value" value="21"/>
                                     </userDefinedRuntimeAttribute>
                                 </userDefinedRuntimeAttributes>
                             </imageView>
@@ -55,10 +55,12 @@
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <constraints>
                             <constraint firstItem="t1I-iJ-VAv" firstAttribute="centerY" secondItem="PF4-YY-Sdv" secondAttribute="centerY" id="8TC-a8-7MK"/>
+                            <constraint firstAttribute="bottom" secondItem="t1I-iJ-VAv" secondAttribute="bottom" constant="15" id="L6C-RK-sQI"/>
                             <constraint firstItem="lQS-Ke-d1u" firstAttribute="top" secondItem="T58-uk-4lw" secondAttribute="bottom" id="QYl-Ub-RTz"/>
                             <constraint firstItem="lQS-Ke-d1u" firstAttribute="leading" secondItem="T58-uk-4lw" secondAttribute="leading" id="XXF-5y-KZb"/>
                             <constraint firstItem="t1I-iJ-VAv" firstAttribute="leading" secondItem="PF4-YY-Sdv" secondAttribute="leading" constant="12" id="boU-vp-b1H"/>
                             <constraint firstAttribute="trailing" secondItem="T58-uk-4lw" secondAttribute="trailing" constant="12" id="dZb-bE-IxK"/>
+                            <constraint firstItem="t1I-iJ-VAv" firstAttribute="top" secondItem="PF4-YY-Sdv" secondAttribute="top" constant="15" id="dxm-Cb-u0I"/>
                             <constraint firstItem="T58-uk-4lw" firstAttribute="top" secondItem="t1I-iJ-VAv" secondAttribute="top" id="fCU-EI-HG0"/>
                             <constraint firstItem="T58-uk-4lw" firstAttribute="leading" secondItem="t1I-iJ-VAv" secondAttribute="trailing" constant="15" id="fHy-PN-eB2"/>
                             <constraint firstAttribute="trailing" secondItem="lQS-Ke-d1u" secondAttribute="trailing" constant="12" id="sLo-wd-SkU"/>

+ 98 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageMienBodyView.m

@@ -11,6 +11,8 @@
 #import "MineFansGroupCell.h"
 #import "StyleVideoModel.h"
 #import "WMPlayer.h"
+#import "MinePageGroupModel.h"
+#import "KSChatConversationViewController.h"
 
 @interface MinePageMienBodyView ()<UITableViewDelegate,UITableViewDataSource,WMPlayerDelegate>
 {
@@ -56,11 +58,12 @@
         
         [self.tableView registerNib:[UINib nibWithNibName:@"MineIntroduceCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"MineIntroduceCell"];
         [self.tableView registerNib:[UINib nibWithNibName:@"MineVideoCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"MineVideoCell"];
-        [self.tableView registerNib:[UINib nibWithNibName:@"MinePageMusicCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"MinePageMusicCell"];
+        [self.tableView registerNib:[UINib nibWithNibName:@"MineFansGroupCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"MineFansGroupCell"];
         
         MJWeakSelf;
         self.tableView.mj_header = [KSGifRefreshHeader headerWithRefreshingBlock:^{
             [weakSelf requestData];
+            [weakSelf requestTeacherGroup];
         }];
     }
     return self;
@@ -88,6 +91,26 @@
     }];
 }
 
+- (void)requestTeacherGroup {
+    [KSNetworkingManager queryTeacherGroupRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [dic arrayValueForKey:@"data"];
+            NSMutableArray *groupArray = [NSMutableArray array];
+            for (NSDictionary *parm in sourceArray) {
+                MinePageGroupModel *model = [[MinePageGroupModel alloc] initWithDictionary:parm];
+                [groupArray addObject:model];
+            }
+            self.fansGroupArray = [NSMutableArray arrayWithArray:groupArray];
+        }
+        else {
+            [self MBPShow:MESSAGEKEY];
+        }
+        [self.tableView reloadData];
+    } faliure:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
 - (void)endRefresh {
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
         [self.tableView.mj_header endRefreshing];
@@ -154,24 +177,94 @@
         return cell;
     }
     else {
+        MinePageGroupModel *model = self.fansGroupArray[indexPath.row];
         MineFansGroupCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MineFansGroupCell"];
+        MJWeakSelf;
+        [cell configWithSource:model chatAction:^(NSString *groupName, NSString *groupId) {
+            [weakSelf chatAction:groupId groupName:groupName];
+        }];
         return cell;
     }
 }
 
+- (void)chatAction:(NSString *)groupId groupName:(NSString *)groupName {
+    KSChatConversationViewController *conversationVC = [[KSChatConversationViewController alloc] init];
+    conversationVC.targetId = groupId;
+    conversationVC.title = groupName;
+    conversationVC.conversationType = ConversationType_GROUP;
+    [self.naviController pushViewController:conversationVC animated:YES];
 
+}
 
 - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
     if (section == 2) {
-        return [UIView new];
+        
+        UIView *headView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 43.0f)];
+        headView.backgroundColor = [UIColor clearColor];
+        CGRect frame = CGRectMake(14, 0, kScreenWidth - 28, 43.0f);
+        UIView *displayView = [[UIView alloc] initWithFrame:frame];
+        displayView.backgroundColor = [UIColor whiteColor];
+        [headView addSubview:displayView];
+        if (@available(iOS 11.0, *)) {
+            displayView.layer.cornerRadius = 10;
+            displayView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner; // 左上圆角
+        }
+        else {
+            UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:displayView.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(10, 10)];
+            CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
+            maskLayer.frame = frame;
+            maskLayer.path = path.CGPath;
+            displayView.layer.mask = maskLayer;
+        }
+        UIImageView *iconImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_fans"]];
+        [displayView addSubview:iconImage];
+        [iconImage mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.mas_equalTo(displayView.mas_left).offset(12);
+            make.top.mas_equalTo(displayView.mas_top).offset(17);
+            make.width.mas_equalTo(24);
+            make.height.mas_equalTo(24);
+        }];
+        UILabel *tipsLable = [[UILabel alloc] init];
+        tipsLable.text = @"粉丝群";
+        tipsLable.font = [UIFont systemFontOfSize:16.0f weight:UIFontWeightMedium];
+        tipsLable.textColor = HexRGB(0x333333);
+        [displayView addSubview:tipsLable];
+        [tipsLable mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.mas_equalTo(iconImage.mas_right).offset(4);
+            make.centerY.mas_equalTo(iconImage.mas_centerY);
+            make.height.mas_equalTo(30);
+            make.width.mas_equalTo(100);
+        }];
+        return headView;
     }
     return [UIView new];
 }
 
 - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
 {
+    if (section == 2) {
+        UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 15.0f)];
+        bottomView.backgroundColor = [UIColor clearColor];
+        CGRect frame = CGRectMake(14, 0, kScreenWidth - 28, 15);
+        UIView *displayView = [[UIView alloc] initWithFrame:frame];
+        displayView.backgroundColor = [UIColor whiteColor];
+        [bottomView addSubview:displayView];
+        if (@available(iOS 11.0, *)) {
+            displayView.layer.cornerRadius = 10;
+            displayView.layer.maskedCorners = kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner;
+        }
+        else {
+            UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:displayView.bounds byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(10, 10)];
+            CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
+            maskLayer.frame = frame;
+            maskLayer.path = path.CGPath;
+            displayView.layer.mask = maskLayer;
+        }
+        return bottomView;
+    }
     return [UIView new];
 }
+
 - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
     if (section == 2) {
         return 43.0f;
@@ -179,6 +272,9 @@
     return CGFLOAT_MIN;
 }
 - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
+    if (section == 2) {
+        return 15.0f;
+    }
     return CGFLOAT_MIN;
 }