Browse Source

极光SDK更新

Steven 3 years ago
parent
commit
c07db7efb8
63 changed files with 563 additions and 150 deletions
  1. BIN
      KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  2. 48 16
      KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  3. 118 17
      KulexiuForStudent/KulexiuForStudent/AppDelegate.m
  4. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/chat_fansGroup_logo.imageset/chat_fansGroup_logo@2x.png
  5. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/chat_fansGroup_logo.imageset/chat_fansGroup_logo@3x.png
  6. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/chat_group_Logo.imageset/chat_group_Logo@2x.png
  7. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/chat_group_Logo.imageset/chat_group_Logo@3x.png
  8. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/image_add.imageset/Contents.json
  9. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/image_add.imageset/image_add@2x.png
  10. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/image_add.imageset/image_add@3x.png
  11. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Common/upAlert_bg.imageset/upAlert_bg@2x.png
  12. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Common/upAlert_bg.imageset/upAlert_bg@3x.png
  13. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/klx_logo.imageset/klx_logo@2x.png
  14. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/klx_logo.imageset/klx_logo@3x.png
  15. 21 4
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.h
  16. 40 7
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m
  17. 7 7
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSUpdateAlert.xib
  18. 2 1
      KulexiuForStudent/KulexiuForStudent/Common/Define/UserKeyHeader.h
  19. 2 0
      KulexiuForStudent/KulexiuForStudent/KulexiuForStudent.entitlements
  20. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSChatListViewController.m
  21. 9 1
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/GroupSettingViewController.m
  22. 14 14
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/KSChatComplainController.m
  23. 2 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/GroupSettingBodyView.h
  24. 3 2
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/GroupSettingBodyView.m
  25. 3 3
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/GroupSettingBodyView.xib
  26. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/ChatAddressHeaderView.m
  27. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/GroupListViewCell.m
  28. 3 3
      KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/Controller/KSCloudViewController.m
  29. 3 3
      KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/View/Channel/TrackChooseView.m
  30. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/View/Help/CloudFeedbackView.m
  31. 3 3
      KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/View/Help/CloudHelpView.m
  32. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/View/SettingView/JudgePageView.m
  33. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/View/SettingView/KSCloudSettingView.m
  34. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/View/StaffView/CloudControlButton.m
  35. 8 2
      KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m
  36. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/View/AccompanyCourseInfoCell.h
  37. 12 3
      KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/View/AccompanyCourseInfoCell.m
  38. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/View/AccompanyCourseInfoCell.xib
  39. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/View/AccompanyHomeworkCell.h
  40. 14 2
      KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/View/AccompanyHomeworkCell.m
  41. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/View/AccompanyHomeworkCell.xib
  42. 7 1
      KulexiuForStudent/KulexiuForStudent/Module/Course/Controller/CourseViewController.m
  43. 4 3
      KulexiuForStudent/KulexiuForStudent/Module/Course/MusicRoom/Controller/MusicRoomDetailViewController.m
  44. 4 4
      KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/HomeViewController.m
  45. 30 24
      KulexiuForStudent/KulexiuForStudent/Module/Home/NoticeCenter/Controller/NotiferMessageViewController.m
  46. 4 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m
  47. 3 0
      KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/LoginViewController.m
  48. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/PasswordLoginController.h
  49. 9 4
      KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/PasswordLoginController.m
  50. 8 0
      KulexiuForStudent/KulexiuForStudent/Module/Login/Guide/View/GuideListView.m
  51. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Login/Guide/View/GuideListView.xib
  52. 4 0
      KulexiuForStudent/KulexiuForStudent/Module/Login/Model/UserInfoManager.h
  53. 54 0
      KulexiuForStudent/KulexiuForStudent/Module/Login/Model/UserInfoManager.m
  54. 16 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Controller/MineViewController.m
  55. 16 3
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Homework/Controller/HomeworkDetailViewController.m
  56. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Homework/Model/HomeworkDetailModel.h
  57. 7 4
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Homework/Model/HomeworkDetailModel.m
  58. 10 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/Controller/MyCourseViewController.h
  59. 8 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/Controller/MyCourseViewController.m
  60. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/ModifyViewController.m
  61. 2 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.h
  62. 22 3
      KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.m
  63. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.xib

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


+ 48 - 16
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -23,22 +23,6 @@
       <BreakpointProxy
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
          <BreakpointContent
-            uuid = "D8787347-799B-4DBE-861B-5DE6C3F36A29"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "689"
-            endingLineNumber = "689"
-            landmarkName = "-updateVideoViewContainer"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "90870E90-A189-49CA-87A4-9BCE458CD721"
             uuid = "90870E90-A189-49CA-87A4-9BCE458CD721"
             shouldBeEnabled = "No"
             shouldBeEnabled = "No"
             ignoreCount = "0"
             ignoreCount = "0"
@@ -196,5 +180,53 @@
             landmarkType = "7">
             landmarkType = "7">
          </BreakpointContent>
          </BreakpointContent>
       </BreakpointProxy>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "E8A3BBF6-10A0-4113-825C-4FFA6B24382E"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "94"
+            endingLineNumber = "94"
+            landmarkName = "-requestHomeworkMessage"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "55104162-E826-4464-A1D1-5820F4CF9713"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Module/Course/MusicRoom/Controller/MusicRoomDetailViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "88"
+            endingLineNumber = "88"
+            landmarkName = "-requestHomeworkMessage"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "F53A81DF-DEA1-44C0-AE61-B91D63310BA8"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Common/Base/KSUpdateAlert.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "48"
+            endingLineNumber = "48"
+            landmarkName = "-configWithMemo:desc:isForce:callback:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
    </Breakpoints>
 </Bucket>
 </Bucket>

+ 118 - 17
KulexiuForStudent/KulexiuForStudent/AppDelegate.m

@@ -32,6 +32,8 @@
 #import "KSRCIMDataSource.h"
 #import "KSRCIMDataSource.h"
 #import "WXApi.h"
 #import "WXApi.h"
 #import "GuideViewController.h"
 #import "GuideViewController.h"
+#import "HomeworkDetailViewController.h"
+#import "MyCourseViewController.h"
 
 
 @interface RCNaviDataInfo : NSObject
 @interface RCNaviDataInfo : NSObject
 
 
@@ -249,7 +251,7 @@
     }
     }
     [JPUSHService registerForRemoteNotificationConfig:entity delegate:self];
     [JPUSHService registerForRemoteNotificationConfig:entity delegate:self];
     //如不需要使用IDFA,advertisingIdentifier 可为nil
     //如不需要使用IDFA,advertisingIdentifier 可为nil
-    [JPUSHService setupWithOption:launchOptions appKey:@"7e0282ca92c12c8c45a93bb3"
+    [JPUSHService setupWithOption:launchOptions appKey:@"911d07f359c18a078f29792f"
                           channel:nil
                           channel:nil
                  apsForProduction:JSPUSH_ENVIRONMENT
                  apsForProduction:JSPUSH_ENVIRONMENT
             advertisingIdentifier:nil];
             advertisingIdentifier:nil];
@@ -332,6 +334,8 @@
      当使用"开发/测试环境"的appkey测试推送时,必须用Development的证书打包,并且在后台上传"开发/测试环境"的推送证书,证书必须是development的。
      当使用"开发/测试环境"的appkey测试推送时,必须用Development的证书打包,并且在后台上传"开发/测试环境"的推送证书,证书必须是development的。
      当使用"生产/线上环境"的appkey测试推送时,必须用Distribution的证书打包,并且在后台上传"生产/线上环境"的推送证书,证书必须是distribution的。
      当使用"生产/线上环境"的appkey测试推送时,必须用Distribution的证书打包,并且在后台上传"生产/线上环境"的推送证书,证书必须是distribution的。
      */
      */
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) {
     if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) {
         //注册推送, 用于iOS8以及iOS8之后的系统
         //注册推送, 用于iOS8以及iOS8之后的系统
         UIUserNotificationSettings *settings = [UIUserNotificationSettings
         UIUserNotificationSettings *settings = [UIUserNotificationSettings
@@ -344,17 +348,21 @@
         UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound;
         UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound;
         [application registerForRemoteNotificationTypes:myTypes];
         [application registerForRemoteNotificationTypes:myTypes];
     }
     }
+#pragma clang diagnostic pop
 }
 }
 
 
 /**
 /**
  * 推送处理2
  * 推送处理2
  */
  */
 //注册用户通知设置
 //注册用户通知设置
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic ignored "-Wdeprecated-implementations"
 - (void)application:(UIApplication *)application
 - (void)application:(UIApplication *)application
 didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {
 didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {
     [application registerForRemoteNotifications];
     [application registerForRemoteNotifications];
 }
 }
-
+#pragma clang diagnostic pop
 /**
 /**
  * 推送处理3
  * 推送处理3
  */
  */
@@ -365,25 +373,37 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
     [JPUSHService registerDeviceToken:deviceToken];
     [JPUSHService registerDeviceToken:deviceToken];
     
     
     // 融云
     // 融云
-    NSString *token = [self getHexStringForData:deviceToken];
-    [[RCIMClient sharedRCIMClient] setDeviceToken:token];
+    [[RCIMClient sharedRCIMClient] setDeviceTokenData:deviceToken];
 }
 }
 
 
