Steven 2 년 전
부모
커밋
8216e2edc1
22개의 변경된 파일214개의 추가작업 그리고 43개의 파일을 삭제
  1. 2 2
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj
  2. BIN
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  3. 100 4
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 1 1
      KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m
  5. 3 2
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h
  6. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m
  7. 1 2
      KulexiuForTeacher/KulexiuForTeacher/Common/Define/PrefixHeader.pch
  8. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatListViewController.m
  9. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/KSSelectConversationViewController.m
  10. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Search/Controller/KSSearchHistoryMessageController.m
  11. 19 19
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m
  12. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/HomeworkDetailViewController.h
  13. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/HomeworkDetailViewController.m
  14. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/View/HomeworkBodyView.m
  15. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Model/AccompanyLessonModel.h
  16. 8 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Model/AccompanyLessonModel.m
  17. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/AccompanyCourseCell.m
  18. 37 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/SettingViewController.m
  19. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/View/SettingBodyView.h
  20. 5 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/View/SettingBodyView.m
  21. 23 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/View/SettingBodyView.xib
  22. 3 1
      KulexiuForTeacher/KulexiuForTeacher/Module/SealClass/Services/Classroom/Model/Classroom.m

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj

@@ -3999,11 +3999,11 @@
 		BC0A228E284751F80065C1AB /* AccompanyDisplay */ = {
 			isa = PBXGroup;
 			children = (
-				BC0A228F284751F80065C1AB /* AccompanyView.m */,
 				BC0A2290284751F80065C1AB /* AccompanySongCell.h */,
-				BC0A2291284751F80065C1AB /* AccompanyView.h */,
 				BC0A2292284751F80065C1AB /* AccompanySongCell.m */,
 				BC0A2293284751F80065C1AB /* AccompanySongCell.xib */,
+				BC0A2291284751F80065C1AB /* AccompanyView.h */,
+				BC0A228F284751F80065C1AB /* AccompanyView.m */,
 			);
 			path = AccompanyDisplay;
 			sourceTree = "<group>";

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


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

@@ -371,16 +371,112 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "6292BDDB-C962-4F80-A88E-89D2278AFE0C"
+            uuid = "16E83CD7-6751-4594-8027-94FF33EE0BC4"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "KulexiuForTeacher/Module/SealClass/Services/Classroom/ClassroomService.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "340"
-            endingLineNumber = "340"
-            landmarkName = "-display:withInfo:"
+            startingLineNumber = "220"
+            endingLineNumber = "220"
+            landmarkName = "-queryNoJoinRoomList:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "D77E1583-DFE0-4EBD-886F-F3862F734F2B"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/SealClass/Services/Classroom/Model/Classroom.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "33"
+            endingLineNumber = "33"
+            landmarkName = "+classroomFromJson:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "91195494-D2E5-4C2C-989E-6313F611E5A4"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Home/Income/WithDraw/Controller/CashRecordViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "116"
+            endingLineNumber = "116"
+            landmarkName = "-requestData"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "EE4042C9-0FD1-45E3-8D08-7374E6B84780"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Chat/Controller/KSChatListViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "142"
+            endingLineNumber = "142"
+            landmarkName = "-willReloadTableData:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "1FE05C7B-204C-4471-8020-015038F14D3B"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Mine/MinePage/View/AccompanyCourseCell.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "166"
+            endingLineNumber = "166"
+            landmarkName = "-configWithCourseMessage:beforeTime:actionCallback:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "8AFEA2D9-D2E2-4E9C-98D5-99CF1984FB48"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Home/MyCourse/View/MyLessonBodyView.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "400"
+            endingLineNumber = "400"
+            landmarkName = "-tableView:cellForRowAtIndexPath:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "294892E9-4678-4F59-AE2A-08F70381957A"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Mine/MinePage/View/AccompanyCourseCell.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "89"
+            endingLineNumber = "89"
+            landmarkName = "-configWithSource:actionCallback:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m

@@ -424,7 +424,7 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
     if (message.conversationType == ConversationType_CHATROOM) { // 聊天室类型为直播
         [[KSIMService sharedService] ksOnReceivedChatroom:message left:left object:@""];
     }
-    if ([message.targetId containsString:@"LIVE"] || [message.targetId containsString:@"FANS"]) {
+    if ([message.targetId containsString:@"LIVE"] || [message.targetId containsString:@"FAN"]) {
         // 此处对单聊、群聊消息处理
         dispatch_async(dispatch_get_main_queue(), ^{
         

+ 3 - 2
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h

@@ -649,14 +649,15 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param faliure 失败
 + (void)homeworkListRequest:(NSString *)post date:(NSString *)date decorate:(NSInteger)decorate page:(NSInteger)page rows:(NSInteger)rows success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
-// /api-teacher/homework/detail/{courseId}
+// /api-teacher/homework/detail/{courseId}/{studentId}
 
 /// 陪练课课后作业信息详情
 /// @param get get
 /// @param courseId 课程信息
+/// @param studentId 学生id
 /// @param success 成功
 /// @param faliure 失败
-+ (void)homeworkDetailRequest:(NSString *)get courseId:(NSString *)courseId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
++ (void)homeworkDetailRequest:(NSString *)get courseId:(NSString *)courseId studentId:(NSString *)studentId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
 // /api-teacher/homework/decorate
 

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m

@@ -1324,9 +1324,9 @@
 /// @param courseId 课程信息
 /// @param success 成功
 /// @param faliure 失败
-+ (void)homeworkDetailRequest:(NSString *)get courseId:(NSString *)courseId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
++ (void)homeworkDetailRequest:(NSString *)get courseId:(NSString *)courseId studentId:(nonnull NSString *)studentId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
     
-    NSString *url = [NSString stringWithFormat:@"%@%@/%@",hostURL, @"/api-teacher/homework/detail",courseId];
+    NSString *url = [NSString stringWithFormat:@"%@%@/%@/%@",hostURL, @"/api-teacher/homework/detail",courseId,studentId];
     [self request:get andWithUrl:url and:nil success:success faliure:faliure];
 }
 

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

@@ -118,8 +118,7 @@ shouldPrevent = NO; \
 #define WEBHOST (@"https://dev.colexiu.com/teacher")
 //#define WEBHOST (@"http://192.168.3.13:5002")
 //#define WEBHOST (@"http://192.168.3.63:5000")
-
-#define SOCKET_URL (@"ws://mteadev.colexiu.com/audioAnalysis")
+#define SOCKET_URL (@"wss://dev.colexiu.com/audioAnalysis")
 #define JSPUSH_ENVIRONMENT (NO)
 #define RCIM_KEY (@"0vnjpoad0jbdz")
 #define SUBMIT_UUID (NO)

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatListViewController.m

@@ -139,7 +139,7 @@
         if (model.conversationType == ConversationType_GROUP) {
             model.conversationModelType = RC_CONVERSATION_MODEL_TYPE_CUSTOMIZATION;
         }
-        if ([model.targetId containsString:@"FANS"] || [model.targetId containsString:@"LIVE"]) {
+        if ([model.targetId containsString:@"FAN"] || [model.targetId containsString:@"LIVE"]) {
             [array addObject:model];
         }
         else {

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/KSSelectConversationViewController.m

@@ -52,7 +52,7 @@ typedef void (^CompleteBlock)(NSArray *conversationList);
     NSMutableArray *listArray = [NSMutableArray array];
     NSArray *conversationArray = [[RCIMClient sharedRCIMClient] getConversationList:@[ @(ConversationType_PRIVATE), @(ConversationType_GROUP)]];
     for (RCConversation *conversation in conversationArray) {
-        if ([conversation.targetId containsString:@"LIVE"] || [conversation.targetId containsString:@"FANS"]) {
+        if ([conversation.targetId containsString:@"LIVE"] || [conversation.targetId containsString:@"FAN"]) {
             [listArray addObject:conversation];
         }
     }

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Search/Controller/KSSearchHistoryMessageController.m

@@ -169,7 +169,7 @@
                 messegeModel.portraitUri = group.portraitUri;
             }
             messegeModel.count = searchResult.matchCount;
-            if ([messegeModel.targetId containsString:@"LIVE"] || [messegeModel.targetId containsString:@"FANS"]) {
+            if ([messegeModel.targetId containsString:@"LIVE"] || [messegeModel.targetId containsString:@"FAN"]) {
                 [resultArray addObject:messegeModel];
             }
         }

+ 19 - 19
KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m

@@ -83,7 +83,7 @@
 }
 
 - (void)requestHomeworkMessage {
-    [KSNetworkingManager homeworkDetailRequest:KS_GET courseId:self.courseId success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager homeworkDetailRequest:KS_GET courseId:self.courseId studentId:self.studentId success:^(NSDictionary * _Nonnull dic) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             self.homeworkModel = [[HomeworkDetailModel alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
             if (self.homeworkModel.submitHomework == 1) {
@@ -452,24 +452,24 @@
 
 - (void)tryJoinRoom {
     
-//    NSDateFormatter *dateFormatter = [NSObject getDateformatter];
-//    [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
-//    NSDate *beginDate = [dateFormatter dateFromString:self.homeworkModel.startTime];
-//    NSDate *endDate = [dateFormatter dateFromString:self.homeworkModel.endTime];
-//    NSDate *currentDate = [NSDate date];
-//    NSTimeInterval beginTimeInterval = [beginDate timeIntervalSinceDate:currentDate];
-//    NSTimeInterval endTimeInterval = [currentDate timeIntervalSinceDate:endDate];
-//    if (beginTimeInterval <= self.joinRoomBeforeTime * 60 && endTimeInterval < 0) {
-//        [self joinClassRoom];
-//    }
-//    else if (endTimeInterval > 0) {
-//        [self MBPShow:@"该课程已结束"];
-//    }
-//    else {
-//        NSString *tipsString = [NSString stringWithFormat:@"课程还未开始,请在上课前%zd分钟进入", self.joinRoomBeforeTime];
-//        [self MBPShow:tipsString];
-//    }
-    [self joinClassRoom];
+    NSDateFormatter *dateFormatter = [NSObject getDateformatter];
+    [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
+    NSDate *beginDate = [dateFormatter dateFromString:self.homeworkModel.startTime];
+    NSDate *endDate = [dateFormatter dateFromString:self.homeworkModel.endTime];
+    NSDate *currentDate = [NSDate date];
+    NSTimeInterval beginTimeInterval = [beginDate timeIntervalSinceDate:currentDate];
+    NSTimeInterval endTimeInterval = [currentDate timeIntervalSinceDate:endDate];
+    if (beginTimeInterval <= self.joinRoomBeforeTime * 60 && endTimeInterval < 0) {
+        [self joinClassRoom];
+    }
+    else if (endTimeInterval > 0) {
+        [self MBPShow:@"该课程已结束"];
+    }
+    else {
+        NSString *tipsString = [NSString stringWithFormat:@"课程还未开始,请在上课前%zd分钟进入", self.joinRoomBeforeTime];
+        [self MBPShow:tipsString];
+    }
+//    [self joinClassRoom];
 }
 
 // 加入房间

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/HomeworkDetailViewController.h

@@ -13,6 +13,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, strong) NSString *courseId;
 
+@property (nonatomic, strong) NSString *studentId;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/HomeworkDetailViewController.m

@@ -57,7 +57,7 @@
 
 - (void)requestCourseMessage {
     [self showhud];
-    [KSNetworkingManager homeworkDetailRequest:KS_GET courseId:self.courseId success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager homeworkDetailRequest:KS_GET courseId:self.courseId studentId:self.studentId  success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             self.detailModel = [[HomeworkDetailModel alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/View/HomeworkBodyView.m

@@ -203,6 +203,7 @@
     HomeworkListModel *model = self.dataArray[indexPath.row];
     HomeworkDetailViewController *detailVC = [[HomeworkDetailViewController alloc] init];
     detailVC.courseId = model.courseId;
+    detailVC.studentId = model.studentId;
     [self.naviController pushViewController:detailVC animated:YES];
 }
 

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Model/AccompanyLessonModel.h

@@ -24,6 +24,7 @@
 @property (nonatomic, strong) NSString *userName;
 @property (nonatomic, strong) NSString *startTime;
 @property (nonatomic, strong) NSString *status;
+@property (nonatomic, strong) NSString *teacherReplied;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;

+ 8 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Model/AccompanyLessonModel.m

@@ -21,7 +21,7 @@ NSString *const kAccompanyLessonModelSubjectName = @"subjectName";
 NSString *const kAccompanyLessonModelUserName = @"userName";
 NSString *const kAccompanyLessonModelStartTime = @"startTime";
 NSString *const kAccompanyLessonModelStatus = @"status";
-
+NSString *const kAccompanyLessonModelTeacherReplied = @"teacherReplied";
 
 @interface AccompanyLessonModel ()
 
@@ -44,7 +44,7 @@ NSString *const kAccompanyLessonModelStatus = @"status";
 @synthesize userName = _userName;
 @synthesize startTime = _startTime;
 @synthesize status = _status;
-
+@synthesize teacherReplied = _teacherReplied;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 {
@@ -71,7 +71,7 @@ NSString *const kAccompanyLessonModelStatus = @"status";
             self.userName = [self objectOrNilForKey:kAccompanyLessonModelUserName fromDictionary:dict];
             self.startTime = [self objectOrNilForKey:kAccompanyLessonModelStartTime fromDictionary:dict];
             self.status = [self objectOrNilForKey:kAccompanyLessonModelStatus fromDictionary:dict];
-
+            self.teacherReplied = [self objectOrNilForKey:kAccompanyLessonModelTeacherReplied fromDictionary:dict];
     }
     
     return self;
@@ -94,7 +94,8 @@ NSString *const kAccompanyLessonModelStatus = @"status";
     [mutableDict setValue:self.userName forKey:kAccompanyLessonModelUserName];
     [mutableDict setValue:self.startTime forKey:kAccompanyLessonModelStartTime];
     [mutableDict setValue:self.status forKey:kAccompanyLessonModelStatus];
-
+    [mutableDict setValue:self.teacherReplied forKey:kAccompanyLessonModelTeacherReplied];
+    
     return [NSDictionary dictionaryWithDictionary:mutableDict];
 }
 
@@ -134,6 +135,7 @@ NSString *const kAccompanyLessonModelStatus = @"status";
     self.userName = [aDecoder decodeObjectForKey:kAccompanyLessonModelUserName];
     self.startTime = [aDecoder decodeObjectForKey:kAccompanyLessonModelStartTime];
     self.status = [aDecoder decodeObjectForKey:kAccompanyLessonModelStatus];
+    self.teacherReplied = [aDecoder decodeObjectForKey:kAccompanyLessonModelTeacherReplied];
     return self;
 }
 
@@ -153,6 +155,7 @@ NSString *const kAccompanyLessonModelStatus = @"status";
     [aCoder encodeObject:_userName forKey:kAccompanyLessonModelUserName];
     [aCoder encodeObject:_startTime forKey:kAccompanyLessonModelStartTime];
     [aCoder encodeObject:_status forKey:kAccompanyLessonModelStatus];
+    [aCoder encodeObject:_teacherReplied forKey:kAccompanyLessonModelTeacherReplied];
 }
 
 - (id)copyWithZone:(NSZone *)zone
@@ -174,6 +177,7 @@ NSString *const kAccompanyLessonModelStatus = @"status";
         copy.userName = [self.userName copyWithZone:zone];
         copy.startTime = [self.startTime copyWithZone:zone];
         copy.status = [self.status copyWithZone:zone];
+        copy.teacherReplied = [self.teacherReplied copyWithZone:zone];
     }
     
     return copy;

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/AccompanyCourseCell.m

@@ -85,7 +85,7 @@
         self.courseStatus.text = @"已结束";
         self.courseStatus.textColor = HexRGB(0x999999);
         // 判断显示评价还是已评价
-        BOOL hasEvaluate = NO;
+        BOOL hasEvaluate = [model.teacherReplied isEqualToString:@"1"] ? YES : NO;
         if (hasEvaluate) {
             self.type = ACCOMPANY_DETAIL;
             self.opreationButton.userInteractionEnabled = YES;

+ 37 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/SettingViewController.m

@@ -14,6 +14,11 @@
 #import "UserInfoManager.h"
 #import "AddressListViewController.h"
 #import "UserAuthViewController.h"
+#import "RCConnectionManager.h"
+#import "LoginViewController.h"
+#import "AppDelegate.h"
+#import "CustomNavViewController.h"
+#import "JPUSHService.h"
 
 @interface SettingViewController ()
  
@@ -90,11 +95,43 @@
             [self.navigationController pushViewController:aboutUs animated:YES];
         }
             break;
+        case SETTINGACTION_LOGOUT:
+        {
+            [self logoutAction];
+        }
+            break;
         default:
             break;
     }
 }
 
+- (void)logoutAction {
+    [KSNetworkingManager logoutRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
+        [self clearSource];
+    } faliure:^(NSError * _Nonnull error) {
+        [self clearSource];
+    }];
+}
+
+- (void)clearSource {
+    [RCConnectionManager shareManager].isNeedJoin = NO;
+    [RCConnectionManager shareManager].isNeedShowMessage = NO;
+    [[RCIM sharedRCIM] logout];
+    [UIApplication sharedApplication].applicationIconBadgeNumber = 0;
+    // 取消推送别名
+    [JPUSHService deleteAlias:nil seq:0];
+    [[NSUserDefaults standardUserDefaults] removeObjectForKey:TokenKey];
+    [[NSUserDefaults standardUserDefaults] removeObjectForKey:Token_type];
+    [[NSUserDefaults standardUserDefaults] removeObjectForKey:RefreshToken];
+    [[NSUserDefaults standardUserDefaults] removeObjectForKey:RongTokenKey];
+    [[NSUserDefaults standardUserDefaults] synchronize];
+    [KSNetworkingManager clearRequestHeader];
+    LoginViewController *loginVC = [[LoginViewController alloc] init];
+    CustomNavViewController *navCtrl = [[CustomNavViewController alloc] initWithRootViewController:loginVC];
+    AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+    appDelegate.window.rootViewController = navCtrl;
+}
+
 /*
 #pragma mark - Navigation
 

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/View/SettingBodyView.h

@@ -13,6 +13,7 @@ typedef NS_ENUM(NSInteger, SETTINGACTION) {
     SETTINGACTION_PRIVACY,  // 隐私
     SETTINGACTION_FEEEDBACK, // 反馈
     SETTINGACTION_ABOUTUS,  // 关于我们
+    SETTINGACTION_LOGOUT,   // 退出
 };
 
 typedef void(^SettingCallback)(SETTINGACTION type);

+ 5 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/View/SettingBodyView.m

@@ -48,7 +48,11 @@
     [self.switchButton setImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
 }
 
-
+- (IBAction)logoutAction:(id)sender {
+    if (self.callback) {
+        self.callback(SETTINGACTION_LOGOUT);
+    }
+}
 /*
  // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.

+ 23 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/View/SettingBodyView.xib

@@ -276,10 +276,33 @@
                         </userDefinedRuntimeAttribute>
                     </userDefinedRuntimeAttributes>
                 </view>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HJB-ze-JOs">
+                    <rect key="frame" x="14" y="826" width="386" height="50"/>
+                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="50" id="5ZD-qF-lWl"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                    <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.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </state>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="10"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                    <connections>
+                        <action selector="logoutAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="ZoT-2t-9Bv"/>
+                    </connections>
+                </button>
             </subviews>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
+                <constraint firstAttribute="trailing" secondItem="HJB-ze-JOs" secondAttribute="trailing" constant="14" id="4uG-et-3Ez"/>
                 <constraint firstItem="bvI-vo-wNV" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="15" id="97b-yw-a9c"/>
+                <constraint firstAttribute="bottom" secondItem="HJB-ze-JOs" secondAttribute="bottom" constant="20" id="TCM-BH-MBQ"/>
+                <constraint firstItem="HJB-ze-JOs" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="j2A-un-7By"/>
                 <constraint firstItem="bvI-vo-wNV" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="lgX-k4-l1q"/>
                 <constraint firstAttribute="trailing" secondItem="bvI-vo-wNV" secondAttribute="trailing" constant="14" id="yFd-X3-TR5"/>
             </constraints>

+ 3 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/SealClass/Services/Classroom/Model/Classroom.m

@@ -28,7 +28,9 @@
     NSArray *memberArray = dic[@"roomMemberList"];
     NSMutableArray *memberList = [[NSMutableArray alloc] init];
     for (NSDictionary *memberDic in memberArray) {
-        RoomMember *member = [RoomMember memberFromJson:memberDic];
+        NSMutableDictionary *memDic = [NSMutableDictionary dictionaryWithDictionary:memberDic];
+        [memberDic setValue:[dic dictionaryValueForKey:@"midiJson"] forKey:@"playMidiJson"];
+        RoomMember *member = [RoomMember memberFromJson:memDic];
         [memberList addObject:member];
     }
     room.memberList = memberList;