-// Data 转换成 NSString(NSData ——> NSString)
-- (NSString *)getHexStringForData:(NSData *)data {
-    NSUInteger len = [data length];
-    char *chars = (char *)[data bytes];
-    NSMutableString *hexString = [[NSMutableString alloc] init];
-    for (NSUInteger i = 0; i < len; i ++) {
-        [hexString appendString:[NSString stringWithFormat:@"%0.2hhx", chars[i]]];
+- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
+    /**
+     * 获取融云推送服务扩展字段2
+     */
+    NSDictionary *pushServiceData = [[RCIMClient sharedRCIMClient] getPushExtraFromRemoteNotification:userInfo];
+    if (pushServiceData) {
+        NSLog(@"该远程推送包含来自融云的推送服务");
+        /**
+         * 统计推送打开率2
+         */
+        [[RCIMClient sharedRCIMClient] recordRemoteNotificationEvent:userInfo];
+        
+        for (id key in [pushServiceData allKeys]) {
+            NSLog(@"key = %@, value = %@", key, pushServiceData[key]);
+        }
+    } else {
+        NSLog(@"该远程推送不包含来自融云的推送服务");
+        // 极光推送
+        [JPUSHService handleRemoteNotification:userInfo];
     }
     }
-    return hexString;
 }
 }
 
 
 /**
 /**
  * 推送处理4
  * 推送处理4
  * userInfo内容请参考官网文档
  * userInfo内容请参考官网文档
  */
  */
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-implementations"
 - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
 - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
     /**
     /**
      * 统计推送打开率2
      * 统计推送打开率2
@@ -404,7 +424,7 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
         [JPUSHService handleRemoteNotification:userInfo];
         [JPUSHService handleRemoteNotification:userInfo];
     }
     }
 }
 }
-
+#pragma clang diagnostic pop
 
 
 - (void)applicationDidEnterBackground:(UIApplication *)application {
 - (void)applicationDidEnterBackground:(UIApplication *)application {
     // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
     // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
@@ -487,7 +507,21 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
 
 
 
 
 #pragma mark- JPUSHRegisterDelegate
 #pragma mark- JPUSHRegisterDelegate
+- (void)jpushNotificationAuthorization:(JPAuthorizationStatus)status withInfo:(NSDictionary *)info {
+  NSLog(@"receive notification authorization status:%lu, info:%@", status, info);
+}
 
 
+#ifdef __IPHONE_12_0
+- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center openSettingsForNotification:(UNNotification *)notification {
+    NSString *title = nil;
+    if (notification) {
+        title = @"从通知界面直接进入应用";
+    }else{
+        title = @"从系统设置界面进入应用";
+    }
+    NSLog(@"%@", title);
+}
+#endif
 
 
 // iOS 10 Support
 // iOS 10 Support
 - (void)jpushNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(NSInteger))completionHandler  API_AVAILABLE(ios(10.0)){
 - (void)jpushNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(NSInteger))completionHandler  API_AVAILABLE(ios(10.0)){
@@ -523,7 +557,42 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
 
 
 #pragma mark 根据不同消息跳转不同界面
 #pragma mark 根据不同消息跳转不同界面
 - (void)getVCUserInfoDict:(NSMutableDictionary *)infoDict {
 - (void)getVCUserInfoDict:(NSMutableDictionary *)infoDict {
-    
+    if (![NSString isEmptyString:[infoDict stringValueForKey:@"memo"]]) {
+        NSData *jsonData = [[infoDict stringValueForKey:@"memo"] mj_JSONData];
+        NSError *error;
+        NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&error];
+        if (!error) {
+            NSString *action = [dict stringValueForKey:@"action"];
+            if ([action isEqualToString:@"app"]) {
+                NSString *pageType = [dict stringValueForKey:@"pageTag"];
+                if ([pageType isEqualToString:@"buyPractice"] || [pageType isEqualToString:@"courseRemind"]) { // 课表
+                    [self.tabBarController tabBarSelectedWithIndex:1];
+                    CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                    [navCtrl popToRootViewControllerAnimated:YES];
+                }
+                else if ([pageType isEqualToString:@"homework"]) {
+                    NSString *parmString = [dict stringValueForKey:@"params"];
+                    NSData *parmData = [parmString mj_JSONData];
+                    NSDictionary *parm = [NSJSONSerialization JSONObjectWithData:parmData options:NSJSONReadingMutableContainers error:&error];
+                    if (!error) {
+                        HomeworkDetailViewController *detailVC = [[HomeworkDetailViewController alloc] init];
+                        detailVC.courseId = [parm stringValueForKey:@"courseId"];
+                        CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                        [navCtrl pushViewController:detailVC animated:YES];
+                    }
+                }
+            }
+            else {
+                NSString *webUrl = [dict stringValueForKey:@"url"];
+                if (![NSString isEmptyString:webUrl]) {
+                    KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+                    webCtrl.url = webUrl;
+                    CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                    [navCtrl pushViewController:webCtrl animated:YES];
+                }
+            }
+        }
+    }
 }
 }
 
 
 - (BOOL)isLowerVersionCompareLocalVersion:(NSString *)localVersion serviceVersion:(NSString *)version {
 - (BOOL)isLowerVersionCompareLocalVersion:(NSString *)localVersion serviceVersion:(NSString *)version {
@@ -571,10 +640,13 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
         return;
         return;
     }
     }
     self.messageDict = nil;
     self.messageDict = nil;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     MJWeakSelf;
     MJWeakSelf;
     [self.alertView configWithMemo:memo desc:descMessage isForce:isforce callback:^(BOOL isSure) {
     [self.alertView configWithMemo:memo desc:descMessage isForce:isforce callback:^(BOOL isSure) {
         weakSelf.isShowMemoAlert = NO;
         weakSelf.isShowMemoAlert = NO;
         if (isSure) {
         if (isSure) {
+
             if (@available(iOS 10.0, *)) {
             if (@available(iOS 10.0, *)) {
                 if ([[UIApplication sharedApplication] respondsToSelector:@selector(openURL:options:completionHandler:)]) {
                 if ([[UIApplication sharedApplication] respondsToSelector:@selector(openURL:options:completionHandler:)]) {
                     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:openUrl] options:@{} completionHandler:^(BOOL success) {
                     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:openUrl] options:@{} completionHandler:^(BOOL success) {
@@ -598,10 +670,29 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
             
             
         }
         }
     }];
     }];
+#pragma clang diagnostic pop
+
     [self.alertView showAlert];
     [self.alertView showAlert];
     self.isShowMemoAlert = YES;
     self.isShowMemoAlert = YES;
 }
 }
 
 
+- (void)requestRongCloudToken {
+    [KSNetworkingManager refreshImTokenRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            NSString *newToken = [dic stringValueForKey:@"data"];
+            if (![NSString isEmptyString:newToken]) {
+                UserDefaultSet(newToken, RongTokenKey);
+                [[NSUserDefaults standardUserDefaults] synchronize];
+                [USER_MANAGER checkTokenEnableConnectRongCloud];
+            }
+        }
+        else {
+            NSLog(@"error");
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        
+    }];
+}
 
 
 - (void)initTableBar {
 - (void)initTableBar {
     if (self.tabBarController) {
     if (self.tabBarController) {
@@ -679,10 +770,20 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
                 NSString *action = [dict stringValueForKey:@"action"];
                 NSString *action = [dict stringValueForKey:@"action"];
                 if ([action isEqualToString:@"app"]) {
                 if ([action isEqualToString:@"app"]) {
                     NSString *pageType = [dict stringValueForKey:@"pageTag"];
                     NSString *pageType = [dict stringValueForKey:@"pageTag"];
-                    if ([pageType isEqualToString:@""]) {
-                        NSDictionary *parm = [dict dictionaryValueForKey:@"params"];
-                        NSLog(@"%@",parm);
+                    DISPLAY_INDEX index = DISPLAY_INDEX_FIRST;
+                    if ([pageType isEqualToString:@"practiceClass"]) { // 我的课程 ->陪练课
+                        index = DISPLAY_INDEX_FIRST;
+                    }
+                    else if ([pageType isEqualToString:@"liveClass"]) { // 我的课程 ->直播课
+                        index = DISPLAY_INDEX_LIVE;
+                    }
+                    else if ([pageType isEqualToString:@"videoClass"]) { // 我的课程 ->视频课
+                        index = DISPLAY_INDEX_VIEO;
                     }
                     }
+                    MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
+                    [ctrl displayWithIndex:index];
+                    CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                    [navCtrl pushViewController:ctrl animated:YES];
                 }
                 }
                 else {  // 空 或者 h5
                 else {  // 空 或者 h5
                     NSString *webUrl = [dict stringValueForKey:@"url"];
                     NSString *webUrl = [dict stringValueForKey:@"url"];

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/chat_fansGroup_logo.imageset/chat_fansGroup_logo@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/chat_fansGroup_logo.imageset/chat_fansGroup_logo@3x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/chat_group_Logo.imageset/chat_group_Logo@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/chat_group_Logo.imageset/chat_group_Logo@3x.png


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/image_add.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/image_add.imageset/image_add@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/image_add.imageset/image_add@3x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Common/upAlert_bg.imageset/upAlert_bg@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Common/upAlert_bg.imageset/upAlert_bg@3x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/klx_logo.imageset/klx_logo@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/klx_logo.imageset/klx_logo@3x.png


+ 21 - 4
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.h

@@ -377,6 +377,19 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param faliure 失败
 /// @param faliure 失败
 + (void)quitImGroupRequest:(NSString *)post groupId:(NSString *)groupId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 + (void)quitImGroupRequest:(NSString *)post groupId:(NSString *)groupId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
 
+// 群组投诉
+// sysImComplaint/add
+
+/// 聊天投诉
+/// @param post post form
+/// @param type /** 投诉对象类型 GROUP,PERSON*/
+/// @param fileUrl 图片凭证
+/// @param memo 描述
+/// @param targetId 目标id
+/// @param success 成功
+/// @param faliure 失败
++ (void)sysImComplaintRequest:(NSString *)post type:(NSString *)type fileUrl:(NSString *)fileUrl memo:(NSString *)memo targetId:(NSString *)targetId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
 #pragma mark ---- 群公告
 #pragma mark ---- 群公告
 // /api-student/imGroupNotice/queryPage
 // /api-student/imGroupNotice/queryPage
 
 
@@ -554,17 +567,19 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param post post
 /// @param post post
 /// @param page 分页
 /// @param page 分页
 /// @param rows 条数
 /// @param rows 条数
+/// @param version version
 /// @param success 成功
 /// @param success 成功
 /// @param faliure 失败
 /// @param faliure 失败
-+ (void)homeQueryTeacherStyle:(NSString *)post page:(NSInteger)page rows:(NSInteger)rows success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
++ (void)homeQueryTeacherStyle:(NSString *)post page:(NSInteger)page rows:(NSInteger)rows version:(NSString *)version success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
 
 // /api-student/courseSchedule/queryLiveAndVideo
 // /api-student/courseSchedule/queryLiveAndVideo
 
 
 /// 首页-直播课&视频课
 /// 首页-直播课&视频课
 /// @param get get
 /// @param get get
+/// @param version version
 /// @param success 成功
 /// @param success 成功
 /// @param faliure 失败
 /// @param faliure 失败
-+ (void)homeQueryLiveAndVideo:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
++ (void)homeQueryLiveAndVideo:(NSString *)get version:(NSString *)version success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
 
 // /api-student/music/album/list
 // /api-student/music/album/list
 
 
@@ -572,18 +587,20 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param post post
 /// @param post post
 /// @param page 分页
 /// @param page 分页
 /// @param rows 条数
 /// @param rows 条数
+/// @param version version
 /// @param success 成功
 /// @param success 成功
 /// @param faliure 失败
 /// @param faliure 失败
-+ (void)HomeHotAlbumRequest:(NSString *)post page:(NSInteger)page rows:(NSInteger)rows success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
++ (void)HomeHotAlbumRequest:(NSString *)post page:(NSInteger)page rows:(NSInteger)rows version:(NSString *)version success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
 
 // /api-cms/news/app/home
 // /api-cms/news/app/home
 // 首页资讯
 // 首页资讯
 
 
 /// 首页banner、按钮、资讯
 /// 首页banner、按钮、资讯
 /// @param post post
 /// @param post post
+/// @param version version
 /// @param success 成功
 /// @param success 成功
 /// @param faliure 失败
 /// @param faliure 失败
-+ (void)homeNewsList:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
++ (void)homeNewsList:(NSString *)post version:(NSString *)version success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
 
 #pragma mark ---- 地址服务
 #pragma mark ---- 地址服务
 // /api-mall-portal/member/address/list
 // /api-mall-portal/member/address/list

+ 40 - 7
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m

@@ -321,7 +321,7 @@
 + (void)appVersionInfoRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
 + (void)appVersionInfoRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
     NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-admin/appVersionInfo/queryByPlatform"];
     NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-admin/appVersionInfo/queryByPlatform"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
-    [parm setValue:@"iOS-student" forKey:@"platform"];
+    [parm setValue:@"ios-student" forKey:@"platform"];
     [self request:get andWithUrl:url and:parm success:success faliure:faliure];
     [self request:get andWithUrl:url and:parm success:success faliure:faliure];
 }
 }
 
 
@@ -884,6 +884,29 @@
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 }
 
 
+// 群组投诉
+// sysImComplaint/add
+
+/// 聊天投诉
+/// @param post post form
+/// @param type /** 投诉对象类型 GROUP,PERSON*/
+/// @param fileUrl 图片凭证
+/// @param memo 描述
+/// @param targetId 目标id
+/// @param success 成功
+/// @param faliure 失败
++ (void)sysImComplaintRequest:(NSString *)post type:(NSString *)type fileUrl:(NSString *)fileUrl memo:(NSString *)memo targetId:(NSString *)targetId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-student/sysImComplaint/add"];
+    targetId = [self returnNoContainGroupId:targetId];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:type forKey:@"type"];
+    [parm setValue:fileUrl forKey:@"url"];
+    [parm setValue:memo forKey:@"memo"];
+    [parm setValue:targetId forKey:@"targetId"];
+    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+}
+
 #pragma mark ---- 群公告
 #pragma mark ---- 群公告
 // /api-student/imGroupNotice/queryPage
 // /api-student/imGroupNotice/queryPage
 
 
@@ -1168,14 +1191,17 @@
 /// @param post post
 /// @param post post
 /// @param page 分页
 /// @param page 分页
 /// @param rows 条数
 /// @param rows 条数
+/// @param version version
 /// @param success 成功
 /// @param success 成功
 /// @param faliure 失败
 /// @param faliure 失败
-+ (void)homeQueryTeacherStyle:(NSString *)post page:(NSInteger)page rows:(NSInteger)rows success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
++ (void)homeQueryTeacherStyle:(NSString *)post page:(NSInteger)page rows:(NSInteger)rows version:(NSString *)version success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
     [self configRequestMethodJSON];
     [self configRequestMethodJSON];
     NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-student/teacher/stylePage"];
     NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-student/teacher/stylePage"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:@(page) forKey:@"page"];
     [parm setValue:@(page) forKey:@"page"];
     [parm setValue:@(rows) forKey:@"rows"];
     [parm setValue:@(rows) forKey:@"rows"];
+    [parm setValue:version forKey:@"version"];
+    [parm setValue:@"ios-student" forKey:@"platform"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 }
 
 
@@ -1185,9 +1211,12 @@
 /// @param get get
 /// @param get get
 /// @param success 成功
 /// @param success 成功
 /// @param faliure 失败
 /// @param faliure 失败
-+ (void)homeQueryLiveAndVideo:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
++ (void)homeQueryLiveAndVideo:(NSString *)get version:(NSString *)version success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
     NSString *url = [NSString stringWithFormat:@"%@%@",hostURL, @"/api-student/courseSchedule/queryLiveAndVideo"];
     NSString *url = [NSString stringWithFormat:@"%@%@",hostURL, @"/api-student/courseSchedule/queryLiveAndVideo"];
-    [self request:get andWithUrl:url and:nil success:success faliure:faliure];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:version forKey:@"version"];
+    [parm setValue:@"ios-student" forKey:@"platform"];
+    [self request:get andWithUrl:url and:parm success:success faliure:faliure];
 }
 }
 
 
 // /api-student/music/album/list
 // /api-student/music/album/list
@@ -1198,13 +1227,14 @@
 /// @param rows 条数
 /// @param rows 条数
 /// @param success 成功
 /// @param success 成功
 /// @param faliure 失败
 /// @param faliure 失败
-+ (void)HomeHotAlbumRequest:(NSString *)post page:(NSInteger)page rows:(NSInteger)rows success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
++ (void)HomeHotAlbumRequest:(NSString *)post page:(NSInteger)page rows:(NSInteger)rows version:(NSString *)version success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
     [self configRequestMethodJSON];
     [self configRequestMethodJSON];
     NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-student/music/album/list"];
     NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-student/music/album/list"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:@(1) forKey:@"albumStatus"];
     [parm setValue:@(1) forKey:@"albumStatus"];
     [parm setValue:@(page) forKey:@"page"];
     [parm setValue:@(page) forKey:@"page"];
     [parm setValue:@(rows) forKey:@"rows"];
     [parm setValue:@(rows) forKey:@"rows"];
+    [parm setValue:version forKey:@"version"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 }
 
 
@@ -1213,12 +1243,15 @@
 
 
 /// 首页banner、按钮、资讯
 /// 首页banner、按钮、资讯
 /// @param post post
 /// @param post post
+/// @param version version
 /// @param success 成功
 /// @param success 成功
 /// @param faliure 失败
 /// @param faliure 失败
-+ (void)homeNewsList:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
++ (void)homeNewsList:(NSString *)post version:(NSString *)version success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
     [self configRequestMethodJSON];
     [self configRequestMethodJSON];
     NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-cms/news/app/home"];
     NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-cms/news/app/home"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:version forKey:@"version"];
+    [parm setValue:@"ios-student" forKey:@"platform"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 }
 
 
@@ -1236,7 +1269,7 @@
 
 
 // /api-mall-portal/member/address/add
 // /api-mall-portal/member/address/add
 
 
-/// 添加收地址
+/// 添加收地址
 /// @param post post
 /// @param post post
 /// @param name 收货人名称
 /// @param name 收货人名称
 /// @param phoneNumber 电话号码
 /// @param phoneNumber 电话号码

+ 7 - 7
KulexiuForStudent/KulexiuForStudent/Common/Base/KSUpdateAlert.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
     <dependencies>
         <deployment identifier="iOS"/>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17126"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     </dependencies>
@@ -25,7 +25,7 @@
                                     <color key="backgroundColor" red="0.93333333333333335" green="0.93725490196078431" blue="0.95294117647058818" alpha="1" colorSpace="calibratedRGB"/>
                                     <color key="backgroundColor" red="0.93333333333333335" green="0.93725490196078431" blue="0.95294117647058818" alpha="1" colorSpace="calibratedRGB"/>
                                     <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                                     <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                                     <state key="normal" title="暂不更新">
                                     <state key="normal" title="暂不更新">
-                                        <color key="titleColor" red="0.0039215686274509803" green="0.75686274509803919" blue="0.70980392156862748" alpha="1" colorSpace="calibratedRGB"/>
+                                        <color key="titleColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
                                     </state>
                                     </state>
                                     <connections>
                                     <connections>
                                         <action selector="cancleAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="zUc-zM-Pok"/>
                                         <action selector="cancleAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="zUc-zM-Pok"/>
@@ -33,7 +33,7 @@
                                 </button>
                                 </button>
                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mL2-ll-JMl">
                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mL2-ll-JMl">
                                     <rect key="frame" x="136" y="0.0" width="136" height="48"/>
                                     <rect key="frame" x="136" y="0.0" width="136" height="48"/>
-                                    <color key="backgroundColor" red="0.0039215686274509803" green="0.75686274509803919" blue="0.70980392156862748" alpha="1" colorSpace="calibratedRGB"/>
+                                    <color key="backgroundColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
                                     <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                                     <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                                     <state key="normal" title="抢先体验">
                                     <state key="normal" title="抢先体验">
                                         <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                         <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -61,7 +61,7 @@
                             <subviews>
                             <subviews>
                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bQj-kr-1ay">
                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bQj-kr-1ay">
                                     <rect key="frame" x="24" y="-4" width="224" height="42"/>
                                     <rect key="frame" x="24" y="-4" width="224" height="42"/>
-                                    <color key="backgroundColor" red="0.0039215686269999999" green="0.75686274509999996" blue="0.70980392160000005" alpha="1" colorSpace="calibratedRGB"/>
+                                    <color key="backgroundColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
                                     <constraints>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="42" id="cef-4x-IAB"/>
                                         <constraint firstAttribute="height" constant="42" id="cef-4x-IAB"/>
                                     </constraints>
                                     </constraints>
@@ -128,7 +128,7 @@
                     </userDefinedRuntimeAttributes>
                     </userDefinedRuntimeAttributes>
                 </view>
                 </view>
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="upAlert_bg" translatesAutoresizingMaskIntoConstraints="NO" id="2E8-CJ-lc7">
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="upAlert_bg" translatesAutoresizingMaskIntoConstraints="NO" id="2E8-CJ-lc7">
-                    <rect key="frame" x="71" y="255" width="272" height="121"/>
+                    <rect key="frame" x="71" y="199" width="272" height="177"/>
                 </imageView>
                 </imageView>
             </subviews>
             </subviews>
             <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="calibratedRGB"/>
             <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="calibratedRGB"/>
@@ -153,7 +153,7 @@
         </view>
         </view>
     </objects>
     </objects>
     <resources>
     <resources>
-        <image name="upAlert_bg" width="272" height="121"/>
+        <image name="upAlert_bg" width="272" height="177"/>
         <systemColor name="systemBackgroundColor">
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>
         </systemColor>

+ 2 - 1
KulexiuForStudent/KulexiuForStudent/Common/Define/UserKeyHeader.h

@@ -44,7 +44,8 @@
 
 
 #define CHAT_USER_DEFAULT_LOGO (@"chat_personLogo")
 #define CHAT_USER_DEFAULT_LOGO (@"chat_personLogo")
 
 
-#define GROUP_LOGO (@"chat_group_Logo")
+#define GROUP_FAN_LOGO (@"chat_fansGroup_logo")
+#define GROUP_COURSE_LOGO (@"chat_group_Logo")
 
 
 #define USERDEFAULT_LOGO (@"user_default_avatal")
 #define USERDEFAULT_LOGO (@"user_default_avatal")
 
 

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/KulexiuForStudent.entitlements

@@ -2,6 +2,8 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <plist version="1.0">
 <dict>
 <dict>
+	<key>aps-environment</key>
+	<string>development</string>
 	<key>com.apple.developer.associated-domains</key>
 	<key>com.apple.developer.associated-domains</key>
 	<array>
 	<array>
 		<string>applinks:dev.colexiu.com</string>
 		<string>applinks:dev.colexiu.com</string>

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSChatListViewController.m

@@ -184,14 +184,14 @@
     RCConversationModel *model = self.conversationListDataSource[indexPath.row];
     RCConversationModel *model = self.conversationListDataSource[indexPath.row];
     if (model.conversationType == ConversationType_GROUP) {
     if (model.conversationType == ConversationType_GROUP) {
         if ([model.targetId containsString:@"FAN"]) { // 粉丝群
         if ([model.targetId containsString:@"FAN"]) { // 粉丝群
-            [imageView setImage:[UIImage imageNamed:@"chat_fansGroup_logo"]];
+            [imageView setImage:[UIImage imageNamed:GROUP_FAN_LOGO]];
             UIImageView *tagImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"group_fans"]];
             UIImageView *tagImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"group_fans"]];
             [tagView removeAllSubViews];
             [tagView removeAllSubViews];
             [tagView addSubview:tagImage];
             [tagView addSubview:tagImage];
             tagImage.frame = CGRectMake(0, 2, 45, 17);
             tagImage.frame = CGRectMake(0, 2, 45, 17);
         }
         }
         else if ([model.targetId containsString:@"COURSE"]) { // 课程群
         else if ([model.targetId containsString:@"COURSE"]) { // 课程群
-            [imageView setImage:[UIImage imageNamed:@"chat_group_Logo"]];
+            [imageView setImage:[UIImage imageNamed:GROUP_COURSE_LOGO]];
             UIImageView *tagImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"group_course"]];
             UIImageView *tagImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"group_course"]];
             [tagView removeAllSubViews];
             [tagView removeAllSubViews];
             [tagView addSubview:tagImage];
             [tagView addSubview:tagImage];

+ 9 - 1
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/GroupSettingViewController.m

@@ -44,7 +44,15 @@
     self.bodyView = [GroupSettingBodyView shareInstance];
     self.bodyView = [GroupSettingBodyView shareInstance];
     CGFloat height = kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin > 700 ? kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin : 700;
     CGFloat height = kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin > 700 ? kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin : 700;
     self.bodyView.frame = CGRectMake(0, 0, kScreenWidth, height);
     self.bodyView.frame = CGRectMake(0, 0, kScreenWidth, height);
-
+    
+    BOOL isCourseGroup = NO;
+    if ([self.groupId containsString:@"COURSE"]) {
+        isCourseGroup = YES;
+    }
+    else if ([self.groupId containsString:@"FAN"]) {
+        isCourseGroup = NO;
+    }
+    self.bodyView.isCourseGroup = isCourseGroup;
     [self.scrollView addSubview:self.bodyView];
     [self.scrollView addSubview:self.bodyView];
     [self.scrollView setContentSize:CGSizeMake(kScreenWidth, height)];
     [self.scrollView setContentSize:CGSizeMake(kScreenWidth, height)];
 }
 }

+ 14 - 14
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/KSChatComplainController.m

@@ -85,20 +85,20 @@
 - (void)uplodMessage:(NSString *)attachments content:(NSString *)content {
 - (void)uplodMessage:(NSString *)attachments content:(NSString *)content {
     NSString *type = self.fromGroup ? @"GROUP" : @"PERSON";
     NSString *type = self.fromGroup ? @"GROUP" : @"PERSON";
     
     
-//    [KSRequestManager sysImComplaintRequest:KS_POST type:type fileUrl:attachments memo:content targetId:self.targetId success:^(NSDictionary * _Nonnull dic) {
-//        [self removehub];
-//        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-//            MJWeakSelf;
-//            [self KSShowMsg:@"已收到您的投诉,我们会认真审核并处理" promptCompletion:^{
-//                [weakSelf.navigationController popViewControllerAnimated:YES];
-//            }];
-//        }
-//        else {
-//            [self MBPShow:MESSAGEKEY];
-//        }
-//    } faliure:^(NSError * _Nonnull error) {
-//        [self removehub];
-//    }];
+    [KSNetworkingManager sysImComplaintRequest:KS_POST type:type fileUrl:attachments memo:content targetId:self.targetId success:^(NSDictionary * _Nonnull dic) {
+        [self removehub];
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            MJWeakSelf;
+            [self KSShowMsg:@"已收到您的投诉,我们会认真审核并处理" promptCompletion:^{
+                [weakSelf.navigationController popViewControllerAnimated:YES];
+            }];
+        }
+        else {
+            [self MBPShow:MESSAGEKEY];
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        [self removehub];
+    }];
     
     
 }
 }
 /**
 /**

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/GroupSettingBodyView.h

@@ -29,6 +29,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 
 @property (nonatomic, assign) BOOL isOn;
 @property (nonatomic, assign) BOOL isOn;
 
 
+@property (nonatomic, assign) BOOL isCourseGroup;
+
 + (instancetype)shareInstance;
 + (instancetype)shareInstance;
 
 
 - (void)configWithSource:(id)source callback:(GroupSettingBlock)callback;
 - (void)configWithSource:(id)source callback:(GroupSettingBlock)callback;

+ 3 - 2
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/GroupSettingBodyView.m

@@ -113,11 +113,12 @@ typedef void(^ChooseMemberCallback)(NSString *targetId);
     
     
     if ([source isKindOfClass:[GroupListModel class]]) {
     if ([source isKindOfClass:[GroupListModel class]]) {
         GroupListModel *model = source;
         GroupListModel *model = source;
+        NSString *groupPlaceHolder = self.isCourseGroup ? GROUP_COURSE_LOGO : GROUP_FAN_LOGO;
         if ([NSString isEmptyString:model.img]) {
         if ([NSString isEmptyString:model.img]) {
-            [self.groupImage setImage:[UIImage imageNamed:CHAT_USER_DEFAULT_LOGO]];
+            [self.groupImage setImage:[UIImage imageNamed:groupPlaceHolder]];
         }
         }
         else {
         else {
-            [self.groupImage sd_setImageWithURL:[NSURL URLWithString:[model.img getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:GROUP_LOGO]];
+            [self.groupImage sd_setImageWithURL:[NSURL URLWithString:[model.img getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:groupPlaceHolder]];
         }
         }
         
         
         self.groupName.text = [NSString returnNoNullStringWithString:model.name];
         self.groupName.text = [NSString returnNoNullStringWithString:model.name];

+ 3 - 3
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/GroupSettingBodyView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
     <dependencies>
         <deployment identifier="iOS"/>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     </dependencies>
@@ -312,7 +312,7 @@
                 </view>
                 </view>
                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9Zk-Ss-xf8">
                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9Zk-Ss-xf8">
                     <rect key="frame" x="28" y="588" width="358" height="44"/>
                     <rect key="frame" x="28" y="588" width="358" height="44"/>
-                    <color key="backgroundColor" red="0.0039215686269999999" green="0.75686274509999996" blue="0.70980392160000005" alpha="1" colorSpace="calibratedRGB"/>
+                    <color key="backgroundColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
                     <constraints>
                     <constraints>
                         <constraint firstAttribute="height" constant="44" id="zlf-6G-YkC"/>
                         <constraint firstAttribute="height" constant="44" id="zlf-6G-YkC"/>
                     </constraints>
                     </constraints>

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Chat/View/ChatAddressHeaderView.m

@@ -27,7 +27,7 @@
 - (void)awakeFromNib {
 - (void)awakeFromNib {
     [super awakeFromNib];
     [super awakeFromNib];
     self.searchField.delegate = self;
     self.searchField.delegate = self;
-    self.searchField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入群聊/学员名称" attributes:@{NSForegroundColorAttributeName:HexRGB(0x999999)}];
+    self.searchField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入群聊/老师名称" attributes:@{NSForegroundColorAttributeName:HexRGB(0x999999)}];
     self.isChoosePerson = YES;
     self.isChoosePerson = YES;
 }
 }
 
 

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/Chat/View/GroupListViewCell.m

@@ -34,11 +34,11 @@
         NSString *defaultLogo = @"";
         NSString *defaultLogo = @"";
         NSString *typeLogo = @"";
         NSString *typeLogo = @"";
         if ([model.type isEqualToString:@"FAN"]) {
         if ([model.type isEqualToString:@"FAN"]) {
-            defaultLogo = @"chat_fansGroup_logo";
+            defaultLogo = GROUP_FAN_LOGO;
             typeLogo = @"group_fans";
             typeLogo = @"group_fans";
         }
         }
         else {
         else {
-            defaultLogo = @"chat_group_Logo";
+            defaultLogo = GROUP_COURSE_LOGO;
             typeLogo = @"group_course";
             typeLogo = @"group_course";
         }
         }
         [self.typeLogo setImage:[UIImage imageNamed:typeLogo]];
         [self.typeLogo setImage:[UIImage imageNamed:typeLogo]];

+ 3 - 3
KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/Controller/KSCloudViewController.m

@@ -792,7 +792,7 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
         imageName = @"score_great";
         imageName = @"score_great";
     }
     }
     else if (score >= 40) { // good
     else if (score >= 40) { // good
-        measureBgColor = HexRGBAlpha(0x01c1b5, 0.17f);
+        measureBgColor = HexRGBAlpha(0x2dc7aa, 0.17f);
         titleColor = HexRGB(0xFF958B);
         titleColor = HexRGB(0xFF958B);
         imageName = @"score_good";
         imageName = @"score_good";
     }
     }
@@ -1094,7 +1094,7 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
 - (void)displayView {
 - (void)displayView {
     [self.view addSubview:self.viewContainer];
     [self.view addSubview:self.viewContainer];
     _backView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KLandscapeWidth, KLandscapeHeight)];
     _backView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KLandscapeWidth, KLandscapeHeight)];
-    _backView.backgroundColor = HexRGB(0x01c1b5);
+    _backView.backgroundColor = THEMECOLOR;
     [self.view addSubview:_backView];
     [self.view addSubview:_backView];
     _bgColorView = [[UIView alloc] initWithFrame:self.defaultFrame];
     _bgColorView = [[UIView alloc] initWithFrame:self.defaultFrame];
     _bgColorView.layer.cornerRadius = 14.0f;
     _bgColorView.layer.cornerRadius = 14.0f;
@@ -1777,7 +1777,7 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
     if (!_evaluateButton) {
     if (!_evaluateButton) {
         _evaluateButton = [UIButton buttonWithType:UIButtonTypeCustom];
         _evaluateButton = [UIButton buttonWithType:UIButtonTypeCustom];
         _evaluateButton.layer.cornerRadius = 22.0f;
         _evaluateButton.layer.cornerRadius = 22.0f;
-        [_evaluateButton setBackgroundColor:HexRGB(0x01c1b5)];
+        [_evaluateButton setBackgroundColor:THEMECOLOR];
         _evaluateButton.frame = CGRectMake((KLandscapeWidth - 150)/2.0f, KLandscapeHeight - 44 - 20, 150, 44);
         _evaluateButton.frame = CGRectMake((KLandscapeWidth - 150)/2.0f, KLandscapeHeight - 44 - 20, 150, 44);
         [_evaluateButton.titleLabel setFont:[UIFont systemFontOfSize:18.0f weight:UIFontWeightMedium]];
         [_evaluateButton.titleLabel setFont:[UIFont systemFontOfSize:18.0f weight:UIFontWeightMedium]];
         [_evaluateButton setTitle:@"开始演奏" forState:UIControlStateNormal];
         [_evaluateButton setTitle:@"开始演奏" forState:UIControlStateNormal];

+ 3 - 3
KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/View/Channel/TrackChooseView.m

@@ -55,7 +55,7 @@
         UIButton *button =  [self createButtonWithName:self.trackNameArray[i] frame:frame tag:i+1000];
         UIButton *button =  [self createButtonWithName:self.trackNameArray[i] frame:frame tag:i+1000];
         if (i == 0) {
         if (i == 0) {
             button.selected = YES;
             button.selected = YES;
-            button.layer.borderColor = HexRGB(0x01c1b5).CGColor;
+            button.layer.borderColor = THEMECOLOR.CGColor;
         }
         }
         [self.baseScroll addSubview:button];
         [self.baseScroll addSubview:button];
         maxHeight = (i / 3) * (buttonHeight + space) + buttonHeight + space;
         maxHeight = (i / 3) * (buttonHeight + space) + buttonHeight + space;
@@ -81,7 +81,7 @@
     button.layer.borderWidth = 1.0f;
     button.layer.borderWidth = 1.0f;
     [button.titleLabel setFont:[UIFont systemFontOfSize:12.0f]];
     [button.titleLabel setFont:[UIFont systemFontOfSize:12.0f]];
     [button setTitleColor:HexRGB(0x333333) forState:UIControlStateNormal];
     [button setTitleColor:HexRGB(0x333333) forState:UIControlStateNormal];
-    [button setTitleColor:HexRGB(0x01c1b5) forState:UIControlStateSelected];
+    [button setTitleColor:THEMECOLOR forState:UIControlStateSelected];
     return button;
     return button;
 }
 }
 
 
@@ -90,7 +90,7 @@
     BOOL isSelected = sender.isSelected;
     BOOL isSelected = sender.isSelected;
     NSString *trackName = sender.titleLabel.text;
     NSString *trackName = sender.titleLabel.text;
     if (isSelected) {
     if (isSelected) {
-        sender.layer.borderColor = HexRGB(0x01c1b5).CGColor;
+        sender.layer.borderColor = THEMECOLOR.CGColor;
         [self chooseTrackWithName:trackName];
         [self chooseTrackWithName:trackName];
     }
     }
     else {
     else {

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/View/Help/CloudFeedbackView.m

@@ -45,7 +45,7 @@
 
 
 - (IBAction)TypeButonAction:(UIButton *)sender {
 - (IBAction)TypeButonAction:(UIButton *)sender {
     [sender setBackgroundColor:HexRGB(0xe2fff9)];
     [sender setBackgroundColor:HexRGB(0xe2fff9)];
-    sender.layer.borderColor = HexRGB(0x01c1b5).CGColor;
+    sender.layer.borderColor = THEMECOLOR.CGColor;
     self.typeString = sender.titleLabel.text;
     self.typeString = sender.titleLabel.text;
     NSInteger index = sender.tag;
     NSInteger index = sender.tag;
     
     

+ 3 - 3
KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/View/Help/CloudHelpView.m

@@ -139,14 +139,14 @@
     CGFloat positionX = 0.0f;
     CGFloat positionX = 0.0f;
     NSInteger pageIndex = 0;
     NSInteger pageIndex = 0;
     if (isChooseSettingButton) {
     if (isChooseSettingButton) {
-        [self.guideButton setTitleColor:HexRGB(0x01c1b5) forState:UIControlStateNormal];
+        [self.guideButton setTitleColor:THEMECOLOR forState:UIControlStateNormal];
         [self.helpButton setTitleColor:HexRGB(0x1a1a1a) forState:UIControlStateNormal];
         [self.helpButton setTitleColor:HexRGB(0x1a1a1a) forState:UIControlStateNormal];
         positionX = 65.0f;
         positionX = 65.0f;
         pageIndex = 0;
         pageIndex = 0;
     }
     }
     else {
     else {
         [self.guideButton setTitleColor:HexRGB(0x1a1a1a) forState:UIControlStateNormal];
         [self.guideButton setTitleColor:HexRGB(0x1a1a1a) forState:UIControlStateNormal];
-        [self.helpButton setTitleColor:HexRGB(0x01c1b5) forState:UIControlStateNormal];
+        [self.helpButton setTitleColor:THEMECOLOR forState:UIControlStateNormal];
         positionX = 225.0f;
         positionX = 225.0f;
         pageIndex = 1;
         pageIndex = 1;
     }
     }
@@ -226,7 +226,7 @@
         _feedbackButton = [UIButton buttonWithType:UIButtonTypeCustom];
         _feedbackButton = [UIButton buttonWithType:UIButtonTypeCustom];
         _feedbackButton.frame = CGRectMake(320, KLandscapeHeight - 55 - 55, 320, 55);
         _feedbackButton.frame = CGRectMake(320, KLandscapeHeight - 55 - 55, 320, 55);
         [_feedbackButton setTitle:@"意见反馈 >" forState:UIControlStateNormal];
         [_feedbackButton setTitle:@"意见反馈 >" forState:UIControlStateNormal];
-        [_feedbackButton setTitleColor:HexRGB(0x01c1b5) forState:UIControlStateNormal];
+        [_feedbackButton setTitleColor:THEMECOLOR forState:UIControlStateNormal];
         [_feedbackButton.titleLabel setFont:[UIFont systemFontOfSize:14.0f]];
         [_feedbackButton.titleLabel setFont:[UIFont systemFontOfSize:14.0f]];
         [_feedbackButton addTarget:self action:@selector(feedbackButtonAction) forControlEvents:UIControlEventTouchUpInside];
         [_feedbackButton addTarget:self action:@selector(feedbackButtonAction) forControlEvents:UIControlEventTouchUpInside];
     }
     }

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/View/SettingView/JudgePageView.m

@@ -36,8 +36,8 @@
 - (void)setButtonSelected:(BOOL)isSelected withButton:(UIButton *)button {
 - (void)setButtonSelected:(BOOL)isSelected withButton:(UIButton *)button {
     if (isSelected) {
     if (isSelected) {
         button.backgroundColor = HexRGB(0xe2fff9);
         button.backgroundColor = HexRGB(0xe2fff9);
-        button.layer.borderColor = HexRGB(0x01c1b5).CGColor;
-        [button setTitleColor:HexRGB(0x01c1b5) forState:UIControlStateNormal];
+        button.layer.borderColor = THEMECOLOR.CGColor;
+        [button setTitleColor:THEMECOLOR forState:UIControlStateNormal];
         [button.titleLabel setFont:[UIFont systemFontOfSize:14.0f weight:UIFontWeightMedium]];
         [button.titleLabel setFont:[UIFont systemFontOfSize:14.0f weight:UIFontWeightMedium]];
     }
     }
     else {
     else {

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/View/SettingView/KSCloudSettingView.m

@@ -71,14 +71,14 @@
     CGFloat positionX = 0.0f;
     CGFloat positionX = 0.0f;
     NSInteger pageIndex = 0;
     NSInteger pageIndex = 0;
     if (isChooseSettingButton) {
     if (isChooseSettingButton) {
-        [self.settingButton setTitleColor:HexRGB(0x01c1b5) forState:UIControlStateNormal];
+        [self.settingButton setTitleColor:THEMECOLOR forState:UIControlStateNormal];
         [self.judgeButton setTitleColor:HexRGB(0x1a1a1a) forState:UIControlStateNormal];
         [self.judgeButton setTitleColor:HexRGB(0x1a1a1a) forState:UIControlStateNormal];
         positionX = 65.0f;
         positionX = 65.0f;
         pageIndex = 0;
         pageIndex = 0;
     }
     }
     else {
     else {
         [self.settingButton setTitleColor:HexRGB(0x1a1a1a) forState:UIControlStateNormal];
         [self.settingButton setTitleColor:HexRGB(0x1a1a1a) forState:UIControlStateNormal];
-        [self.judgeButton setTitleColor:HexRGB(0x01c1b5) forState:UIControlStateNormal];
+        [self.judgeButton setTitleColor:THEMECOLOR forState:UIControlStateNormal];
         positionX = 225.0f;
         positionX = 225.0f;
         pageIndex = 1;
         pageIndex = 1;
     }
     }

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/View/StaffView/CloudControlButton.m

@@ -55,7 +55,7 @@
         UIView *view = [[UIView alloc] initWithFrame:CGRectZero];
         UIView *view = [[UIView alloc] initWithFrame:CGRectZero];
         view.backgroundColor = UIColor.whiteColor;
         view.backgroundColor = UIColor.whiteColor;
         view.layer.cornerRadius = 8.0f;
         view.layer.cornerRadius = 8.0f;
-        view.layer.borderColor = HexRGB(0x01c1b5).CGColor;
+        view.layer.borderColor = THEMECOLOR.CGColor;
         view.layer.borderWidth = 1.0f;
         view.layer.borderWidth = 1.0f;
         [view addSubview:self.speedLabel];
         [view addSubview:self.speedLabel];
         [self addSubview:view];
         [self addSubview:view];
@@ -115,7 +115,7 @@
     if (!_speedLabel) {
     if (!_speedLabel) {
         _speedLabel = [[UILabel alloc] init];
         _speedLabel = [[UILabel alloc] init];
         [_speedLabel setFont:[UIFont systemFontOfSize:10.0f]];
         [_speedLabel setFont:[UIFont systemFontOfSize:10.0f]];
-        _speedLabel.textColor = HexRGB(0x01c1b5);
+        _speedLabel.textColor = THEMECOLOR;
         _speedLabel.textAlignment = NSTextAlignmentCenter;
         _speedLabel.textAlignment = NSTextAlignmentCenter;
     }
     }
     return _speedLabel;
     return _speedLabel;

+ 8 - 2
KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m

@@ -202,7 +202,7 @@
         AccompanyCourseInfoCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AccompanyCourseInfoCell"];
         AccompanyCourseInfoCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AccompanyCourseInfoCell"];
         cell.statusLabel.textColor = HexRGB(0x999999);
         cell.statusLabel.textColor = HexRGB(0x999999);
         [self evaluateWithStatusLabel:cell.statusLabel];
         [self evaluateWithStatusLabel:cell.statusLabel];
-        [cell configWithStartTime:self.homeworkModel.startTime endTime:self.homeworkModel.endTime teacherAvatar:self.homeworkModel.teacherAvatar teacherName:self.homeworkModel.teacherName teacherId:self.homeworkModel.teacherId courseSubject:self.homeworkModel.subjectName];
+        [cell configWithStartTime:self.homeworkModel.startTime endTime:self.homeworkModel.endTime teacherAvatar:self.homeworkModel.teacherAvatar teacherName:self.homeworkModel.teacherName teacherId:self.homeworkModel.teacherId courseSubject:self.homeworkModel.subjectName isMusicRoom:NO];
         cell.hideChatButton = YES;
         cell.hideChatButton = YES;
         return cell;
         return cell;
     }
     }
@@ -232,10 +232,11 @@
     else if (indexPath.row == 4) {
     else if (indexPath.row == 4) {
         // studentAttachments
         // studentAttachments
         BOOL canDisplay = self.homeworkModel.decorateHomework == 1 ? YES : NO;
         BOOL canDisplay = self.homeworkModel.decorateHomework == 1 ? YES : NO;
+        BOOL isExpired = self.homeworkModel.homeworkExpire == 1 ? YES : NO;
         AccompanyHomeworkCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AccompanyHomeworkCell"];
         AccompanyHomeworkCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AccompanyHomeworkCell"];
         cell.canSubmit = self.canModify;
         cell.canSubmit = self.canModify;
         MJWeakSelf;
         MJWeakSelf;
-        [cell configWithAttachmentArray:self.fileArray canDisplaySubmitView:canDisplay callback:^(HOMEWORKACTION action, NSInteger viewIndex) {
+        [cell configWithAttachmentArray:self.fileArray canDisplaySubmitView:canDisplay isExpired:isExpired callback:^(HOMEWORKACTION action, NSInteger viewIndex) {
             [weakSelf operationActionWithType:action index:viewIndex];
             [weakSelf operationActionWithType:action index:viewIndex];
         }];
         }];
         
         
@@ -251,6 +252,7 @@
 
 
 // 课程评价
 // 课程评价
 - (void)evaluateCourse {
 - (void)evaluateCourse {
+    
     if (![self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
     if (![self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
         [self MBPShow:@"课程结束之后才可以评价哦~"];
         [self MBPShow:@"课程结束之后才可以评价哦~"];
         return;
         return;
@@ -442,6 +444,10 @@
 }
 }
 
 
 - (void)submitHomeworkAction {
 - (void)submitHomeworkAction {
+    if (self.homeworkModel.homeworkExpire == 1) {
+        [self MBPShow:@"作业已过期无法提交和查看!"];
+        return;
+    }
     if (self.isModify == NO) {
     if (self.isModify == NO) {
         [self MBPShow:@"请先选择视频文件"];
         [self MBPShow:@"请先选择视频文件"];
         return;
         return;

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/View/AccompanyCourseInfoCell.h

@@ -17,7 +17,7 @@ typedef void(^AccompanyChatCallback)(void);
 
 
 @property (nonatomic, assign) BOOL hideChatButton;
 @property (nonatomic, assign) BOOL hideChatButton;
 
 
-- (void)configWithStartTime:(NSString *)beginTime endTime:(NSString *)endTime teacherAvatar:(NSString *)teacherAvatar teacherName:(NSString *)teacherName teacherId:(NSString *)teacherId courseSubject:(NSString *)courseSubject;
+- (void)configWithStartTime:(NSString *)beginTime endTime:(NSString *)endTime teacherAvatar:(NSString *)teacherAvatar teacherName:(NSString *)teacherName teacherId:(NSString *)teacherId courseSubject:(NSString *)courseSubject isMusicRoom:(BOOL)isMusicRoom;
 
 
 - (void)chatCalkback:(AccompanyChatCallback)callback;
 - (void)chatCalkback:(AccompanyChatCallback)callback;
 
 

+ 12 - 3
KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/View/AccompanyCourseInfoCell.m

@@ -21,6 +21,7 @@
 @property (nonatomic, strong) NSString *userName;
 @property (nonatomic, strong) NSString *userName;
 
 
 @property (nonatomic, copy) AccompanyChatCallback callback;
 @property (nonatomic, copy) AccompanyChatCallback callback;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *avatalHeight;
 
 
 @end
 @end
 
 
@@ -32,7 +33,7 @@
     self.selectionStyle = UITableViewCellSelectionStyleNone;
     self.selectionStyle = UITableViewCellSelectionStyleNone;
 }
 }
 
 
-- (void)configWithStartTime:(NSString *)beginTime endTime:(NSString *)endTime teacherAvatar:(NSString *)teacherAvatar teacherName:(NSString *)teacherName teacherId:(NSString *)teacherId courseSubject:(NSString *)courseSubject {
+- (void)configWithStartTime:(NSString *)beginTime endTime:(NSString *)endTime teacherAvatar:(NSString *)teacherAvatar teacherName:(NSString *)teacherName teacherId:(NSString *)teacherId courseSubject:(NSString *)courseSubject isMusicRoom:(BOOL)isMusicRoom {
     // time
     // time
     NSDateFormatter *formatter = [NSObject getDateformatter];
     NSDateFormatter *formatter = [NSObject getDateformatter];
     [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
     [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
@@ -43,9 +44,17 @@
     [formatter setDateFormat:@"HH:mm"];
     [formatter setDateFormat:@"HH:mm"];
     NSString *lessonEnd = [formatter stringFromDate:endDate];
     NSString *lessonEnd = [formatter stringFromDate:endDate];
     self.courseTime.text = [NSString stringWithFormat:@"%@~%@",[NSString returnNoNullStringWithString:lessonBegin],[NSString returnNoNullStringWithString:lessonEnd]];
     self.courseTime.text = [NSString stringWithFormat:@"%@~%@",[NSString returnNoNullStringWithString:lessonBegin],[NSString returnNoNullStringWithString:lessonEnd]];
+    if (isMusicRoom) {
+        self.studentName.text = teacherName;
+        [self.studentAvatar setImage:[UIImage imageNamed:@"course_musicRoom"]];
+        self.avatalHeight.constant = 51.0f;
+    }
+    else {
+        self.studentName.text = [NSString returnNoNullStringWithString:teacherName];
+        [self.studentAvatar sd_setImageWithURL:[NSURL URLWithString:[teacherAvatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+        self.avatalHeight.constant = 47.0f;
+    }
     
     
-    self.studentName.text = [NSString returnNoNullStringWithString:teacherName];
-    [self.studentAvatar sd_setImageWithURL:[NSURL URLWithString:[teacherAvatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
     self.studentSubject.text = [NSString returnNoNullStringWithString:courseSubject];
     self.studentSubject.text = [NSString returnNoNullStringWithString:courseSubject];
 
 
     self.userId = teacherId;
     self.userId = teacherId;

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/View/AccompanyCourseInfoCell.xib

@@ -151,6 +151,7 @@
             <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
             <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <connections>
             <connections>
+                <outlet property="avatalHeight" destination="NoH-2D-u0z" id="l7v-q5-J6N"/>
                 <outlet property="chatButton" destination="dZv-fL-5CE" id="AJN-Du-3LN"/>
                 <outlet property="chatButton" destination="dZv-fL-5CE" id="AJN-Du-3LN"/>
                 <outlet property="courseTime" destination="dYZ-ZA-mKb" id="JjR-Me-4kj"/>
                 <outlet property="courseTime" destination="dYZ-ZA-mKb" id="JjR-Me-4kj"/>
                 <outlet property="statusLabel" destination="sy0-Ds-ef0" id="0IK-l7-I3g"/>
                 <outlet property="statusLabel" destination="sy0-Ds-ef0" id="0IK-l7-I3g"/>

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/View/AccompanyHomeworkCell.h

@@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 
 @property (nonatomic, assign) BOOL canSubmit;
 @property (nonatomic, assign) BOOL canSubmit;
 
 
-- (void)configWithAttachmentArray:(NSMutableArray *)fileArray canDisplaySubmitView:(BOOL)canDisplay callback:(HomeworkCellAction)callback;
+- (void)configWithAttachmentArray:(NSMutableArray *)fileArray canDisplaySubmitView:(BOOL)canDisplay isExpired:(BOOL)homeworkExpire callback:(HomeworkCellAction)callback;
 
 
 @end
 @end
 
 

+ 14 - 2
KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/View/AccompanyHomeworkCell.m

@@ -11,6 +11,7 @@
 @interface AccompanyHomeworkCell ()
 @interface AccompanyHomeworkCell ()
 
 
 @property (weak, nonatomic) IBOutlet UIView *emptyView;
 @property (weak, nonatomic) IBOutlet UIView *emptyView;
+@property (weak, nonatomic) IBOutlet UILabel *emptyDescLabel;
 
 
 @property (weak, nonatomic) IBOutlet UIView *videoContainer;
 @property (weak, nonatomic) IBOutlet UIView *videoContainer;
 
 
@@ -26,17 +27,28 @@
     self.selectionStyle = UITableViewCellSelectionStyleNone;
     self.selectionStyle = UITableViewCellSelectionStyleNone;
 }
 }
 
 
-- (void)configWithAttachmentArray:(NSMutableArray *)fileArray canDisplaySubmitView:(BOOL)canDisplay callback:(nonnull HomeworkCellAction)callback {
+- (void)configWithAttachmentArray:(NSMutableArray *)fileArray canDisplaySubmitView:(BOOL)canDisplay isExpired:(BOOL)homeworkExpire callback:(HomeworkCellAction)callback {
     if (callback) {
     if (callback) {
         self.callback = callback;
         self.callback = callback;
     }
     }
     [self.videoContainer removeAllSubViews];
     [self.videoContainer removeAllSubViews];
-    if (canDisplay) { // 如果已经布置作业
+    if (canDisplay && homeworkExpire == NO) { // 如果已经布置作业
         self.emptyView.hidden = YES;
         self.emptyView.hidden = YES;
         [self configVideoViewWithSource:fileArray];
         [self configVideoViewWithSource:fileArray];
     }
     }
     else { // 未布置
     else { // 未布置
         self.emptyView.hidden = NO;
         self.emptyView.hidden = NO;
+        NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+        [paragraphStyle setLineSpacing:4];//调整行间距
+        NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] init];
+        if (homeworkExpire) {
+            attr = [[NSMutableAttributedString alloc] initWithString:@"作业已过期无法提交和查看!" attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:13.0f],NSForegroundColorAttributeName:HexRGB(0x999999)}];
+        }
+        else {
+            attr = [[NSMutableAttributedString alloc] initWithString:@"课程结束之后可上传视频作业" attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:13.0f],NSForegroundColorAttributeName:HexRGB(0x999999)}];
+            
+        }
+        self.emptyDescLabel.attributedText = attr;
     }
     }
 }
 }
 
 

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/View/AccompanyHomeworkCell.xib

@@ -121,6 +121,7 @@
             <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
             <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <connections>
             <connections>
+                <outlet property="emptyDescLabel" destination="xV1-w2-nqO" id="ZNY-JG-qzw"/>
                 <outlet property="emptyView" destination="0zy-PX-mCI" id="3KA-n7-M42"/>
                 <outlet property="emptyView" destination="0zy-PX-mCI" id="3KA-n7-M42"/>
                 <outlet property="videoContainer" destination="EwC-zg-aiZ" id="5RL-eg-4SG"/>
                 <outlet property="videoContainer" destination="EwC-zg-aiZ" id="5RL-eg-4SG"/>
             </connections>
             </connections>

+ 7 - 1
KulexiuForStudent/KulexiuForStudent/Module/Course/Controller/CourseViewController.m

@@ -56,6 +56,10 @@
 
 
 @property (nonatomic, assign) NSInteger liveEndTime;        // 直播课结束后退出时间配置(分钟)
 @property (nonatomic, assign) NSInteger liveEndTime;        // 直播课结束后退出时间配置(分钟)
 
 
+@property (nonatomic, assign) NSInteger pianoStartTime;      // 琴房课开课前可进入时间配置(分钟)
+
+@property (nonatomic, assign) NSInteger pianoEndTime;        // 琴房课结束后退出时间配置(分钟)
+
 @end
 @end
 
 
 @implementation CourseViewController
 @implementation CourseViewController
@@ -341,6 +345,8 @@
             self.practiceEndTime = [config integerValueForKey:@"practiceEndTime"];
             self.practiceEndTime = [config integerValueForKey:@"practiceEndTime"];
             self.liveStartTime = [config integerValueForKey:@"liveStartTime"];
             self.liveStartTime = [config integerValueForKey:@"liveStartTime"];
             self.liveEndTime = [config integerValueForKey:@"liveEndTime"];
             self.liveEndTime = [config integerValueForKey:@"liveEndTime"];
+            self.pianoStartTime = [config integerValueForKey:@"pianoStartTime"];
+            self.pianoEndTime = [config integerValueForKey:@"pianoEndTime"];
             
             
             NSArray *courseArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"studentList"];
             NSArray *courseArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"studentList"];
             NSMutableArray *lessonArray = [NSMutableArray array];
             NSMutableArray *lessonArray = [NSMutableArray array];
@@ -422,7 +428,7 @@
     else {
     else {
         MusicRoomCourseCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MusicRoomCourseCell"];
         MusicRoomCourseCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MusicRoomCourseCell"];
         MJWeakSelf;
         MJWeakSelf;
-        [cell configWithSource:model beforeTime:self.practiceStartTime callback:^(NSString * _Nonnull targetId) {
+        [cell configWithSource:model beforeTime:self.pianoStartTime callback:^(NSString * _Nonnull targetId) {
             [weakSelf chatAction:targetId groupName:@"" isGroup:YES];
             [weakSelf chatAction:targetId groupName:@"" isGroup:YES];
         }];
         }];
         return cell;
         return cell;

+ 4 - 3
KulexiuForStudent/KulexiuForStudent/Module/Course/MusicRoom/Controller/MusicRoomDetailViewController.m

@@ -70,8 +70,8 @@
     [KSNetworkingManager selectRoomConfigRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
     [KSNetworkingManager selectRoomConfigRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             NSDictionary *result = [dic dictionaryValueForKey:@"data"];
             NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-            self.joinRoomBeforeTime = [result integerValueForKey:@"practiceStartTime"];
-            self.quitRomeEndTime = [result integerValueForKey:@"practiceEndTime"];
+            self.joinRoomBeforeTime = [result integerValueForKey:@"pianoStartTime"];
+            self.quitRomeEndTime = [result integerValueForKey:@"pianoEndTime"];
         }
         }
         else {
         else {
             [self MBPShow:MESSAGEKEY];
             [self MBPShow:MESSAGEKEY];
@@ -197,10 +197,11 @@
     else if (indexPath.row == 2) {
     else if (indexPath.row == 2) {
         // studentAttachments
         // studentAttachments
         BOOL canDisplay = self.homeworkModel.decorateHomework == 1 ? YES : NO;
         BOOL canDisplay = self.homeworkModel.decorateHomework == 1 ? YES : NO;
+        BOOL isExpired = self.homeworkModel.homeworkExpire == 1 ? YES : NO;
         AccompanyHomeworkCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AccompanyHomeworkCell"];
         AccompanyHomeworkCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AccompanyHomeworkCell"];
         cell.canSubmit = self.canModify;
         cell.canSubmit = self.canModify;
         MJWeakSelf;
         MJWeakSelf;
-        [cell configWithAttachmentArray:self.fileArray canDisplaySubmitView:canDisplay callback:^(HOMEWORKACTION action, NSInteger viewIndex) {
+        [cell configWithAttachmentArray:self.fileArray canDisplaySubmitView:canDisplay isExpired:isExpired callback:^(HOMEWORKACTION action, NSInteger viewIndex) {
             [weakSelf operationActionWithType:action index:viewIndex];
             [weakSelf operationActionWithType:action index:viewIndex];
         }];
         }];
         
         

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/HomeViewController.m

@@ -413,7 +413,7 @@
 
 
 - (void)requestNewsList {
 - (void)requestNewsList {
     dispatch_group_enter(self.requestGroup);
     dispatch_group_enter(self.requestGroup);
-    [KSNetworkingManager homeNewsList:KS_POST success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager homeNewsList:KS_POST version:[USER_MANAGER getCurrentVersion] success:^(NSDictionary * _Nonnull dic) {
         dispatch_group_leave(self.requestGroup);
         dispatch_group_leave(self.requestGroup);
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             NSDictionary *result = [dic dictionaryValueForKey:@"data"];
             NSDictionary *result = [dic dictionaryValueForKey:@"data"];
@@ -468,7 +468,7 @@
 
 
 - (void)requestHotAlbum {
 - (void)requestHotAlbum {
     dispatch_group_enter(self.requestGroup);
     dispatch_group_enter(self.requestGroup);
-    [KSNetworkingManager HomeHotAlbumRequest:KS_POST page:1 rows:10 success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager HomeHotAlbumRequest:KS_POST page:1 rows:10 version:[USER_MANAGER getCurrentVersion] success:^(NSDictionary * _Nonnull dic) {
         dispatch_group_leave(self.requestGroup);
         dispatch_group_leave(self.requestGroup);
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
             NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
@@ -506,7 +506,7 @@
 - (void)requestCourseInfo {
 - (void)requestCourseInfo {
 
 
     dispatch_group_enter(self.requestGroup);
     dispatch_group_enter(self.requestGroup);
-    [KSNetworkingManager homeQueryLiveAndVideo:KS_GET success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager homeQueryLiveAndVideo:KS_GET version:[USER_MANAGER getCurrentVersion] success:^(NSDictionary * _Nonnull dic) {
         dispatch_group_leave(self.requestGroup);
         dispatch_group_leave(self.requestGroup);
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             NSDictionary *sourceDic = [dic dictionaryValueForKey:@"data"];
             NSDictionary *sourceDic = [dic dictionaryValueForKey:@"data"];
@@ -612,7 +612,7 @@
 
 
 - (void)requestTeacherStyle {
 - (void)requestTeacherStyle {
     dispatch_group_enter(self.requestGroup);
     dispatch_group_enter(self.requestGroup);
-    [KSNetworkingManager homeQueryTeacherStyle:KS_POST page:1 rows:10 success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager homeQueryTeacherStyle:KS_POST page:1 rows:10 version:[USER_MANAGER getCurrentVersion] success:^(NSDictionary * _Nonnull dic) {
         dispatch_group_leave(self.requestGroup);
         dispatch_group_leave(self.requestGroup);
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
             NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];

+ 30 - 24
KulexiuForStudent/KulexiuForStudent/Module/Home/NoticeCenter/Controller/NotiferMessageViewController.m

@@ -144,6 +144,7 @@
         [self.tableView.mj_footer endRefreshing];
         [self.tableView.mj_footer endRefreshing];
     });
     });
 }
 }
+
 - (void)requestData {
 - (void)requestData {
     [self showhud];
     [self showhud];
     [KSNetworkingManager sysMessageListRequest:KS_POST group:self.groupType page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
     [KSNetworkingManager sysMessageListRequest:KS_POST group:self.groupType page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
@@ -221,33 +222,38 @@
 }
 }
 
 
 - (void)toDetailViewWithTypeString:(NSString *)memo {
 - (void)toDetailViewWithTypeString:(NSString *)memo {
+    
     if (![NSString isEmptyString:memo]) {
     if (![NSString isEmptyString:memo]) {
-        NSString *headStr = [[memo componentsSeparatedByString:@"?"] firstObject];
-        if ([headStr isEqualToString:@"buyPractice"] || [headStr isEqualToString:@"courseRemind"]) { // 课表
-            [self toCourseTable];
-        }
-        else if ([headStr isEqualToString:@"evaluate"]) { // 评价页面
-
-        }
-        else if ([headStr isEqualToString:@"H5"]) { // web
-            NSString *valueStr = [[memo componentsSeparatedByString:@"H5?"] lastObject];
-            KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
-            webCtrl.url = valueStr;
-            CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
-            [navCtrl pushViewController:webCtrl animated:YES];
-        }
-        else if ([headStr isEqualToString:@"homework"]) { // 作业详情
-            NSString *valueStr = [[memo componentsSeparatedByString:@"homework?"] lastObject];
-            NSArray *parmArray = [valueStr componentsSeparatedByString:@"&"];
-            NSString *courseId = nil;
-            for (NSString *subStr in parmArray) {
-                if ([subStr containsString:@"courseId"]) {
-                    courseId = [[subStr componentsSeparatedByString:@"="] lastObject];
+        NSData *jsonData = [memo mj_JSONData];
+        NSError *error;
+        NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&error];
+        if (!error) {
+            NSString *action = [dict stringValueForKey:@"action"];
+            if ([action isEqualToString:@"app"]) {
+                NSString *pageType = [dict stringValueForKey:@"pageTag"];
+                if ([pageType isEqualToString:@"homework"]) { // 作业
+                    NSString *parmString = [dict stringValueForKey:@"params"];
+                    NSData *parmData = [parmString mj_JSONData];
+                    NSDictionary *parm = [NSJSONSerialization JSONObjectWithData:parmData options:NSJSONReadingMutableContainers error:&error];
+                    if (!error) {
+                        HomeworkDetailViewController *detailVC = [[HomeworkDetailViewController alloc] init];
+                        detailVC.courseId = [parm stringValueForKey:@"courseId"];
+                        [self.navigationController pushViewController:detailVC animated:YES];
+                    }
+                }
+                else if ([pageType isEqualToString:@"buyPractice"] || [pageType isEqualToString:@"courseRemind"]) {
+                    [self toCourseTable];
+                }
+            }
+            else {
+                NSString *webUrl = [dict stringValueForKey:@"url"];
+                if (![NSString isEmptyString:webUrl]) {
+                    KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+                    webCtrl.url = webUrl;
+                    CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                    [navCtrl pushViewController:webCtrl animated:YES];
                 }
                 }
             }
             }
-            HomeworkDetailViewController *detailVC = [[HomeworkDetailViewController alloc] init];
-            detailVC.courseId = courseId;
-            [self.navigationController pushViewController:detailVC animated:YES];
         }
         }
     }
     }
 }
 }

+ 4 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m

@@ -1597,6 +1597,10 @@ static int clickPraiseBtnTimes  = 0;
 
 
 
 
 - (void)sendSeatMessageApply:(BOOL)isApply {
 - (void)sendSeatMessageApply:(BOOL)isApply {
+    if (self.micStatus == MICSTATUS_CONNECTING) {
+        [self MBPShow:@"您已上麦"];
+        return;
+    }
     SEATHANDLE type = isApply ? SEATHANDLE_APPLY : SEATHANDLE_CANCELAPPLY;
     SEATHANDLE type = isApply ? SEATHANDLE_APPLY : SEATHANDLE_CANCELAPPLY;
     KSLiveChatroomSeatApply *applyMessage = [[KSLiveChatroomSeatApply alloc] init];
     KSLiveChatroomSeatApply *applyMessage = [[KSLiveChatroomSeatApply alloc] init];
     applyMessage.type = type;
     applyMessage.type = type;

+ 3 - 0
KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/LoginViewController.m

@@ -61,6 +61,9 @@
         case LOGINACTION_PASSWORD:
         case LOGINACTION_PASSWORD:
         {
         {
             PasswordLoginController *ctrl = [[PasswordLoginController alloc] init];
             PasswordLoginController *ctrl = [[PasswordLoginController alloc] init];
+            if (![NSString isEmptyString:phone]) {
+                ctrl.phoneNo = phone;
+            }
             [self.navigationController pushViewController:ctrl animated:YES];
             [self.navigationController pushViewController:ctrl animated:YES];
         }
         }
             break;
             break;

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/PasswordLoginController.h

@@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 
 @interface PasswordLoginController : KSBaseViewController
 @interface PasswordLoginController : KSBaseViewController
 
 
+@property (nonatomic, strong) NSString *phoneNo;
 
 
 @end
 @end
 
 

+ 9 - 4
KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/PasswordLoginController.m

@@ -28,11 +28,16 @@
 - (void)configUI {
 - (void)configUI {
     CGFloat height = KPortraitHeight;
     CGFloat height = KPortraitHeight;
     _bodyView = [PasswordBodyView shareInstance];
     _bodyView = [PasswordBodyView shareInstance];
-    if (![NSString isEmptyString:UserDefault(PHONEKEY)]) {
-        _bodyView.phoneField.text = UserDefault(PHONEKEY);
+    if (![NSString isEmptyString:self.phoneNo] && ![self.phoneNo isEqualToString:UserDefault(PHONEKEY)]) {
+        _bodyView.phoneField.text = self.phoneNo;
     }
     }
-    if (![NSString isEmptyString:UserDefault(PASSWORDKEY)]) {
-        _bodyView.passwordField.text = UserDefault(PASSWORDKEY);
+    else {
+        if (![NSString isEmptyString:UserDefault(PHONEKEY)]) {
+            _bodyView.phoneField.text = UserDefault(PHONEKEY);
+        }
+        if (![NSString isEmptyString:UserDefault(PASSWORDKEY)]) {
+            _bodyView.passwordField.text = UserDefault(PASSWORDKEY);
+        }
     }
     }
     [self.scrollView addSubview:_bodyView];
     [self.scrollView addSubview:_bodyView];
     [_bodyView mas_makeConstraints:^(MASConstraintMaker *make) {
     [_bodyView mas_makeConstraints:^(MASConstraintMaker *make) {

+ 8 - 0
KulexiuForStudent/KulexiuForStudent/Module/Login/Guide/View/GuideListView.m

@@ -8,6 +8,7 @@
 #import "GuideListView.h"
 #import "GuideListView.h"
 
 
 @interface GuideListView ()
 @interface GuideListView ()
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imageTopConstraint;
 
 
 @property (weak, nonatomic) IBOutlet UIView *colorView;
 @property (weak, nonatomic) IBOutlet UIView *colorView;
 
 
@@ -42,6 +43,13 @@
     gradientLayer.locations = @[@(0),@(1)];
     gradientLayer.locations = @[@(0),@(1)];
     gradientLayer.frame = CGRectMake(0, 0, KPortraitWidth, 360);
     gradientLayer.frame = CGRectMake(0, 0, KPortraitWidth, 360);
     [self.colorView.layer addSublayer:gradientLayer];
     [self.colorView.layer addSublayer:gradientLayer];
+    
+    if (IS_iPhoneX) {
+        self.imageTopConstraint.constant = 174.0f;
+    }
+    else {
+        self.imageTopConstraint.constant = 104.0f;
+    }
 }
 }
 
 
 - (void)configViewWithImageName:(NSString *)imageName topTitle:(NSString *)topTitle desc:(NSString *)descMsg showButton:(BOOL)showButton {
 - (void)configViewWithImageName:(NSString *)imageName topTitle:(NSString *)topTitle desc:(NSString *)descMsg showButton:(BOOL)showButton {

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Login/Guide/View/GuideListView.xib

@@ -87,6 +87,7 @@
                 <outlet property="descLabel" destination="40p-7F-M6I" id="wCM-U9-TPH"/>
                 <outlet property="descLabel" destination="40p-7F-M6I" id="wCM-U9-TPH"/>
                 <outlet property="enterButton" destination="ykp-ax-0bg" id="zla-N1-sVW"/>
                 <outlet property="enterButton" destination="ykp-ax-0bg" id="zla-N1-sVW"/>
                 <outlet property="headTitle" destination="5BZ-aV-ZqC" id="83k-rz-XwT"/>
                 <outlet property="headTitle" destination="5BZ-aV-ZqC" id="83k-rz-XwT"/>
+                <outlet property="imageTopConstraint" destination="Op6-Wp-jtd" id="xld-jX-pGe"/>
                 <outlet property="imageView" destination="yUN-KZ-L1M" id="Mpv-wD-FBe"/>
                 <outlet property="imageView" destination="yUN-KZ-L1M" id="Mpv-wD-FBe"/>
             </connections>
             </connections>
             <point key="canvasLocation" x="131.8840579710145" y="79.6875"/>
             <point key="canvasLocation" x="131.8840579710145" y="79.6875"/>

+ 4 - 0
KulexiuForStudent/KulexiuForStudent/Module/Login/Model/UserInfoManager.h

@@ -25,6 +25,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 
 + (instancetype)shareInstance;
 + (instancetype)shareInstance;
 
 
+- (void)requsetconfigCallback:(void(^)(BOOL success))callback;
+
 // 获取信息回调
 // 获取信息回调
 - (void)queryUserInfoCallback:(UserInfoCallback)callback;
 - (void)queryUserInfoCallback:(UserInfoCallback)callback;
 
 
@@ -36,6 +38,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 
 - (void)connectionIMCallback:(ConnectIMCallback)callback;
 - (void)connectionIMCallback:(ConnectIMCallback)callback;
 
 
+- (NSString *)getCurrentVersion;
+
 @end
 @end
 
 
 NS_ASSUME_NONNULL_END
 NS_ASSUME_NONNULL_END

+ 54 - 0
KulexiuForStudent/KulexiuForStudent/Module/Login/Model/UserInfoManager.m

@@ -276,6 +276,60 @@
     }];
     }];
 }
 }
 
 
+- (NSString *)getCurrentVersion {
+    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
+}
+
+- (void)requsetconfigCallback:(void(^)(BOOL success))callback {
+    [KSNetworkingManager appVersionInfoRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            NSString *serviceVersion = [[dic dictionaryValueForKey:@"data"] stringValueForKey:@"version"];
+            NSString *currentVersion = [self getCurrentVersion];
+            if ([self isLowerVersionCompareLocalVersion:currentVersion serviceVersion:serviceVersion]) {
+                callback(YES);
+            }
+            else {
+                callback(NO);
+            }
+        }
+        else {
+            callback(NO);
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        callback(NO);
+    }];
+}
+
+
+- (BOOL)isLowerVersionCompareLocalVersion:(NSString *)localVersion serviceVersion:(NSString *)version {
+    localVersion = [localVersion stringByReplacingOccurrencesOfString:@"." withString:@""];
+    if (localVersion.length == 3) {
+        localVersion  = [localVersion stringByAppendingString:@"0"];
+    }
+    else if (localVersion.length==2) {
+        localVersion  = [localVersion stringByAppendingString:@"00"];
+    }else if (localVersion.length==1){
+        localVersion  = [localVersion stringByAppendingString:@"000"];
+    }
+    
+    version = [version stringByReplacingOccurrencesOfString:@"." withString:@""];
+    if (version.length == 3) {
+        version  = [version stringByAppendingString:@"0"];
+    }
+    else if (version.length==2) {
+        version  = [version stringByAppendingString:@"00"];
+    }else if (version.length==1){
+        version  = [version stringByAppendingString:@"000"];
+    }
+    if (([localVersion floatValue] > [version floatValue])) {
+        return NO;
+    }
+    else {
+        return YES;
+    }
+}
+
+
 - (void)dealloc {
 - (void)dealloc {
     [[NSNotificationCenter defaultCenter] removeObserver:self];
     [[NSNotificationCenter defaultCenter] removeObserver:self];
 }
 }

+ 16 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Controller/MineViewController.m

@@ -22,6 +22,7 @@
 #import "KSPremissionAlert.h"
 #import "KSPremissionAlert.h"
 #import "RecordCheckManager.h"
 #import "RecordCheckManager.h"
 #import "FeedbackViewController.h"
 #import "FeedbackViewController.h"
+#import "UserInfoManager.h"
 
 
 @interface MineViewController ()
 @interface MineViewController ()
 
 
@@ -98,6 +99,7 @@
     [super viewWillAppear:animated];
     [super viewWillAppear:animated];
     if ([self checkIsLoginToLoginView:YES]) {
     if ([self checkIsLoginToLoginView:YES]) {
         [self requsetUserMessage];
         [self requsetUserMessage];
+        [self requestUserMemo];
     }
     }
 }
 }
 
 
@@ -119,6 +121,20 @@
     }];
     }];
 }
 }
 
 
+- (void)requestUserMemo {
+    [[UserInfoManager shareInstance] requsetconfigCallback:^(BOOL success) {
+        [self refreshBodyView:success];
+    }];
+}
+
+- (void)refreshBodyView:(BOOL)isMember {
+    self.bodyView.isMember = isMember;
+    CGFloat contentMinHeight = [_bodyView getViewHeight];
+    [self.bodyView mas_updateConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(contentMinHeight);
+    }];
+}
+
 - (void)refreshView {
 - (void)refreshView {
     [self.bodyView configWithSource:self.mineInfo];
     [self.bodyView configWithSource:self.mineInfo];
 }
 }

+ 16 - 3
KulexiuForStudent/KulexiuForStudent/Module/Mine/Homework/Controller/HomeworkDetailViewController.m

@@ -127,7 +127,18 @@
         AccompanyCourseInfoCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AccompanyCourseInfoCell"];
         AccompanyCourseInfoCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AccompanyCourseInfoCell"];
         cell.statusLabel.text = @"已结束";
         cell.statusLabel.text = @"已结束";
         cell.statusLabel.textColor = HexRGB(0x999999);
         cell.statusLabel.textColor = HexRGB(0x999999);
-        [cell configWithStartTime:self.detailModel.startTime endTime:self.detailModel.endTime teacherAvatar:self.detailModel.teacherAvatar teacherName:self.detailModel.teacherName teacherId:self.detailModel.teacherId courseSubject:self.detailModel.subjectName];
+        BOOL isMusicRoom = [self.detailModel.courseType isEqualToString:@"PIANO_ROOM_CLASS"] ? YES : NO;
+        NSString *name = @"";
+        NSString *avatar = @"";
+        if (isMusicRoom) {
+            name = [NSString stringWithFormat:@"%@第%@课",self.detailModel.courseGroupName,self.detailModel.classNum];
+            avatar = @"";
+        }
+        else {
+            name = self.detailModel.teacherName;
+            avatar = self.detailModel.teacherAvatar;
+        }
+        [cell configWithStartTime:self.detailModel.startTime endTime:self.detailModel.endTime teacherAvatar:avatar teacherName:name teacherId:self.detailModel.teacherId courseSubject:self.detailModel.subjectName isMusicRoom:isMusicRoom];
         cell.hideChatButton = YES;
         cell.hideChatButton = YES;
         return cell;
         return cell;
     }
     }
@@ -140,13 +151,15 @@
     else if (indexPath.row == 2) { // 作业视频
     else if (indexPath.row == 2) { // 作业视频
         // studentAttachments
         // studentAttachments
         BOOL hasArrangeHomework = self.detailModel.decorateHomework == 1 ? YES : NO;
         BOOL hasArrangeHomework = self.detailModel.decorateHomework == 1 ? YES : NO;
+        BOOL isExpired = self.detailModel.homeworkExpire == 1 ? YES : NO;
+        
         AccompanyHomeworkCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AccompanyHomeworkCell"];
         AccompanyHomeworkCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AccompanyHomeworkCell"];
         cell.canSubmit = self.canModify;
         cell.canSubmit = self.canModify;
+        
         MJWeakSelf;
         MJWeakSelf;
-        [cell configWithAttachmentArray:self.fileArray canDisplaySubmitView:hasArrangeHomework callback:^(HOMEWORKACTION action, NSInteger viewIndex) {
+        [cell configWithAttachmentArray:self.fileArray canDisplaySubmitView:hasArrangeHomework isExpired:isExpired callback:^(HOMEWORKACTION action, NSInteger viewIndex) {
             [weakSelf operationActionWithType:action index:viewIndex];
             [weakSelf operationActionWithType:action index:viewIndex];
         }];
         }];
-        
         return cell;
         return cell;
     }
     }
     else { // 老师点评
     else { // 老师点评

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Homework/Model/HomeworkDetailModel.h

@@ -42,6 +42,7 @@
 @property (nonatomic, strong) NSString *classNum; // 第几节课
 @property (nonatomic, strong) NSString *classNum; // 第几节课
 @property (nonatomic, strong) NSString *imGroupId;
 @property (nonatomic, strong) NSString *imGroupId;
 @property (nonatomic, strong) NSString *studentNum;
 @property (nonatomic, strong) NSString *studentNum;
+@property (nonatomic, assign) NSInteger homeworkExpire;
 
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;

+ 7 - 4
KulexiuForStudent/KulexiuForStudent/Module/Mine/Homework/Model/HomeworkDetailModel.m

@@ -39,6 +39,7 @@ NSString *const kHomeworkDetailModelCourseGroupName= @"courseGroupName";
 NSString *const kHomeworkDetailModelClassNum = @"classNum";
 NSString *const kHomeworkDetailModelClassNum = @"classNum";
 NSString *const kHomeworkDetailModelImGroupId = @"imGroupId";
 NSString *const kHomeworkDetailModelImGroupId = @"imGroupId";
 NSString *const kHomeworkDetailModelStudentNum = @"studentNum";
 NSString *const kHomeworkDetailModelStudentNum = @"studentNum";
+NSString *const kHomeworkDetailModelHomeworkExpire = @"homeworkExpire";
 
 
 @interface HomeworkDetailModel ()
 @interface HomeworkDetailModel ()
 
 
@@ -78,6 +79,7 @@ NSString *const kHomeworkDetailModelStudentNum = @"studentNum";
 @synthesize classNum = _classNum;
 @synthesize classNum = _classNum;
 @synthesize imGroupId = _imGroupId;
 @synthesize imGroupId = _imGroupId;
 @synthesize studentNum = _studentNum;
 @synthesize studentNum = _studentNum;
+@synthesize homeworkExpire = _homeworkExpire;
 
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 {
 {
@@ -121,6 +123,7 @@ NSString *const kHomeworkDetailModelStudentNum = @"studentNum";
         self.classNum = [self objectOrNilForKey:kHomeworkDetailModelClassNum fromDictionary:dict];
         self.classNum = [self objectOrNilForKey:kHomeworkDetailModelClassNum fromDictionary:dict];
         self.imGroupId = [self objectOrNilForKey:kHomeworkDetailModelImGroupId fromDictionary:dict];
         self.imGroupId = [self objectOrNilForKey:kHomeworkDetailModelImGroupId fromDictionary:dict];
         self.studentNum = [self objectOrNilForKey:kHomeworkDetailModelStudentNum fromDictionary:dict];
         self.studentNum = [self objectOrNilForKey:kHomeworkDetailModelStudentNum fromDictionary:dict];
+        self.homeworkExpire = [[self objectOrNilForKey:kHomeworkDetailModelHomeworkExpire fromDictionary:dict] integerValue];
     }
     }
     
     
     return self;
     return self;
@@ -160,6 +163,7 @@ NSString *const kHomeworkDetailModelStudentNum = @"studentNum";
     [mutableDict setValue:self.classNum forKey:kHomeworkDetailModelClassNum];
     [mutableDict setValue:self.classNum forKey:kHomeworkDetailModelClassNum];
     [mutableDict setValue:self.imGroupId forKey:kHomeworkDetailModelImGroupId];
     [mutableDict setValue:self.imGroupId forKey:kHomeworkDetailModelImGroupId];
     [mutableDict setValue:self.studentNum forKey:kHomeworkDetailModelStudentNum];
     [mutableDict setValue:self.studentNum forKey:kHomeworkDetailModelStudentNum];
+    [mutableDict setValue:[NSNumber numberWithInteger:self.homeworkExpire] forKey:kHomeworkDetailModelHomeworkExpire];
     return [NSDictionary dictionaryWithDictionary:mutableDict];
     return [NSDictionary dictionaryWithDictionary:mutableDict];
 }
 }
 
 
@@ -216,6 +220,7 @@ NSString *const kHomeworkDetailModelStudentNum = @"studentNum";
     self.classNum = [aDecoder decodeObjectForKey:kHomeworkDetailModelClassNum];
     self.classNum = [aDecoder decodeObjectForKey:kHomeworkDetailModelClassNum];
     self.imGroupId = [aDecoder decodeObjectForKey:kHomeworkDetailModelImGroupId];
     self.imGroupId = [aDecoder decodeObjectForKey:kHomeworkDetailModelImGroupId];
     self.studentNum = [aDecoder decodeObjectForKey:kHomeworkDetailModelStudentNum];
     self.studentNum = [aDecoder decodeObjectForKey:kHomeworkDetailModelStudentNum];
+    self.homeworkExpire = [aDecoder decodeIntegerForKey:kHomeworkDetailModelHomeworkExpire];
     return self;
     return self;
 }
 }
 
 
@@ -252,6 +257,7 @@ NSString *const kHomeworkDetailModelStudentNum = @"studentNum";
     [aCoder encodeObject:_classNum forKey:kHomeworkDetailModelClassNum];
     [aCoder encodeObject:_classNum forKey:kHomeworkDetailModelClassNum];
     [aCoder encodeObject:_imGroupId forKey:kHomeworkDetailModelImGroupId];
     [aCoder encodeObject:_imGroupId forKey:kHomeworkDetailModelImGroupId];
     [aCoder encodeObject:_studentNum forKey:kHomeworkDetailModelStudentNum];
     [aCoder encodeObject:_studentNum forKey:kHomeworkDetailModelStudentNum];
+    [aCoder encodeInteger:_homeworkExpire forKey:kHomeworkDetailModelHomeworkExpire];
 }
 }
 
 
 - (id)copyWithZone:(NSZone *)zone
 - (id)copyWithZone:(NSZone *)zone
@@ -286,10 +292,7 @@ NSString *const kHomeworkDetailModelStudentNum = @"studentNum";
         copy.reviewHomework = self.reviewHomework;
         copy.reviewHomework = self.reviewHomework;
         copy.studentId = [self.studentId copyWithZone:zone];
         copy.studentId = [self.studentId copyWithZone:zone];
         copy.teacherId = [self.teacherId copyWithZone:zone];
         copy.teacherId = [self.teacherId copyWithZone:zone];
-        copy.teacherId = [self.teacherId copyWithZone:zone];
-        copy.teacherId = [self.teacherId copyWithZone:zone];
-        copy.teacherId = [self.teacherId copyWithZone:zone];
-        copy.teacherId = [self.teacherId copyWithZone:zone];
+        copy.homeworkExpire = self.homeworkExpire;
     }
     }
     
     
     return copy;
     return copy;

+ 10 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/Controller/MyCourseViewController.h

@@ -9,6 +9,14 @@
 #import "JXCategoryView.h"
 #import "JXCategoryView.h"
 #import "JXPagerView.h"
 #import "JXPagerView.h"
 
 
+
+typedef NS_ENUM(NSInteger, DISPLAY_INDEX) {
+    DISPLAY_INDEX_FIRST = 0,  // 陪练课
+    DISPLAY_INDEX_LIVE,       // 直播课
+    DISPLAY_INDEX_VIEO,       // 视频课
+    DISPLAY_INDEX_MUSIC,      // 琴房课
+};
+
 NS_ASSUME_NONNULL_BEGIN
 NS_ASSUME_NONNULL_BEGIN
 
 
 @interface MyCourseViewController : KSBaseViewController
 @interface MyCourseViewController : KSBaseViewController
@@ -17,6 +25,8 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, strong, readonly) JXCategoryTitleView *categoryView;
 @property (nonatomic, strong, readonly) JXCategoryTitleView *categoryView;
 @property (nonatomic, strong) NSArray <NSString *> *titles;
 @property (nonatomic, strong) NSArray <NSString *> *titles;
 
 
+- (void)displayWithIndex:(DISPLAY_INDEX)displayIndex;
+
 @end
 @end
 
 
 NS_ASSUME_NONNULL_END
 NS_ASSUME_NONNULL_END

+ 8 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/Controller/MyCourseViewController.m

@@ -21,6 +21,7 @@
 
 
 @property (nonatomic, strong) NSMutableArray *subjectList;
 @property (nonatomic, strong) NSMutableArray *subjectList;
 
 
+@property (nonatomic, assign) DISPLAY_INDEX displayIndex;
 
 
 @end
 @end
 
 
@@ -63,6 +64,13 @@
     self.categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagerView.listContainerView;
     self.categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagerView.listContainerView;
     self.pagerView.listContainerView.listCellBackgroundColor = [UIColor clearColor];
     self.pagerView.listContainerView.listCellBackgroundColor = [UIColor clearColor];
     [self.view addSubview:self.pagerView];
     [self.view addSubview:self.pagerView];
+    if (self.displayIndex != 0) {
+        [self.categoryView setDefaultSelectedIndex:self.displayIndex];
+    }
+}
+
+- (void)displayWithIndex:(DISPLAY_INDEX)displayIndex {
+    self.displayIndex = displayIndex;
 }
 }
 
 
 - (void)viewWillAppear:(BOOL)animated {
 - (void)viewWillAppear:(BOOL)animated {

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/ModifyViewController.m

@@ -127,7 +127,7 @@
 
 
 // 发送短信
 // 发送短信
 - (void)sendSMSRequestWithParm:(NSDictionary *)parm {
 - (void)sendSMSRequestWithParm:(NSDictionary *)parm {
-    [KSNetworkingManager sendSmsRequest:KS_POST mobile:[parm stringValueForKey:@"phone"] type:@"PHONE" success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager sendSmsRequest:KS_POST mobile:[parm stringValueForKey:@"phone"] type:@"PASSWD" success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
         [self removehub];
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             [self MBPShow:@"验证码已发送"];
             [self MBPShow:@"验证码已发送"];

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.h

@@ -32,6 +32,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 
 @interface MineBodyView : UIView
 @interface MineBodyView : UIView
 
 
+@property (nonatomic, assign) BOOL isMember;
+
 + (instancetype)shareInstance;
 + (instancetype)shareInstance;
 
 
 - (void)configWithSource:(StudentInfoModel *)sourceModel;
 - (void)configWithSource:(StudentInfoModel *)sourceModel;

+ 22 - 3
KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.m

@@ -13,8 +13,6 @@
 
 
 @property (weak, nonatomic) IBOutlet UILabel *subjectLabel;
 @property (weak, nonatomic) IBOutlet UILabel *subjectLabel;
 
 
-@property (nonatomic, assign) BOOL isMember;
-
 @property (weak, nonatomic) IBOutlet UIView *memberView;
 @property (weak, nonatomic) IBOutlet UIView *memberView;
 
 
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *memberViewHeight;
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *memberViewHeight;
@@ -43,6 +41,11 @@
 
 
 @implementation MineBodyView
 @implementation MineBodyView
 
 
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    self.isMember = NO;
+}
+
 + (instancetype)shareInstance {
 + (instancetype)shareInstance {
     MineBodyView *view = [[[NSBundle mainBundle] loadNibNamed:@"MineBodyView" owner:nil options:nil] firstObject];
     MineBodyView *view = [[[NSBundle mainBundle] loadNibNamed:@"MineBodyView" owner:nil options:nil] firstObject];
     return view;
     return view;
@@ -112,7 +115,7 @@
 }
 }
 
 
 - (CGFloat)getViewHeight {
 - (CGFloat)getViewHeight {
-    return 80 + 15 + (self.memberViewHeight.constant) / 2 + 10 + 100 + 12 + 93 + 15 + 320;
+    return 80 + 15 + (self.memberViewHeight.constant) / 2 + 10 + 100 + 12 + 93 + 15 + 270 + self.dealViewHeight.constant;
 }
 }
 
 
 - (IBAction)modifyUser:(id)sender {
 - (IBAction)modifyUser:(id)sender {
@@ -121,6 +124,22 @@
     }
     }
 }
 }
 
 
+- (void)setIsMember:(BOOL)isMember {
+    _isMember = isMember;
+    if (_isMember) {
+        self.memberViewHeight.constant = 82.0f;
+        self.memberView.hidden = NO;
+        self.dealView.hidden = NO;
+        self.dealViewHeight.constant = 50.0f;
+    }
+    else {
+        self.memberViewHeight.constant = 0.0f;
+        self.memberView.hidden = YES;
+        self.dealView.hidden = YES;
+        self.dealViewHeight.constant = 0.0f;
+    }
+}
+
 /*
 /*
 // Only override drawRect: if you perform custom drawing.
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.
 // An empty implementation adversely affects performance during animation.

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.xib

@@ -123,7 +123,7 @@
                                         <constraint firstAttribute="width" constant="33" id="c5O-Gw-j6Q"/>
                                         <constraint firstAttribute="width" constant="33" id="c5O-Gw-j6Q"/>
                                     </constraints>
                                     </constraints>
                                 </imageView>
                                 </imageView>
-                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="评测记录" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="REa-UV-dzx">
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="训练统计" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="REa-UV-dzx">
                                     <rect key="frame" x="26.5" y="62" width="45" height="16"/>
                                     <rect key="frame" x="26.5" y="62" width="45" height="16"/>
                                     <constraints>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="16" id="4uC-By-dPi"/>
                                         <constraint firstAttribute="height" constant="16" id="4uC-By-dPi"/>