瀏覽代碼

修改解析dict方法

Steven 2 年之前
父節點
當前提交
30ab9c7fe7
共有 100 個文件被更改,包括 731 次插入726 次删除
  1. 23 23
      KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m
  2. 73 73
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSAccompanyWebViewController.m
  3. 87 87
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m
  4. 5 4
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m
  5. 6 6
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSOrderManager.m
  6. 16 16
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSRCIMDataSource.m
  7. 14 14
      KulexiuForTeacher/KulexiuForTeacher/Common/Define/PrefixHeader.pch
  8. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Define/UserKeyHeader.h
  9. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/NSString+MD5.m
  10. 16 16
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSDictionary+Extension.h
  11. 22 20
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSDictionary+Extension.m
  12. 8 8
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/KSUploadManager.m
  13. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/CreateFansGroupViewController.m
  14. 14 14
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatConversationViewController.m
  15. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatListViewController.m
  16. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatUserDetailViewController.m
  17. 3 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupApplyViewController.m
  18. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupMemberViewController.m
  19. 7 7
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupSettingViewController.m
  20. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/KSChatComplainController.m
  21. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/GroupNotice/Controller/GroupNoticeEditController.m
  22. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/GroupNotice/Controller/GroupNoticeViewController.m
  23. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/KSChatLiveMessage.m
  24. 7 7
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/KSChatMusicMessage.m
  25. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/Controller/ShareMusicViewController.m
  26. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ChatAddressBodyView.m
  27. 7 7
      KulexiuForTeacher/KulexiuForTeacher/Module/Classroom/ClassroomSong/MusicScoreViewController.m
  28. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Classroom/View/CoursewarePlayView/CourseWarePreviewView.m
  29. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Classroom/View/CoursewareView/CoursewareAlertView.m
  30. 11 11
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m
  31. 18 18
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/Controller/CourseViewController.m
  32. 7 7
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Controller/MusicRoomViewController.m
  33. 31 31
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m
  34. 3 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/EvaluateCourse/Controller/EvaluateDetailViewController.m
  35. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/EvaluateCourse/View/EvaluateCourseBodyView.m
  36. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/HomeworkDetailViewController.m
  37. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/MusicRoomHomeworkStudentController.m
  38. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/View/HomeworkBodyView.m
  39. 6 6
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/FreezeListViewController.m
  40. 18 18
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/IncomeCountViewController.m
  41. 8 8
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/MyIncomeViewController.m
  42. 6 6
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/NoRecordViewController.m
  43. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/Controller/CashRecordViewController.m
  44. 5 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/Controller/WithdrawViewController.m
  45. 10 10
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/Controller/MyMusicViewController.m
  46. 3 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicBodyView.m
  47. 6 6
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Controller/MyCourseViewController.m
  48. 7 7
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyLessonBodyView.m
  49. 5 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyMusicRoomBodyView.m
  50. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyVideoCourseBodyView.m
  51. 16 16
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m
  52. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/Controller/ReceiveEvaluateListController.m
  53. 7 7
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeBodyView.m
  54. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/CreateLiveViewController.m
  55. 17 17
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m
  56. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomDownSeat.m
  57. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomEnter.m
  58. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomKickOut.m
  59. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomLeave.m
  60. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomLike.m
  61. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomMemberCount.m
  62. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomMemberUp.m
  63. 7 7
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomSeatApply.m
  64. 5 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomSeatResponse.m
  65. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomUserQuit.m
  66. 5 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomWelcome.m
  67. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSRCShopRushMessage.m
  68. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/RCChatroomLikeCount.m
  69. 3 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/RCChatroomSeatsControl.m
  70. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Model/KSEnterLiveroomManager.h
  71. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Model/KSEnterLiveroomManager.m
  72. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/SeatContentView.m
  73. 6 6
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/SeatListView/LiveMemberSeatCell.m
  74. 3 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Controller/FirstSettingViewController.m
  75. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Controller/LoginViewController.m
  76. 10 10
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Controller/PasswordLoginController.m
  77. 9 9
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Controller/VefiCodeLoginController.m
  78. 7 7
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Model/UserInfoManager.m
  79. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/MidiPlayer/ShareInChat/Controller/KSShareGroupViewController.m
  80. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/MidiPlayer/ShareInChat/View/ShareChooseMainView.m
  81. 16 16
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/AddressList/Controller/AddressDetailViewController.m
  82. 5 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/AddressList/Controller/AddressListViewController.m
  83. 15 15
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/AddressList/View/KSAddressPickerView.m
  84. 3 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/BankCard/Controller/BandCardViewController.m
  85. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/BankCard/Controller/MyBankCardViewController.m
  86. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/BankCard/Controller/UnbindCardViewController.m
  87. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Controller/MineViewController.m
  88. 3 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Courseware/ViewModel/CoursewareViewModel.m
  89. 6 6
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/Controller/InstrumentChooseViewController.m
  90. 10 10
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/Controller/MyStyleViewController.m
  91. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/View/instrument/MyStyleInstrumentCell.m
  92. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/LiveCourse/Controller/MyLiveCourseViewController.m
  93. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/LiveCourse/View/MyLiveCourseBodyView.m
  94. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/LiveList/View/LiveListBodyView.m
  95. 6 6
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/Controller/MinePageViewController.m
  96. 8 8
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageCourseView.m
  97. 6 6
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageMienBodyView.m
  98. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageVideoView.m
  99. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/FeedbackViewController.m
  100. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/ModifyNameViewController.m

+ 23 - 23
KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m

@@ -239,14 +239,14 @@
             if (isUpdate) {
                 
                 [KSNetworkingManager appVersionInfoRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
-                    if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+                    if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
 
-                        NSString *serviceVersion = [[dic dictionaryValueForKey:@"data"] stringValueForKey:@"version"];
+                        NSString *serviceVersion = [[dic ks_dictionaryValueForKey:@"data"] ks_stringValueForKey:@"version"];
                         if ([serviceVersion isEqualToString:storeVersion] || [self isLowerVersionCompareLocalVersion:currentVersion serviceVersion:serviceVersion]) {
                             // desc
-                            NSString *descMessage = [[dic dictionaryValueForKey:@"data"] stringValueForKey:@"description"];
+                            NSString *descMessage = [[dic ks_dictionaryValueForKey:@"data"] ks_stringValueForKey:@"description"];
                             // 判断
-                            if ([[dic dictionaryValueForKey:@"data"] boolValueForKey:@"isForceUpdate"]) {
+                            if ([[dic ks_dictionaryValueForKey:@"data"] ks_boolValueForKey:@"isForceUpdate"]) {
                                 self.isNeedUpdate = YES;
                                 [self showAlertWithMemo:storeVersion descMessage:descMessage isforce:YES openUrl:openUrl];
                             }
@@ -600,8 +600,8 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
 
 #pragma mark 根据不同消息跳转不同界面
 - (void)getVCUserInfoDict:(NSMutableDictionary *)infoDict {
-    if (![NSString isEmptyString:[infoDict stringValueForKey:@"memo"]]) {
-        NSData *jsonData = [[infoDict stringValueForKey:@"memo"] mj_JSONData];
+    if (![NSString isEmptyString:[infoDict ks_stringValueForKey:@"memo"]]) {
+        NSData *jsonData = [[infoDict ks_stringValueForKey:@"memo"] mj_JSONData];
         NSError *error;
         NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&error];
         if (!error) {
@@ -611,9 +611,9 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
                 self.outLinkParm = [NSMutableDictionary dictionaryWithDictionary:dict];
                 return;
             }
-            NSString *action = [dict stringValueForKey:@"action"];
+            NSString *action = [dict ks_stringValueForKey:@"action"];
             if ([action isEqualToString:@"app"]) { // 跳原生
-                NSString *pageType = [dict stringValueForKey:@"pageTag"];
+                NSString *pageType = [dict ks_stringValueForKey:@"pageTag"];
                 if ([pageType isEqualToString:@"buyPractice"] || [pageType isEqualToString:@"courseRemind"]) {
                     [self.tabBarController tabBarSelectedWithIndex:1];
                     CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
@@ -626,13 +626,13 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
                     [navCtrl pushViewController:ctrl animated:YES];
                 }
                 else if ([pageType isEqualToString:@"homework"]) {
-                    NSString *parmString = [dict stringValueForKey:@"params"];
+                    NSString *parmString = [dict ks_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"];
-                        detailVC.studentId = [parm stringValueForKey:@"studentId"];
+                        detailVC.courseId = [parm ks_stringValueForKey:@"courseId"];
+                        detailVC.studentId = [parm ks_stringValueForKey:@"studentId"];
                         CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
                         [navCtrl pushViewController:detailVC animated:YES];
                     }
@@ -690,7 +690,7 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
                 }
             }
             else {
-                NSString *webUrl = [dict stringValueForKey:@"url"];
+                NSString *webUrl = [dict ks_stringValueForKey:@"url"];
                 if (![NSString isEmptyString:webUrl]) {
                     KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
                     webCtrl.url = webUrl;
@@ -773,8 +773,8 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
 
 - (void)requestRongCloudToken {
     [KSNetworkingManager refreshImTokenRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSString *newToken = [dic stringValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSString *newToken = [dic ks_stringValueForKey:@"data"];
             if (![NSString isEmptyString:newToken]) {
                 UserDefaultSet(newToken, RongTokenKey);
                 [[NSUserDefaults standardUserDefaults] synchronize];
@@ -865,9 +865,9 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
                     self.outLinkParm = [NSMutableDictionary dictionaryWithDictionary:dict];
                     return NO;
                 }
-                NSString *action = [dict stringValueForKey:@"action"];
+                NSString *action = [dict ks_stringValueForKey:@"action"];
                 if ([action isEqualToString:@"app"]) {
-                    NSString *pageType = [dict stringValueForKey:@"pageTag"];
+                    NSString *pageType = [dict ks_stringValueForKey:@"pageTag"];
                     DISPLAY_INDEX index = DISPLAY_INDEX_FIRST;
                     if ([pageType isEqualToString:@"practiceClass"]) { // 我的课程 ->陪练课
                         index = DISPLAY_INDEX_FIRST;
@@ -884,7 +884,7 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
                     [navCtrl pushViewController:ctrl animated:YES];
                 }
                 else {  // 空 或者 h5
-                    NSString *webUrl = [dict stringValueForKey:@"url"];
+                    NSString *webUrl = [dict ks_stringValueForKey:@"url"];
                     if (![NSString isEmptyString:webUrl]) {
                         KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
                         webCtrl.url = webUrl;
@@ -937,9 +937,9 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
 - (void)handleNotiferSource {
     if (self.outLinkParm) {
         NSDictionary *dict = [NSDictionary dictionaryWithDictionary:self.outLinkParm];
-        NSString *action = [dict stringValueForKey:@"action"];
+        NSString *action = [dict ks_stringValueForKey:@"action"];
         if ([action isEqualToString:@"app"]) { // 跳原生
-            NSString *pageType = [dict stringValueForKey:@"pageTag"];
+            NSString *pageType = [dict ks_stringValueForKey:@"pageTag"];
             if ([pageType isEqualToString:@"practiceClass"]) { // 我的课程 ->陪练课
                 DISPLAY_INDEX index = DISPLAY_INDEX_FIRST;
                 MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
@@ -973,14 +973,14 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
                 [navCtrl pushViewController:ctrl animated:YES];
             }
             else if ([pageType isEqualToString:@"homework"]) {
-                NSString *parmString = [dict stringValueForKey:@"params"];
+                NSString *parmString = [dict ks_stringValueForKey:@"params"];
                 NSData *parmData = [parmString mj_JSONData];
                 NSError *error;
                 NSDictionary *parm = [NSJSONSerialization JSONObjectWithData:parmData options:NSJSONReadingMutableContainers error:&error];
                 if (!error) {
                     HomeworkDetailViewController *detailVC = [[HomeworkDetailViewController alloc] init];
-                    detailVC.courseId = [parm stringValueForKey:@"courseId"];
-                    detailVC.studentId = [parm stringValueForKey:@"studentId"];
+                    detailVC.courseId = [parm ks_stringValueForKey:@"courseId"];
+                    detailVC.studentId = [parm ks_stringValueForKey:@"studentId"];
                     CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
                     [navCtrl pushViewController:detailVC animated:YES];
                 }
@@ -1038,7 +1038,7 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
             }
         }
         else {
-            NSString *webUrl = [dict stringValueForKey:@"url"];
+            NSString *webUrl = [dict ks_stringValueForKey:@"url"];
             if (![NSString isEmptyString:webUrl]) {
                 KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
                 webCtrl.url = webUrl;

+ 73 - 73
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSAccompanyWebViewController.m

@@ -152,7 +152,7 @@
                 else if (weakSelf.evaluatParm) {
                     NSMutableDictionary *sendParm = [NSMutableDictionary dictionaryWithDictionary:weakSelf.evaluatParm];
                     NSLog(@"%@",sendParm);
-                    NSDictionary *valueDic = [weakSelf.evaluatParm dictionaryValueForKey:@"content"];
+                    NSDictionary *valueDic = [weakSelf.evaluatParm ks_dictionaryValueForKey:@"content"];
                     [valueDic setValue:@"服务异常,请重试" forKey:@"reson"];
                     NSLog(@"%@",valueDic);
                     [sendParm setValue:valueDic forKey:@"content"];
@@ -176,7 +176,7 @@
             else {
                 NSLog(@"-----连接成功");
                 if (weakSelf.hasSendStartMessage == NO && weakSelf.evaluatParm) {
-                    NSDictionary *content = [weakSelf.evaluatParm dictionaryValueForKey:@"content"];
+                    NSDictionary *content = [weakSelf.evaluatParm ks_dictionaryValueForKey:@"content"];
                     NSString *sendData = [weakSelf configDataCommond:@"musicXml" body:content type:@"SOUND_COMPARE"];
                     [weakSelf sendDataToSocketService:sendData];
                     [weakSelf postMessage:weakSelf.evaluatParm];
@@ -328,7 +328,7 @@
         NSDictionary *parm = [self convertJsonStringToNSDictionary:message.body];
         // 回到主线程
         dispatch_async(dispatch_get_main_queue(), ^{
-             if ([[parm stringValueForKey:@"api"] isEqualToString:@"startEvaluating"]) { // 开始评测
+             if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"startEvaluating"]) { // 开始评测
                   [self configRecordManager];
                   self.hasSendStartMessage = NO;
                   PREMISSIONTYPE isOk = [RecordCheckManager checkPermissionShowAlert:NO showInView:nil];
@@ -336,7 +336,7 @@
                        self.evaluatParm = [NSMutableDictionary dictionaryWithDictionary:parm];
                        // 如果socket 连上了
                        if (self.socketManager.socketReadyState == SR_OPEN) {
-                            NSDictionary *content = [parm dictionaryValueForKey:@"content"];
+                            NSDictionary *content = [parm ks_dictionaryValueForKey:@"content"];
                             NSString *sendData = [self configDataCommond:@"musicXml" body:content type:@"SOUND_COMPARE"];
                             [self sendDataToSocketService:sendData];
                             [self postMessage:parm];
@@ -353,51 +353,51 @@
                        [self postMessage:postParm];
                   }
              }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"endEvaluating"]) {// 停止评测
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"endEvaluating"]) {// 停止评测
                  self.evaluatParm = nil;
                  [self stopRecordService];
                  [self postMessage:parm];
                  [self sendEndMessage];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cancelEvaluating"]) { // 取消评测
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cancelEvaluating"]) { // 取消评测
                  self.evaluatParm = nil;
                  [self stopRecordService];
                  [self postMessage:parm];
                  [self sendEndMessage];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"startRecording"]) { //  开始录制
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"startRecording"]) { //  开始录制
 //                 self.recordParm = [NSMutableDictionary dictionaryWithDictionary:parm];
                  [self postMessage:parm];
                  self.isCompareStart = YES;
                  [self startRecordService];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"endRecording"]) { // 停止录音
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"endRecording"]) { // 停止录音
                  self.recordParm = nil;
                  [self stopRecordService];
                  [self postMessage:parm];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"pauseRecording"]) {
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"pauseRecording"]) {
                 [self puaseRecordService];
                 [self postMessage:parm];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"resumeRecording"]) {
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"resumeRecording"]) {
                 [self resumeRecordService];
                 [self postMessage:parm];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"isWiredHeadsetOn"]) {
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"isWiredHeadsetOn"]) {
                 [self configAudioDeviceType:parm];
             }
             // 发送消息给socket service
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"proxyMessage"]) {
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"proxyMessage"]) {
                  [self sendMessageToSocket:parm];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"proxyServiceMessage"]) {
-                 NSDictionary *content = [parm dictionaryValueForKey:@"content"];
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"proxyServiceMessage"]) {
+                 NSDictionary *content = [parm ks_dictionaryValueForKey:@"content"];
                  NSString *sendData = [content mj_JSONString];
                  NSLog(@"proxyServiceMessage ------- %@",sendData);
                  [self sendDataToSocketService:sendData];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"openCamera"]) { // 开启摄像头
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"openCamera"]) { // 开启摄像头
                  PREMISSIONTYPE canOpenCamera = [RecordCheckManager checkCameraPremissionAvaiable:YES showInView:self.view];
                  if (canOpenCamera == PREMISSIONTYPE_YES) {
                       self.isCameraOpen = YES;
@@ -405,14 +405,14 @@
                       [self postMessage:parm];
                  }
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"closeCamera"]) { // 关闭摄像头
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"closeCamera"]) { // 关闭摄像头
                 self.isCameraOpen = NO;
                 if (self->_videoRecordManager) {
                     [self.videoRecordManager removeDisplay];
                 }
                 [self postMessage:parm];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"startCapture"]) { // 开始录制
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"startCapture"]) { // 开始录制
                 // 需要合成音频
                 [self.videoRecordManager setIgnoreAudio:YES];
                 [RecordCheckManager checkPhotoLibraryPremissionAvaiable:YES showInView:self.view];
@@ -420,7 +420,7 @@
                 [self.videoRecordManager startRecord];
                 [self postMessage:parm];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"endCapture"]) { // 结束录制
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"endCapture"]) { // 结束录制
                 if (self->_videoRecordManager) {
                     self.endRecordParm = parm;
                     [self.videoRecordManager stopRecord];
@@ -429,28 +429,28 @@
                     [self postMessage:parm];
                 }
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"setCaptureMode"]) {
-                NSString *modeString = [[parm dictionaryValueForKey:@"content"] stringValueForKey:@"mode"];
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"setCaptureMode"]) {
+                NSString *modeString = [[parm ks_dictionaryValueForKey:@"content"] ks_stringValueForKey:@"mode"];
                 BOOL isIgnoreAudio = [modeString isEqualToString:@"evaluating"];
                 [self postMessage:parm];
                 [self.videoRecordManager setIgnoreAudio:isIgnoreAudio];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"startSoundCheck"]) { // 开始校音
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"startSoundCheck"]) { // 开始校音
                 [self configRecordManager];
                 [self postMessage:parm];
                 self.isCompareStart = NO;
                 self.isSoundCheckStart = YES;
                 [self startRecordService];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"endSoundCheck"]) {
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"endSoundCheck"]) {
                 // 结束校音
                 self.isSoundCheckStart = NO;
                 [self stopRecordService];
                 [self postMessage:parm];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"videoUpdate"]) { // 上传
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"videoUpdate"]) { // 上传
                 NSMutableDictionary *sendParm = [NSMutableDictionary dictionaryWithDictionary:parm];
-                NSMutableDictionary *contentParm = [NSMutableDictionary dictionaryWithDictionary:[sendParm dictionaryValueForKey:@"content"]];
+                NSMutableDictionary *contentParm = [NSMutableDictionary dictionaryWithDictionary:[sendParm ks_dictionaryValueForKey:@"content"]];
                 if (self.videoRecordManager) {
                     MJWeakSelf;
                     [self.videoRecordManager uploadRecordVideoSuccess:^(NSString * _Nonnull videoUrl) {
@@ -469,7 +469,7 @@
                 }
             }
 #pragma mark -------- 云教练原生播放对接
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cloudDetail"]) { // 初始化方法
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cloudDetail"]) { // 初始化方法
                 /**
                  api: 'cloudDetail',
                      content: {
@@ -486,17 +486,17 @@
                 [self configAudioSession];
                 // 重置track num array
                 self.configEngineParm = [parm copy];
-                NSDictionary *content = [parm dictionaryValueForKey:@"content"];
-                NSString *midiUrl = [content stringValueForKey:@"midi"];
-                NSInteger denominator = [content integerValueForKey:@"denominator"];
-                NSInteger numerator = [content integerValueForKey:@"numerator"];
+                NSDictionary *content = [parm ks_dictionaryValueForKey:@"content"];
+                NSString *midiUrl = [content ks_stringValueForKey:@"midi"];
+                NSInteger denominator = [content ks_integerValueForKey:@"denominator"];
+                NSInteger numerator = [content ks_integerValueForKey:@"numerator"];
                 NSString *beatString = [NSString stringWithFormat:@"%zd/%zd", numerator,denominator];
                 self.beatType = [self getBeatTypeFromString:beatString];
                 
-                float originalSpeed = [content floatValueForKey:@"originalSpeed"];
+                float originalSpeed = [content ks_floatValueForKey:@"originalSpeed"];
                 self.songOriginalSpeed = originalSpeed;
                 self.currentSpeed = originalSpeed;
-                NSInteger reportInterval = [content integerValueForKey:@"interval"];
+                NSInteger reportInterval = [content ks_integerValueForKey:@"interval"];
                 // 下载midi文件
                 BOOL hasSaveSong = [self checkSongHasSaveWithSongUrl:midiUrl];
                 NSString *fileName = [[midiUrl componentsSeparatedByString:@"/"] lastObject];
@@ -515,7 +515,7 @@
                         
             }
 
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cloudGetMediaStatus"]) { // 获取播放状态
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cloudGetMediaStatus"]) { // 获取播放状态
             /**
              api: 'cloudGetMediaStatus',
                  content: {
@@ -531,14 +531,14 @@
                         engineStatus = @"suspend";
                     }
                 }
-                NSMutableDictionary *valueDic = [NSMutableDictionary dictionaryWithDictionary:[parm dictionaryValueForKey:@"content"]];
+                NSMutableDictionary *valueDic = [NSMutableDictionary dictionaryWithDictionary:[parm ks_dictionaryValueForKey:@"content"]];
                 [valueDic setValue:engineStatus forKey:@"status"];
                 NSMutableDictionary *sendParm = [NSMutableDictionary dictionaryWithDictionary:parm];
                 [sendParm setValue:valueDic forKey:@"content"];
                 [self postMessage:sendParm];
             }
             // 播放、暂停、进度、播放结束、跳转指定位置
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cloudPlay"]) { // 播放
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cloudPlay"]) { // 播放
                 /**
                  api: 'cloudPlay',
                      content: {
@@ -554,25 +554,25 @@
                          hertz:440
                      }
                  */
-                NSDictionary *content = [parm dictionaryValueForKey:@"content"];
-                self.currentSongId = [content stringValueForKey:@"songID"];
-                float speed = [content floatValueForKey:@"speed"];
-                float originalSpeed = [content floatValueForKey:@"originalSpeed"];
+                NSDictionary *content = [parm ks_dictionaryValueForKey:@"content"];
+                self.currentSongId = [content ks_stringValueForKey:@"songID"];
+                float speed = [content ks_floatValueForKey:@"speed"];
+                float originalSpeed = [content ks_floatValueForKey:@"originalSpeed"];
                 double rate = speed / originalSpeed;
                 self.currentSpeed = speed;
-                float hertz = [content floatValueForKey:@"hertz"];
+                float hertz = [content ks_floatValueForKey:@"hertz"];
                 // 播放的hertz
                 [self.playerEngine adjustPitchByHZ:hertz];
                 
                 [self.playerEngine setMusicPlayerSpeed:rate];
-                Float64 startTime = [content doubleValueForKey:@"startTime"];
-                NSLog(@"------%@", [content stringValueForKey:@"startTime"]);
+                Float64 startTime = [content ks_doubleValueForKey:@"startTime"];
+                NSLog(@"------%@", [content ks_stringValueForKey:@"startTime"]);
                 [self.playerEngine setProgressTime:(startTime/1000)];
                 // 播放
                 [self playAction];
                 [self postMessage:parm];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cloudSuspend"]) { // 暂停
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cloudSuspend"]) { // 暂停
                  /**
                   api: 'cloudSuspend',
                   content: {
@@ -584,7 +584,7 @@
                  [self postMessage:parm];
                  
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cloudSetCurrentTime"]) { // // 跳转指定位置
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cloudSetCurrentTime"]) { // // 跳转指定位置
                 /**
                  api: 'cloudSetCurrentTime',
                      content: {
@@ -594,14 +594,14 @@
                          currentTime: 0
                      }
                  */
-                NSDictionary *content = [parm dictionaryValueForKey:@"content"];
-                Float64 currentTime = [content doubleValueForKey:@"currentTime"];
+                NSDictionary *content = [parm ks_dictionaryValueForKey:@"content"];
+                Float64 currentTime = [content ks_doubleValueForKey:@"currentTime"];
                 if (self.playerEngine) {
                     [self.playerEngine setProgressTime:(currentTime/1000)];
                 }
                 [self postMessage:parm];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cloudChangeSpeed"]) { // 调速 范围(45-270整数)
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cloudChangeSpeed"]) { // 调速 范围(45-270整数)
                 /**
                  api: 'cloudChangeSpeed',
                      content: {
@@ -613,9 +613,9 @@
                          originalSpeed: 90,
                      }
                  */
-                NSDictionary *content = [parm dictionaryValueForKey:@"content"];
-                float speed = [content floatValueForKey:@"speed"];
-                float originalSpeed = [content floatValueForKey:@"originalSpeed"];
+                NSDictionary *content = [parm ks_dictionaryValueForKey:@"content"];
+                float speed = [content ks_floatValueForKey:@"speed"];
+                float originalSpeed = [content ks_floatValueForKey:@"originalSpeed"];
                 double rate = speed / originalSpeed;
                 self.currentSpeed = speed;
                 [self.playerEngine setMusicPlayerSpeed:rate];
@@ -623,7 +623,7 @@
                 [self postMessage:parm];
             }
             // 设置每个轨道音量
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cloudVolume"]) {
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cloudVolume"]) {
                 /**
                  api: 'cloudVolume',
                      content: {
@@ -636,9 +636,9 @@
                      }
                  */
                 NSLog(@"-cloudVolume -----%@",parm);
-                NSDictionary *content = [parm dictionaryValueForKey:@"content"];
-                int instrumentId = [content intValueForKey:@"activeMidiId"];
-                float volume = [content floatValueForKey:@"activeMidiVolume"];
+                NSDictionary *content = [parm ks_dictionaryValueForKey:@"content"];
+                int instrumentId = [content ks_intValueForKey:@"activeMidiId"];
+                float volume = [content ks_floatValueForKey:@"activeMidiVolume"];
                 if (instrumentId < 0) {
                     [self postMessage:parm];
                     [self.playerEngine getAllTrackVolume];
@@ -648,18 +648,18 @@
                 [self postMessage:parm];
                 [self.playerEngine getAllTrackVolume];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cloudMetronome"]) { // 节拍器播放
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cloudMetronome"]) { // 节拍器播放
                  self.metronomeParm = [NSMutableDictionary dictionaryWithDictionary:parm];
-                 NSDictionary *content = [parm dictionaryValueForKey:@"content"];
-                 NSInteger repeatCount = [content integerValueForKey:@"repeat"];
-                 NSInteger denominator = [content integerValueForKey:@"denominator"];
-                 NSInteger numerator = [content integerValueForKey:@"numerator"];
-                 NSInteger supplement = [content integerValueForKey:@"supplement"];
+                 NSDictionary *content = [parm ks_dictionaryValueForKey:@"content"];
+                 NSInteger repeatCount = [content ks_integerValueForKey:@"repeat"];
+                 NSInteger denominator = [content ks_integerValueForKey:@"denominator"];
+                 NSInteger numerator = [content ks_integerValueForKey:@"numerator"];
+                 NSInteger supplement = [content ks_integerValueForKey:@"supplement"];
                  NSString *beatString = [NSString stringWithFormat:@"%zd/%zd", numerator,denominator];
                  self.beatType = [self getBeatTypeFromString:beatString];
                  [self showBeatViewRepeatCount:repeatCount supplement:supplement];
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cloudDestroy"]) { // 销毁播放器
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cloudDestroy"]) { // 销毁播放器
                 self.initEngineSuccess = NO;
                 // 重置track num array
                 self.isPlaying = NO;
@@ -668,9 +668,9 @@
                     self.playerEngine = nil;
                 }
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cloudLoading"]) { // loading
-                NSDictionary *content = [parm dictionaryValueForKey:@"content"];
-                BOOL showLoading = [content boolValueForKey:@"show"];
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cloudLoading"]) { // loading
+                NSDictionary *content = [parm ks_dictionaryValueForKey:@"content"];
+                BOOL showLoading = [content ks_boolValueForKey:@"show"];
                 if (showLoading) {
                     [self showCustomLoading];
                 }
@@ -678,9 +678,9 @@
                     [self removeCustomLoadingView];
                 }
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cloudToggleFollow"]) { // 跟音
-                NSDictionary *content = [parm dictionaryValueForKey:@"content"];
-                NSString *status = [content stringValueForKey:@"state"];
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cloudToggleFollow"]) { // 跟音
+                NSDictionary *content = [parm ks_dictionaryValueForKey:@"content"];
+                NSString *status = [content ks_stringValueForKey:@"state"];
                 if ([status isEqualToString:@"start"]) { // 开始
                     [self startTuner];
                 }
@@ -688,9 +688,9 @@
                     [self stopTuner];
                 }
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cloudAccompanyMessage"]) { // 获取伴奏
-                NSDictionary *content = [parm dictionaryValueForKey:@"content"];
-                NSString *accompanyUrl = [content stringValueForKey:@"accompanyUrl"];
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cloudAccompanyMessage"]) { // 获取伴奏
+                NSDictionary *content = [parm ks_dictionaryValueForKey:@"content"];
+                NSString *accompanyUrl = [content ks_stringValueForKey:@"accompanyUrl"];
                 if (![NSString isEmptyString:accompanyUrl]) {
                     NSString *fileName = [[accompanyUrl componentsSeparatedByString:@"/"] lastObject];
                     NSString *filePath = [self getAccompanyFilePathWithName:fileName];
@@ -755,7 +755,7 @@
 
 - (void)sendEndMetronomeMessage:(BOOL)isCancel {
     NSString *status = isCancel ? @"cancel" : @"finish";
-    NSMutableDictionary *valueDic = [NSMutableDictionary dictionaryWithDictionary:[self.metronomeParm dictionaryValueForKey:@"content"]];
+    NSMutableDictionary *valueDic = [NSMutableDictionary dictionaryWithDictionary:[self.metronomeParm ks_dictionaryValueForKey:@"content"]];
     [valueDic setValue:status forKey:@"status"];
     NSMutableDictionary *sendParm = [NSMutableDictionary dictionaryWithDictionary:self.metronomeParm];
     [sendParm setValue:valueDic forKey:@"content"];
@@ -814,7 +814,7 @@
 
 - (void)sendMessageToSocket:(NSDictionary *)parm {
     NSString *messageHeader = @"proxyMessage";
-    NSString *sendMessage = [self configDataCommond:messageHeader body:[parm dictionaryValueForKey:@"content"]];
+    NSString *sendMessage = [self configDataCommond:messageHeader body:[parm ks_dictionaryValueForKey:@"content"]];
     [self sendDataToSocketService:sendMessage];
 }
 
@@ -844,7 +844,7 @@
         default:
             break;
     }
-    NSMutableDictionary *valueDic = [NSMutableDictionary dictionaryWithDictionary:[parm dictionaryValueForKey:@"content"]];
+    NSMutableDictionary *valueDic = [NSMutableDictionary dictionaryWithDictionary:[parm ks_dictionaryValueForKey:@"content"]];
     [valueDic setValue:valueStr forKey:@"type"];
     [valueDic setValue:[NSNumber numberWithBool:checkIsWired] forKey:@"checkIsWired"];
     NSMutableDictionary *sendParm = [NSMutableDictionary dictionaryWithDictionary:parm];
@@ -1141,7 +1141,7 @@
     self.initEngineSuccess = YES;
     if (self.configEngineParm) {
         NSMutableDictionary *sendParm = [NSMutableDictionary dictionaryWithDictionary:self.configEngineParm];
-        NSMutableDictionary *content = [NSMutableDictionary dictionaryWithDictionary:[sendParm dictionaryValueForKey:@"content"]];
+        NSMutableDictionary *content = [NSMutableDictionary dictionaryWithDictionary:[sendParm ks_dictionaryValueForKey:@"content"]];
         [content setValue:@(totalTime*1000) forKey:@"midiDuration"];
         [sendParm setValue:content forKey:@"content"];
         [self postMessage:sendParm];

+ 87 - 87
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m

@@ -112,17 +112,17 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
 - (void)setParmDic:(NSDictionary *)parmDic {
     _parmDic = parmDic;
     _hasChangeSource = YES;
-    BOOL isOpenLight = [parmDic boolValueForKey:@"isOpenLight"];
+    BOOL isOpenLight = [parmDic ks_boolValueForKey:@"isOpenLight"];
     [[UIApplication sharedApplication] setIdleTimerDisabled:isOpenLight];
     // 横竖屏
-    NSInteger orientation = [parmDic integerValueForKey:@"orientation"];
+    NSInteger orientation = [parmDic ks_integerValueForKey:@"orientation"];
     
     BOOL isLandScape = orientation == 0 ? YES : NO;
     if (_landScape != isLandScape) {
         [self changeOrientation:isLandScape];
     }
     // 是否隐藏头部导航条
-    self.hideTop = [parmDic boolValueForKey:@"isHideTitle"];
+    self.hideTop = [parmDic ks_boolValueForKey:@"isHideTitle"];
 }
 
 - (void)changeOrientation:(BOOL)isLandScape {
@@ -326,20 +326,20 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
 }
 
 - (void)handleScriptMessageSource:(NSDictionary *)parm {
-    if ([[parm stringValueForKey:@"api"] isEqualToString:@"back"]) { // 返回
+    if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"back"]) { // 返回
         [self.navigationController popViewControllerAnimated:YES];
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"login"]) {
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"login"]) {
         // 回到登录页面
         [self backLoginView];
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"openWebView"]) { // 打开新页面
-        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"openWebView"]) { // 打开新页面
+        NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
         
         KSBaseWKWebViewController *detailCtrl = [[KSBaseWKWebViewController alloc] init];
-        detailCtrl.url = [valueDic stringValueForKey:@"url"];
+        detailCtrl.url = [valueDic ks_stringValueForKey:@"url"];
         detailCtrl.parmDic = valueDic;
-        NSInteger orientation = [valueDic integerValueForKey:@"orientation"];
+        NSInteger orientation = [valueDic ks_integerValueForKey:@"orientation"];
         BOOL isLandScape = orientation == 0 ? YES : NO;
         if (isLandScape == self.landScape) {
             self.keepOrientation = YES;
@@ -348,22 +348,22 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
         [self postMessage:parm];
         [self.navigationController pushViewController:detailCtrl animated:YES];
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"setRequestedOrientation"]) {
-        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"setRequestedOrientation"]) {
+        NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
         // 横竖屏
-        NSInteger orientation = [valueDic integerValueForKey:@"orientation"];
+        NSInteger orientation = [valueDic ks_integerValueForKey:@"orientation"];
         BOOL isLandScape = orientation == 0 ? YES : NO;
         [self changeOrientation:isLandScape];
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"keepScreenLongLight"]) {
-        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
-        BOOL isOpenLight = [valueDic boolValueForKey:@"isOpenLight"];
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"keepScreenLongLight"]) {
+        NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
+        BOOL isOpenLight = [valueDic ks_boolValueForKey:@"isOpenLight"];
         [[UIApplication sharedApplication] setIdleTimerDisabled:isOpenLight];
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"downLoad"]) {
-        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
-        if ([valueDic stringValueForKey:@"PDF"]) {
-            NSString *url = [valueDic stringValueForKey:@"downloadUrl"];
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"downLoad"]) {
+        NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
+        if ([valueDic ks_stringValueForKey:@"PDF"]) {
+            NSString *url = [valueDic ks_stringValueForKey:@"downloadUrl"];
             [KSNetworkingManager downloadFileRequestWithFileUrl:url progress:^(int64_t bytesRead, int64_t totalBytes) {
 
             } success:^(NSURL * _Nonnull fileUrl) {
@@ -377,17 +377,17 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
         }
     }
     // 回调是否刘海屏
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"isSpecialShapedScreen"]) {
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"isSpecialShapedScreen"]) {
         BOOL isShapedScreen = iPhoneXSafeTopMargin > 0 ? YES : NO;
-        NSMutableDictionary *valueDic = [NSMutableDictionary dictionaryWithDictionary:[parm dictionaryValueForKey:@"content"]];
+        NSMutableDictionary *valueDic = [NSMutableDictionary dictionaryWithDictionary:[parm ks_dictionaryValueForKey:@"content"]];
         [valueDic setValue:@(isShapedScreen) forKey:@"isSpecialShapedScreen"];
         [valueDic setValue:@(iPhoneXSafeTopMargin*2) forKey:@"notchHeight"];
         NSMutableDictionary *sendParm = [NSMutableDictionary dictionaryWithDictionary:parm];
         [sendParm setValue:valueDic forKey:@"content"];
         [self postMessage:sendParm];
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"getToken"]) {
-        NSMutableDictionary *valueDic = [NSMutableDictionary dictionaryWithDictionary:[parm dictionaryValueForKey:@"content"]];
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"getToken"]) {
+        NSMutableDictionary *valueDic = [NSMutableDictionary dictionaryWithDictionary:[parm ks_dictionaryValueForKey:@"content"]];
         [valueDic setValue:UserDefault(Token_type) forKey:@"tokenType"];
         [valueDic setValue:UserDefault(TokenKey) forKey:@"accessToken"];
         NSMutableDictionary *sendParm = [NSMutableDictionary dictionaryWithDictionary:parm];
@@ -395,16 +395,16 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
         [self postMessage:sendParm];
     }
     
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"openAccompanyWebView"]) { // 打开伴奏
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"openAccompanyWebView"]) { // 打开伴奏
         PREMISSIONTYPE micEnable = [RecordCheckManager checkPermissionShowAlert:NO showInView:nil];
         PREMISSIONTYPE cameraEnable = [RecordCheckManager checkCameraPremissionAvaiable:NO showInView:nil];
         if (micEnable == PREMISSIONTYPE_YES && cameraEnable == PREMISSIONTYPE_YES) { // 如果麦克风和摄像头权限都有
-            NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
+            NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
             KSAccompanyWebViewController *detailCtrl = [[KSAccompanyWebViewController alloc] init];
-            detailCtrl.url = [valueDic stringValueForKey:@"url"];
+            detailCtrl.url = [valueDic ks_stringValueForKey:@"url"];
             detailCtrl.parmDic = valueDic;
-            detailCtrl.hiddenNavBar = [valueDic boolValueForKey:@"isHideTitle"];
-            NSInteger orientation = [valueDic integerValueForKey:@"orientation"];
+            detailCtrl.hiddenNavBar = [valueDic ks_boolValueForKey:@"isHideTitle"];
+            NSInteger orientation = [valueDic ks_integerValueForKey:@"orientation"];
             BOOL isLandScape = orientation == 0 ? YES : NO;
             if (isLandScape == self.landScape) {
                 self.keepOrientation = YES;
@@ -425,27 +425,27 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             }
         }
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"checkAlbum"]) { // 判断权限
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"checkAlbum"]) { // 判断权限
         [self postMessage:parm];
         PREMISSIONTYPE albumEnable = [RecordCheckManager checkPhotoLibraryPremissionAvaiable:NO showInView:nil];
         if (albumEnable == PREMISSIONTYPE_NO) {
             [self showAlertWithMessage:@"请开启相册访问权限" type:CHECKDEVICETYPE_CAMREA];
         }
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"shareAchievements"]) { // 分享
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"shareAchievements"]) { // 分享
         //
         [self shareFunctionWithParm:parm];
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"getNavHeight"]) { // 获取状态栏高度和 title heigt
-        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"getNavHeight"]) { // 获取状态栏高度和 title heigt
+        NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
         [valueDic setValue:[NSNumber numberWithFloat:STATUS_GAP*2] forKey:@"navHeight"];
         [valueDic setValue:@(44*2) forKey:@"titleHeight"];
         [parm setValue:valueDic forKey:@"content"];
         [self postMessage:parm];
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"backIconChange"]) {
-        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
-        NSString *backColor = [valueDic stringValueForKey:@"iconStyle"];
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"backIconChange"]) {
+        NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
+        NSString *backColor = [valueDic ks_stringValueForKey:@"iconStyle"];
         NSString *backImage = @"";
         if ([backColor isEqualToString:@"black"]) {
             backImage = @"back_black";
@@ -455,9 +455,9 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
         }
         [self.webBackButton.backButton setImage:[UIImage imageNamed:backImage] forState:UIControlStateNormal];
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"setBarStatus"]) { // 顶部是否隐藏
-        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
-        BOOL isShow = [valueDic boolValueForKey:@"status"]; // 0 隐藏 1 显示
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"setBarStatus"]) { // 顶部是否隐藏
+        NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
+        BOOL isShow = [valueDic ks_boolValueForKey:@"status"]; // 0 隐藏 1 显示
         self.hiddenNavBar = !isShow;
         CGFloat navHeight = isShow ? kNaviBarHeight : 0;
         [self.navView mas_updateConstraints:^(MASConstraintMaker *make) {
@@ -468,16 +468,16 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             make.top.mas_equalTo(self.view.mas_top).offset(navHeight);
         }];
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"chooseFile"]) {
-        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"chooseFile"]) {
+        NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
         self.chooseFileParm = [NSMutableDictionary dictionaryWithDictionary:valueDic];
-        NSString *typeStr = [valueDic stringValueForKey:@"type"];
-        NSInteger maxCount = [valueDic integerValueForKey:@"max"];
-        NSString *bucket = [valueDic stringValueForKey:@"bucket"];
+        NSString *typeStr = [valueDic ks_stringValueForKey:@"type"];
+        NSInteger maxCount = [valueDic ks_integerValueForKey:@"max"];
+        NSString *bucket = [valueDic ks_stringValueForKey:@"bucket"];
         [self chooseFileWithType:typeStr maxNumber:maxCount bucket:bucket];
         
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"setAddress"]) { // 跳转地址选择
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"setAddress"]) { // 跳转地址选择
         AddressListViewController *ctrl = [[AddressListViewController alloc] init];
         ctrl.isChooseAddress = YES;
         MJWeakSelf;
@@ -486,37 +486,37 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
         }];
         [self.navigationController pushViewController:ctrl animated:YES];
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"paymentOrder"]) {
-        NSDictionary *content = [parm dictionaryValueForKey:@"content"];
-        NSString *channel = [content stringValueForKey:@"payChannel"];
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"paymentOrder"]) {
+        NSDictionary *content = [parm ks_dictionaryValueForKey:@"content"];
+        NSString *channel = [content ks_stringValueForKey:@"payChannel"];
         if ([channel isEqualToString:@"ali_app"]) {
-            NSString *infoMessage = [content stringValueForKey:@"payInfo"];
+            NSString *infoMessage = [content ks_stringValueForKey:@"payInfo"];
             [KSOrderManager dealWithAliSDK:infoMessage];
         }
         else if ([channel isEqualToString:@"wx_app"]) {
-            NSString *infoMessage = [content stringValueForKey:@"payInfo"];
+            NSString *infoMessage = [content ks_stringValueForKey:@"payInfo"];
             [KSOrderManager dealWithWXSDK:infoMessage];
         }
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"joinLiveRoom"]) { // 进入直播间
-        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
-        NSString *roomId = [valueDic stringValueForKey:@"roomId"];
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"joinLiveRoom"]) { // 进入直播间
+        NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
+        NSString *roomId = [valueDic ks_stringValueForKey:@"roomId"];
         [self joinLiveRoomWithRoomId:roomId];
         
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"savePicture"]) { // 保存图片到相册
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"savePicture"]) { // 保存图片到相册
         // 判断相册权限
         PREMISSIONTYPE albumEnable = [RecordCheckManager checkPhotoLibraryPremissionAvaiable:NO showInView:nil];
         if (albumEnable == PREMISSIONTYPE_YES) { // 如果有权限
-            NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
-            NSString *base64String = [valueDic stringValueForKey:@"base64"];
+            NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
+            NSString *base64String = [valueDic ks_stringValueForKey:@"base64"];
             UIImage *saveImage = [self imageWithBase64String:base64String];
             [[TZImageManager manager] savePhotoWithImage:saveImage completion:^(PHAsset *asset, NSError *error) {
                 if (!error) {
-                    [self savePicCallback:[valueDic stringValueForKey:@"uuid"] isSuccess:YES];
+                    [self savePicCallback:[valueDic ks_stringValueForKey:@"uuid"] isSuccess:YES];
                 }
                 else {
-                    [self savePicCallback:[valueDic stringValueForKey:@"uuid"] isSuccess:NO];
+                    [self savePicCallback:[valueDic ks_stringValueForKey:@"uuid"] isSuccess:NO];
                 }
             }];
         }
@@ -526,20 +526,20 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             }
         }
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"openCourseDetail"]) {
-        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
-        NSString *type = [valueDic stringValueForKey:@"type"];
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"openCourseDetail"]) {
+        NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
+        NSString *type = [valueDic ks_stringValueForKey:@"type"];
         if ([type isEqualToString:@"pianoRoom"]) { // 琴房
-            NSString *courseId = [valueDic stringValueForKey:@"courseId"];
+            NSString *courseId = [valueDic ks_stringValueForKey:@"courseId"];
             MusicRoomViewController *ctrl = [[MusicRoomViewController alloc] init];
             ctrl.courseId = courseId;
             [self.navigationController pushViewController:ctrl animated:YES];
         }
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"joinChatGroup"]) {
-        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
-        NSString *targetId = [valueDic stringValueForKey:@"id"];
-        if ([[valueDic stringValueForKey:@"type"] isEqualToString:@"single"]) { // 单聊
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"joinChatGroup"]) {
+        NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
+        NSString *targetId = [valueDic ks_stringValueForKey:@"id"];
+        if ([[valueDic ks_stringValueForKey:@"type"] isEqualToString:@"single"]) { // 单聊
             
             
             KSChatConversationViewController *ctrl = [[KSChatConversationViewController alloc] init];
@@ -548,7 +548,7 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             [self.navigationController pushViewController:ctrl animated:YES];
             
         }
-        else if ([[valueDic stringValueForKey:@"type"] isEqualToString:@"multi"]) { // 群聊
+        else if ([[valueDic ks_stringValueForKey:@"type"] isEqualToString:@"multi"]) { // 群聊
             if ([NSString isEmptyString:targetId]) {
                 [self MBPShow:@"报名未结束,暂无群组"];
                 return;
@@ -559,29 +559,29 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             [self.navigationController pushViewController:ctrl animated:YES];
         }
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"openPageSuccess"]) {
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"openPageSuccess"]) {
         [self backAction];
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"getVersion"]) {
-        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"getVersion"]) {
+        NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
         NSMutableDictionary *sendParm = [NSMutableDictionary dictionary];
         [parm setValue:@"getVersion" forKey:@"api"];
         NSMutableDictionary *content = [NSMutableDictionary dictionary];
         [content setValue:[USER_MANAGER getCurrentVersion] forKey:@"version"];
-        [content setValue:[valueDic stringValueForKey:@"uuid"] forKey:@"uuid"];
+        [content setValue:[valueDic ks_stringValueForKey:@"uuid"] forKey:@"uuid"];
         [sendParm setValue:content forKey:@"content"];
         [self postMessage:sendParm];
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"getDeviceStatus"]) {
-        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
-        NSString *type = [valueDic stringValueForKey:@"type"];
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"getDeviceStatus"]) {
+        NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
+        NSString *type = [valueDic ks_stringValueForKey:@"type"];
         if ([type isEqualToString:@"video"]) {
             NSString *status = [UIScreen mainScreen].isCaptured ? @"1" : @"0";
             NSMutableDictionary *sendParm = [NSMutableDictionary dictionary];
             [sendParm setValue:@"getDeviceStatus" forKey:@"api"];
             NSMutableDictionary *content = [NSMutableDictionary dictionary];
-            [content setValue:[valueDic stringValueForKey:@"type"] forKey:@"type"];
-            [content setValue:[valueDic stringValueForKey:@"uuid"] forKey:@"uuid"];
+            [content setValue:[valueDic ks_stringValueForKey:@"type"] forKey:@"type"];
+            [content setValue:[valueDic ks_stringValueForKey:@"uuid"] forKey:@"uuid"];
             [content setValue:status forKey:@"status"];
             [sendParm setValue:content forKey:@"content"];
             [self postMessage:sendParm];
@@ -590,8 +590,8 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             }
         }
     }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"setEventTracking"]) {
-        NSString *type = [[parm dictionaryValueForKey:@"content"] stringValueForKey:@"type"];
+    else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"setEventTracking"]) {
+        NSString *type = [[parm ks_dictionaryValueForKey:@"content"] ks_stringValueForKey:@"type"];
         [USER_MANAGER sendUMEvent:type];
     }
 }
@@ -699,16 +699,16 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
 
 - (void)shareFunctionWithParm:(NSDictionary *)parm {
     
-    NSDictionary *content = [parm dictionaryValueForKey:@"content"];
-    NSString *typeString = [content stringValueForKey:@"type"];
+    NSDictionary *content = [parm ks_dictionaryValueForKey:@"content"];
+    NSString *typeString = [content ks_stringValueForKey:@"type"];
     KSSHARETYPE shareType = [typeString isEqualToString:@"image"] ? KSSHARETYPE_IMAGE : KSSHARETYPE_VODEO;
-    NSString *shareTitle = [content stringValueForKey:@"title"];
-    NSString *descMessage = [content stringValueForKey:@"desc"];
-    NSString *videoUrl = [content stringValueForKey:@"video"];
-    NSString *imgStr = [content stringValueForKey:@"image"];
-    NSString *saveLinkUrl = [content stringValueForKey:@"url"];
+    NSString *shareTitle = [content ks_stringValueForKey:@"title"];
+    NSString *descMessage = [content ks_stringValueForKey:@"desc"];
+    NSString *videoUrl = [content ks_stringValueForKey:@"video"];
+    NSString *imgStr = [content ks_stringValueForKey:@"image"];
+    NSString *saveLinkUrl = [content ks_stringValueForKey:@"url"];
     UIImage *shareImage = [self imageWithBase64String:imgStr];
-    NSArray *buttonArray = [content arrayValueForKey:@"button"];
+    NSArray *buttonArray = [content ks_arrayValueForKey:@"button"];
     BOOL containCopyButton = NO;
     for (NSString *nameString in buttonArray) {
         if ([nameString isEqualToString:@"copy"]) {
@@ -718,9 +718,9 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     }
     [KSUMShareManager shareInstanceShowWithImage:shareImage showSaveLink:containCopyButton saveLinkUrl:saveLinkUrl url:videoUrl shareTitle:shareTitle descMessage:descMessage shareType:shareType showInView:self callback:^(BOOL isSuccess, NSString * _Nonnull descMessage) {
         NSMutableDictionary *responParm = [NSMutableDictionary dictionary];
-        [responParm setValue:[parm stringValueForKey:@"api"] forKey:@"api"];
+        [responParm setValue:[parm ks_stringValueForKey:@"api"] forKey:@"api"];
         NSMutableDictionary *content = [NSMutableDictionary dictionary];
-        [content setValue:[content stringValueForKey:@"UUID"] forKey:@"content"];
+        [content setValue:[content ks_stringValueForKey:@"UUID"] forKey:@"content"];
         [content setValue:descMessage forKey:@"message"];
         BOOL status = isSuccess;
         [content setValue:[NSNumber numberWithBool:status] forKey:@"status"];

+ 5 - 4
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m

@@ -52,6 +52,7 @@
 // 设置json提交方式
 + (void)configRequestMethodJSON {
     [VoNetworking sharedManager].httpSessionManager.requestSerializer = [AFJSONRequestSerializer serializer];
+    [[VoNetworking sharedManager] configHttpHeader:@{@"Content-Type":@"application/json"}];
     [self configRequestHeader];
 }
 
@@ -83,13 +84,13 @@
             NSLog(@"success call back---- %@", myUrl);
             dic = [NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers | NSJSONReadingMutableLeaves error:nil];
             
-            if ([dic integerValueForKey:@"code"] == 403) { // token验证失败
+            if ([dic ks_integerValueForKey:@"code"] == 403) { // token验证失败
                 [self logOutWithType:YES];
                 [dic setValue:@"请重新登录" forKey:@"msg"];
                 success(dic);
                 return;
             }
-            else if ([dic integerValueForKey:@"code"] == 401) {
+            else if ([dic ks_integerValueForKey:@"code"] == 401) {
                 [self logOutWithType:NO];
                 [dic setValue:@"请重新登录" forKey:@"msg"];
                 success(dic);
@@ -120,13 +121,13 @@
             
             dic = [NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers | NSJSONReadingMutableLeaves error:nil];
             
-            if ([dic integerValueForKey:@"code"] == 403) { // token验证失败
+            if ([dic ks_integerValueForKey:@"code"] == 403) { // token验证失败
                 [self logOutWithType:YES];
                 [dic setValue:@"请重新登录" forKey:@"msg"];
                 success(dic);
                 return;
             }
-            else if ([dic integerValueForKey:@"code"] == 401) {
+            else if ([dic ks_integerValueForKey:@"code"] == 401) {
                 [self logOutWithType:NO];
                 [dic setValue:@"请重新登录" forKey:@"msg"];
                 success(dic);

+ 6 - 6
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSOrderManager.m

@@ -53,12 +53,12 @@
     }
     NSDictionary *infoDic = [self convertJsonStringToNSDictionary:infoMessage];
     PayReq *request = [[PayReq alloc] init];
-    request.partnerId = [infoDic stringValueForKey:@"partnerid"];
-    request.prepayId = [infoDic stringValueForKey:@"prepayid"];
-    request.package = [infoDic stringValueForKey:@"packageValue"];
-    request.nonceStr = [infoDic stringValueForKey:@"noncestr"];
-    request.timeStamp = (UInt32)[infoDic integerValueForKey:@"timestamp"];
-    request.sign = [infoDic stringValueForKey:@"sign"];
+    request.partnerId = [infoDic ks_stringValueForKey:@"partnerid"];
+    request.prepayId = [infoDic ks_stringValueForKey:@"prepayid"];
+    request.package = [infoDic ks_stringValueForKey:@"packageValue"];
+    request.nonceStr = [infoDic ks_stringValueForKey:@"noncestr"];
+    request.timeStamp = (UInt32)[infoDic ks_integerValueForKey:@"timestamp"];
+    request.sign = [infoDic ks_stringValueForKey:@"sign"];
     [WXApi sendReq:request completion:^(BOOL success) {
         if (success) {
             [[NSNotificationCenter defaultCenter] postNotificationName:DEALCALLBACKNOTICIFATION object:@"success"];

+ 16 - 16
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSRCIMDataSource.m

@@ -28,9 +28,9 @@
         completion(nil);
     }
     [KSNetworkingManager queryGroupDetail:KS_POST groupId:groupId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-            RCGroup *groupInfo = [[RCGroup alloc] initWithGroupId:groupId groupName:[result stringValueForKey:@"name"] portraitUri:[result stringValueForKey:@"img"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
+            RCGroup *groupInfo = [[RCGroup alloc] initWithGroupId:groupId groupName:[result ks_stringValueForKey:@"name"] portraitUri:[result ks_stringValueForKey:@"img"]];
             completion(groupInfo);
         }
         else {
@@ -50,11 +50,11 @@
         return;
     }
     [KSNetworkingManager imGroupMemberAllRequest:KS_POST groupId:groupId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [dic arrayValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [dic ks_arrayValueForKey:@"data"];
             NSMutableArray *ret = [[NSMutableArray alloc] init];
             for (NSDictionary *parm in sourceArray) {
-                [ret addObject:[parm stringValueForKey:@"userId"]];
+                [ret addObject:[parm ks_stringValueForKey:@"userId"]];
             }
             resultBlock(ret);
         }
@@ -78,13 +78,13 @@
     }
     if (![userId isEqualToString:[RCIM sharedRCIM].currentUserInfo.userId]) {
         [KSNetworkingManager imUserFriendQueryDetail:KS_POST userId:userId success:^(NSDictionary * _Nonnull dic) {
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
                 
-                NSDictionary *userDic = [dic dictionaryValueForKey:@"data"];
-                RCUserInfo *user = [[RCUserInfo alloc] initWithUserId:userId name:[userDic stringValueForKey:@"friendNickname"] portrait:[userDic stringValueForKey:@"friendAvatar"]];
+                NSDictionary *userDic = [dic ks_dictionaryValueForKey:@"data"];
+                RCUserInfo *user = [[RCUserInfo alloc] initWithUserId:userId name:[userDic ks_stringValueForKey:@"friendNickname"] portrait:[userDic ks_stringValueForKey:@"friendAvatar"]];
                 // 附加字段
                 NSMutableDictionary *extraDic = [NSMutableDictionary dictionary];
-                [extraDic setValue:[userDic stringValueForKey:@"roleType"] forKey:@"role"];
+                [extraDic setValue:[userDic ks_stringValueForKey:@"roleType"] forKey:@"role"];
                 user.extra = [extraDic mj_JSONString];
                 completion(user);
             }
@@ -118,16 +118,16 @@
         return;
     }
     [KSNetworkingManager imGroupMemberQueryUser:KS_POST groupId:groupId userId:userId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-            NSString *name = [result stringValueForKey:@"nickname"];
-            RCUserInfo *user = [[RCUserInfo alloc] initWithUserId:userId name:name portrait:[result stringValueForKey:@"avatar"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
+            NSString *name = [result ks_stringValueForKey:@"nickname"];
+            RCUserInfo *user = [[RCUserInfo alloc] initWithUserId:userId name:name portrait:[result ks_stringValueForKey:@"avatar"]];
             // 附加字段
             NSMutableDictionary *extraDic = [NSMutableDictionary dictionary];
-            if ([result boolValueForKey:@"isAdmin"]) {
+            if ([result ks_boolValueForKey:@"isAdmin"]) {
                 [extraDic setValue:@"owner" forKey:@"groupOwner"];
             }
-            [extraDic setValue:[result stringValueForKey:@"roleType"] forKey:@"role"];
+            [extraDic setValue:[result ks_stringValueForKey:@"roleType"] forKey:@"role"];
             user.extra = [extraDic mj_JSONString];
             completion(user);
         }

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

@@ -136,13 +136,13 @@ shouldPrevent = NO; \
 
 //#ifdef DEBUG
 
-//#define hostURL (@"https://dev.colexiu.com")
-//#define SEALCLASSHOST (@"https://dev.colexiu.com/api-classroom")
-//#define WEBHOST (@"https://dev.colexiu.com/teacher")
-//#define SOCKET_URL (@"wss://dev.colexiu.com/audioAnalysis")
-//#define JSPUSH_ENVIRONMENT (NO)
-//#define RCIM_KEY (@"0vnjpoad0jbdz")
-//#define SUBMIT_UUID (YES)
+#define hostURL (@"https://dev.colexiu.com")
+#define SEALCLASSHOST (@"https://dev.colexiu.com/api-classroom")
+#define WEBHOST (@"https://dev.colexiu.com/teacher")
+#define SOCKET_URL (@"wss://dev.colexiu.com/audioAnalysis")
+#define JSPUSH_ENVIRONMENT (NO)
+#define RCIM_KEY (@"0vnjpoad0jbdz")
+#define SUBMIT_UUID (YES)
 
 // 预生产环境
 //#define hostURL (@"https://ponline.colexiu.com")
@@ -155,13 +155,13 @@ shouldPrevent = NO; \
 
 //#else
 
-#define hostURL (@"https://online.colexiu.com")
-#define SEALCLASSHOST (@"https://online.colexiu.com/api-classroom")
-#define WEBHOST (@"https://online.colexiu.com/teacher")
-#define SOCKET_URL (@"wss://online.colexiu.com/audioAnalysis")
-#define JSPUSH_ENVIRONMENT (YES)
-#define RCIM_KEY (@"e5t4ouvpe42pa")
-#define SUBMIT_UUID (YES)
+//#define hostURL (@"https://online.colexiu.com")
+//#define SEALCLASSHOST (@"https://online.colexiu.com/api-classroom")
+//#define WEBHOST (@"https://online.colexiu.com/teacher")
+//#define SOCKET_URL (@"wss://online.colexiu.com/audioAnalysis")
+//#define JSPUSH_ENVIRONMENT (YES)
+//#define RCIM_KEY (@"e5t4ouvpe42pa")
+//#define SUBMIT_UUID (YES)
 
 
 //#endif

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Define/UserKeyHeader.h

@@ -55,7 +55,7 @@
 #define VIP_DEFAULT_LOGO (@"vip_chatList")
 
 
-#define MESSAGEKEY ([dic stringValueForKey:@"msg"])
+#define MESSAGEKEY ([dic ks_stringValueForKey:@"msg"])
 
 #define PHONEKEY (@"phone")
 #define PASSWORDKEY (@"password")

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/NSString+MD5.m

@@ -82,7 +82,7 @@
     keyArray = [keyArray sortedArrayUsingSelector:@selector(compare:)]; // 升序
     // 剔除空字符串 @""
     for (NSString *keyStr in keyArray) {
-        NSString *valueStr = [parmDict stringValueForKey:keyStr];
+        NSString *valueStr = [parmDict ks_stringValueForKey:keyStr];
         if (![NSString isEmptyString:valueStr] && ![keyStr isEqualToString:@"SIGN"]) {
             [pramArray addObject:[NSString stringWithFormat:@"%@=%@",keyStr,valueStr]];
         }

+ 16 - 16
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSDictionary+Extension.h

@@ -16,7 +16,7 @@
  @param key 字典Key值
  @return NSInteger
  */
-- (NSInteger)integerValueForKey:(id)key;
+- (NSInteger)ks_integerValueForKey:(id)key;
 
 /**
  从字典里取int(内带判空)
@@ -24,30 +24,30 @@
  @param key 字典Key值
  @return int
  */
-- (int)intValueForKey:(id)key;
+- (int)ks_intValueForKey:(id)key;
 
 /**
- 从字典里取int(内带判空)
+ 从字典里取long long(内带判空)
  
  @param key 字典Key值
- @return long
+ @return long long
  */
-- (long)longValueForKey:(id)key;
+- (long long)ks_longlongValueForKey:(id)key;
+
 /**
- 从字典里取long long(内带判空)
+ 从字典里取long (内带判空)
  
  @param key 字典Key值
  @return long long
  */
-- (long long)longlongValueForKey:(id)key;
-
+- (long)ks_longValueForKey:(id)key;
 /**
  从字典里取BOOL(内带判空)
  
  @param key 字典Key值
  @return BOOL
  */
-- (BOOL)boolValueForKey:(id)key;
+- (BOOL)ks_boolValueForKey:(id)key;
 
 /**
  从字典里取float(内带判空)
@@ -55,21 +55,21 @@
  @param key 字典Key值
  @return float
  */
-- (float)floatValueForKey:(id)key;
+- (float)ks_floatValueForKey:(id)key;
 /**
  从字典里取double(内带判空)
  
  @param key 字典Key值
  @return double
  */
-- (double)doubleValueForKey:(id)key;
+- (double)ks_doubleValueForKey:(id)key;
 /**
  从字典里取字符串(内带判空)
  
  @param key 字典Key值
  @return NSString
  */
-- (NSString *)stringValueForKey:(id)key;
+- (NSString *)ks_stringValueForKey:(id)key;
 
 /**
  从字典里取数组(内带判空)
@@ -77,7 +77,7 @@
  @param key 字典Key值
  @return NSArray
  */
-- (NSArray *)arrayValueForKey:(id)key;
+- (NSArray *)ks_arrayValueForKey:(id)key;
 
 /**
  从字典里取可变数组(内带判空)
@@ -85,7 +85,7 @@
  @param key 字典Key值
  @return NSMutableArray
  */
-- (NSMutableArray *)mutableArrayValueForKey:(NSString *)key;
+- (NSMutableArray *)ks_mutableArrayValueForKey:(NSString *)key;
 
 /**
  从字典里取字典(内带判空)
@@ -93,12 +93,12 @@
  @param key 字典Key值
  @return NSDictionary
  */
-- (NSDictionary *)dictionaryValueForKey:(id)key;
+- (NSDictionary *)ks_dictionaryValueForKey:(id)key;
 
 /**
  字典转json
 
- @return <#return value description#>
+ @return NSString
  */
 -(NSString *)convertToJsonData;
 @end

+ 22 - 20
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSDictionary+Extension.m

@@ -10,38 +10,38 @@
 
 @implementation NSDictionary (Extension)
 
-- (NSInteger)integerValueForKey:(id)key {
-    id value = [self notNullValueForKey:key];
+- (NSInteger)ks_integerValueForKey:(id)key {
+    id value = [self valueForKey:key];
     return value == nil ? 0 : [value integerValue];
 }
 
-- (int)intValueForKey:(id)key {
+- (int)ks_intValueForKey:(id)key {
     id value = [self notNullValueForKey:key];
     return value == nil ? 0 : [value intValue];
 }
 
-/**
- 从字典里取int(内带判空)
- 
- @param key 字典Key值
- @return long
- */
-- (long)longValueForKey:(id)key {
+
+- (long long)ks_longlongValueForKey:(id)key {
     id value = [self notNullValueForKey:key];
     return value == nil ? 0 : [value longLongValue];
 }
 
-- (long long)longlongValueForKey:(id)key {
+/**
+ 从字典里取long (内带判空)
+ 
+ @param key 字典Key值
+ @return long long
+ */
+- (long)ks_longValueForKey:(id)key {
     id value = [self notNullValueForKey:key];
-    return value == nil ? 0 : [value longLongValue];
+    return value == nil ? 0 : [value longValue];
 }
-
-- (BOOL)boolValueForKey:(id)key {
+- (BOOL)ks_boolValueForKey:(id)key {
     id value = [self notNullValueForKey:key];
     return value == nil ? NO : [value boolValue];
 }
 
-- (float)floatValueForKey:(id)key {
+- (float)ks_floatValueForKey:(id)key {
     id value = [self notNullValueForKey:key];
     return value == nil ? NO : [value floatValue];
 }
@@ -52,12 +52,12 @@
  @param key 字典Key值
  @return double
  */
-- (double)doubleValueForKey:(id)key {
+- (double)ks_doubleValueForKey:(id)key {
     id value = [self notNullValueForKey:key];
     return value == nil ? NO : [value doubleValue];
 }
 
-- (NSString *)stringValueForKey:(id)key {
+- (NSString *)ks_stringValueForKey:(id)key {
     id value = [self notNullValueForKey:key];
     if ([value isKindOfClass:[NSNumber class]]) {
         value = [value stringValue];
@@ -65,7 +65,8 @@
     return value;
 }
 
-- (NSArray *)arrayValueForKey:(id)key {
+
+- (NSArray *)ks_arrayValueForKey:(id)key {
     id value = [self notNullValueForKey:key];
     if(![value isKindOfClass:[NSArray class]]) {
         return nil;
@@ -73,7 +74,7 @@
     return value;
 }
 
-- (NSMutableArray*)mutableArrayValueForKey:(NSString *)key {
+- (NSMutableArray*)ks_mutableArrayValueForKey:(NSString *)key {
     id value = [self notNullValueForKey:key];
     if(![value isKindOfClass:[NSMutableArray class]]) {
         return nil;
@@ -81,7 +82,7 @@
     return value;
 }
 
-- (NSDictionary *)dictionaryValueForKey:(id)key {
+- (NSDictionary *)ks_dictionaryValueForKey:(id)key {
     id value = [self notNullValueForKey:key];
     if(![value isKindOfClass:[NSDictionary class]]) {
         return nil;
@@ -108,6 +109,7 @@
     else if ([value isKindOfClass:[NSNumber class]]) {
         value = [NSString stringWithFormat:@"%@", value];
     }
+    
     return value;
 }
 -(NSString *)convertToJsonData

+ 8 - 8
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/KSUploadManager.m

@@ -83,13 +83,13 @@
     NSString *uploadFileName = [NSString stringWithFormat:@"%@%@_%@%@%@",folderString,[NSDate getCurrentTimestampFor64], UserDefault(UIDKey), fileName,[UIImage typeForImageData:imageData]];
     NSString *keyValue = uploadFileName;
     [KSNetworkingManager getUploadSignRequest:KS_POST fileName:uploadFileName keyName:keyValue bucketName:self.bucketName success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             KS3AccessControlList *acl = [[KS3AccessControlList alloc] init];
             [acl setContronAccess:KingSoftYun_Permission_Public_Read];
             
             KS3PutObjectRequest *putObjRequest = [[KS3PutObjectRequest alloc] initWithName:@"" withAcl:acl grantAcl:nil];
             // token
-            [putObjRequest setStrKS3Token:[dic stringValueForKey:@"signature"]];
+            [putObjRequest setStrKS3Token:[dic ks_stringValueForKey:@"signature"]];
             putObjRequest.filename = uploadFileName;
             putObjRequest.data = imageData;
             [putObjRequest setCompleteRequest];
@@ -165,7 +165,7 @@
         NSString *keyName = fileNameArray[i];
         NSData *fileData = fileDataArray[i];
         [KSNetworkingManager getUploadSignRequest:KS_POST fileName:uploadFileName keyName:keyName bucketName:self.bucketName success:^(NSDictionary * _Nonnull dic) {
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
                 KS3AccessControlList *acl = [[KS3AccessControlList alloc] init];
                 [acl setContronAccess:KingSoftYun_Permission_Public_Read];
                 
@@ -174,7 +174,7 @@
                     [sessions addObject:putObjRequest];
                 }
                 // token
-                [putObjRequest setStrKS3Token:[dic stringValueForKey:@"signature"]];
+                [putObjRequest setStrKS3Token:[dic ks_stringValueForKey:@"signature"]];
                 putObjRequest.filename = uploadFileName;
                 putObjRequest.data = fileData;
                 [putObjRequest setCompleteRequest];
@@ -239,13 +239,13 @@
     NSString *keyValue = uploadFileName;
     self.videoLinkUrl = [NSString stringWithFormat:@"https://%@/%@",self.receiveBucket,uploadFileName];
     [KSNetworkingManager getUploadSignRequest:KS_POST fileName:uploadFileName keyName:keyValue bucketName:self.bucketName success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             KS3AccessControlList *acl = [[KS3AccessControlList alloc] init];
             [acl setContronAccess:KingSoftYun_Permission_Public_Read];
             
             KS3PutObjectRequest *putObjRequest = [[KS3PutObjectRequest alloc] initWithName:@"" withAcl:acl grantAcl:nil];
             // token
-            [putObjRequest setStrKS3Token:[dic stringValueForKey:@"signature"]];
+            [putObjRequest setStrKS3Token:[dic ks_stringValueForKey:@"signature"]];
             putObjRequest.filename = uploadFileName;
             putObjRequest.data = fileData;
             self->_fileSize = putObjRequest.data.length;
@@ -287,13 +287,13 @@
     NSString *uploadFileName = [NSString stringWithFormat:@"%@%@_%@%@%@",folderString,[NSDate getCurrentTimestampFor64],UserDefault(UIDKey), fileName,fileSuffix];
     NSString *keyValue = uploadFileName;
     [KSNetworkingManager getUploadSignRequest:KS_POST fileName:uploadFileName keyName:keyValue bucketName:self.bucketName success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             KS3AccessControlList *acl = [[KS3AccessControlList alloc] init];
             [acl setContronAccess:KingSoftYun_Permission_Public_Read];
             
             KS3PutObjectRequest *putObjRequest = [[KS3PutObjectRequest alloc] initWithName:@"" withAcl:acl grantAcl:nil];
             // token
-            [putObjRequest setStrKS3Token:[dic stringValueForKey:@"signature"]];
+            [putObjRequest setStrKS3Token:[dic ks_stringValueForKey:@"signature"]];
             putObjRequest.filename = uploadFileName;
             putObjRequest.data = fileData;
             [putObjRequest setCompleteRequest];

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

@@ -50,7 +50,7 @@
     [self showhud];
     [KSNetworkingManager imGroupCreate:KS_POST name:groupName introduce:desc success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             if (self.callback) {
                 self.callback();
             }

+ 14 - 14
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatConversationViewController.m

@@ -318,12 +318,12 @@
     if (self.conversationType == ConversationType_PRIVATE) {
         if (![self.targetId isEqualToString:[RCIM sharedRCIM].currentUserInfo.userId]) {
             [KSNetworkingManager imUserFriendQueryDetail:KS_POST userId:self.targetId success:^(NSDictionary * _Nonnull dic) {
-                if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                    NSDictionary *userDic = [dic dictionaryValueForKey:@"data"];
-                    RCUserInfo *user = [[RCUserInfo alloc] initWithUserId:self.targetId name:[userDic stringValueForKey:@"friendNickname"] portrait:[userDic stringValueForKey:@"friendAvatar"]];
+                if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+                    NSDictionary *userDic = [dic ks_dictionaryValueForKey:@"data"];
+                    RCUserInfo *user = [[RCUserInfo alloc] initWithUserId:self.targetId name:[userDic ks_stringValueForKey:@"friendNickname"] portrait:[userDic ks_stringValueForKey:@"friendAvatar"]];
                     // 附加字段
                     NSMutableDictionary *extraDic = [NSMutableDictionary dictionary];
-                    [extraDic setValue:[userDic stringValueForKey:@"roleType"] forKey:@"role"];
+                    [extraDic setValue:[userDic ks_stringValueForKey:@"roleType"] forKey:@"role"];
                     user.extra = [extraDic mj_JSONString];
                     
                     [[RCIM sharedRCIM] refreshUserInfoCache:user withUserId:self.targetId];
@@ -349,8 +349,8 @@
         // 获取群成员
         [KSNetworkingManager imGroupMemberAllRequest:KS_POST groupId:self.targetId success:^(NSDictionary * _Nonnull dic) {
             
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSArray *sourceArray = [dic arrayValueForKey:@"data"];
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+                NSArray *sourceArray = [dic ks_arrayValueForKey:@"data"];
                 for (NSDictionary *parm in sourceArray) {
                     if ([parm isKindOfClass:[NSNull class]]) {
                         continue;
@@ -379,13 +379,13 @@
         
         // 获取群组信息
         [KSNetworkingManager queryGroupDetail:KS_POST groupId:self.targetId success:^(NSDictionary * _Nonnull dic) {
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-                RCGroup *groupInfo = [[RCGroup alloc] initWithGroupId:self.targetId groupName:[result stringValueForKey:@"name"] portraitUri:[result stringValueForKey:@"img"]];
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+                NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
+                RCGroup *groupInfo = [[RCGroup alloc] initWithGroupId:self.targetId groupName:[result ks_stringValueForKey:@"name"] portraitUri:[result ks_stringValueForKey:@"img"]];
                 [[RCIM sharedRCIM] refreshGroupInfoCache:groupInfo withGroupId:self.targetId];
                 [self refreshTitle];
             }
-            else if ([dic integerValueForKey:@"code"] == 204) {
+            else if ([dic ks_integerValueForKey:@"code"] == 204) {
                 // 弹窗提示是否删除群组
                 MJWeakSelf;
                 self.alertView = [KSPublicAlertView shareInstanceWithTitle:@"提示" descMessage:@"当前群组已被解散,是否删除聊天记录?" leftTitle:@"取消" rightTitle:@"确定" cancelAction:^{
@@ -504,7 +504,7 @@
             RCUserInfo *user = [[RCIM sharedRCIM] getGroupUserInfoCache:model.senderUserId withGroupId:self.targetId];
             NSDictionary *extraDic = [user.extra mj_JSONObject];
             
-            if ([[extraDic stringValueForKey:@"role"] isEqualToString:@"TEACHER"]) {
+            if ([[extraDic ks_stringValueForKey:@"role"] isEqualToString:@"TEACHER"]) {
                 KSGroupTagImageView *avatarImage = [[KSGroupTagImageView alloc] initWithImage:[UIImage imageNamed:@"chat_talentTag"]];
                 [contentView addSubview:avatarImage];
                 [avatarImage mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -526,7 +526,7 @@
             RCMessageModel *model = self.conversationDataRepository[indexPath.row];
             RCUserInfo *user = [[RCIM sharedRCIM] getUserInfoCache:model.senderUserId];
             NSDictionary *extraDic = [user.extra mj_JSONObject];
-            if ([[extraDic stringValueForKey:@"role"] isEqualToString:@"TEACHER"]) {
+            if ([[extraDic ks_stringValueForKey:@"role"] isEqualToString:@"TEACHER"]) {
                 KSGroupTagImageView *avatarImage = [[KSGroupTagImageView alloc] initWithImage:[UIImage imageNamed:@"chat_talentTag"]];
                 [contentView addSubview:avatarImage];
                 [avatarImage mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -828,7 +828,7 @@
             RCUserInfo *user = [[RCIM sharedRCIM] getUserInfoCache:userId];
             
             NSDictionary *extraDic = [user.extra mj_JSONObject];
-            if ([[extraDic stringValueForKey:@"role"] isEqualToString:@"STUDENT"]) {
+            if ([[extraDic ks_stringValueForKey:@"role"] isEqualToString:@"STUDENT"]) {
                 [self displayStudent:userId];
             }
             else {
@@ -838,7 +838,7 @@
         else {
             RCUserInfo *user = [[RCIM sharedRCIM] getGroupUserInfoCache:userId withGroupId:self.targetId];
             NSDictionary *extraDic = [user.extra mj_JSONObject];
-            if ([[extraDic stringValueForKey:@"role"] isEqualToString:@"STUDENT"]) {
+            if ([[extraDic ks_stringValueForKey:@"role"] isEqualToString:@"STUDENT"]) {
                 [self displayStudent:userId];
             }
             else {

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

@@ -257,7 +257,7 @@
         UIView *contentView = (UIView *)((RCConversationCell *)cell).contentView;
         RCUserInfo *user = [[RCIM sharedRCIM] getUserInfoCache:model.targetId];
         NSDictionary *extraDic = [user.extra mj_JSONObject];
-        if ([[extraDic stringValueForKey:@"role"] isEqualToString:@"TEACHER"]) {
+        if ([[extraDic ks_stringValueForKey:@"role"] isEqualToString:@"TEACHER"]) {
             KSChatTagView *avatarImage = [[KSChatTagView alloc] initWithImage:[UIImage imageNamed:@"chat_talentList"]];
             [contentView addSubview:avatarImage];
             [avatarImage mas_makeConstraints:^(MASConstraintMaker *make) {

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatUserDetailViewController.m

@@ -94,8 +94,8 @@
 - (void)requestUserMessage {
     [self showhud];
     [KSNetworkingManager queryUserById:KS_GET rongCloudUserId:self.rongCloudId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            self.userInfo = [[ChatUserInfo alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            self.userInfo = [[ChatUserInfo alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             [self requestRecentPractice];
         }
         else {
@@ -112,8 +112,8 @@
     [KSNetworkingManager queryUserRecentRequest:KS_GET userId:[NSString stringWithFormat:@"%.0f",self.userInfo.userId] success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
         NSLog(@"%@", [dic mj_JSONString]);
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             [self evaluateSource:sourceArray];
         }
         else {

+ 3 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupApplyViewController.m

@@ -71,7 +71,7 @@
     NSString *audioIds = [memberIdArray componentsJoinedByString:@","];
     [self showhud];
     [KSNetworkingManager imGroupMemberAuditRequest:KS_POST groupId:self.groupId auditStatus:isApprove auditIds:audioIds success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             MJWeakSelf;
             [self KSShowMsg:@"操作成功" promptCompletion:^{
                 if (weakSelf.isChooseAll) {
@@ -145,8 +145,8 @@
 }
 - (void)requestData {
     [KSNetworkingManager imGroupMemberAuditListRequest:KS_POST groupId:self.groupId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [dic arrayValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [dic ks_arrayValueForKey:@"data"];
             
             for (NSDictionary *parm in sourceArray) {
                 ApplyMemberModel *model = [[ApplyMemberModel alloc] initWithDictionary:parm];

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupMemberViewController.m

@@ -45,8 +45,8 @@
 - (void)requestData {
     [self.sourceArray removeAllObjects];
     [KSNetworkingManager imGroupMemberAllRequest:KS_POST groupId:self.groupId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [dic arrayValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [dic ks_arrayValueForKey:@"data"];
             for (NSDictionary *parm in sourceArray) {
                 if ([parm isKindOfClass:[NSNull class]]) {
                     continue;

+ 7 - 7
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupSettingViewController.m

@@ -72,8 +72,8 @@
 
 - (void)requestApplyMember {
     [KSNetworkingManager imGroupMemberAuditListRequest:KS_POST groupId:self.groupId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [dic arrayValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [dic ks_arrayValueForKey:@"data"];
             self.applyCount = sourceArray.count;
             self.bodyView.applyMember = self.applyCount;
         }
@@ -91,8 +91,8 @@
 
 - (void)requestData {
     [KSNetworkingManager queryGroupDetail:KS_POST groupId:self.groupId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *subDic = [dic dictionaryValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *subDic = [dic ks_dictionaryValueForKey:@"data"];
             self.sourceModel = [[GroupListModel alloc] initWithDictionary:subDic];
             [self refreshUI];
         }
@@ -107,8 +107,8 @@
 - (void)getGroupStudent {
     [self.sourceArray removeAllObjects];
     [KSNetworkingManager imGroupMemberAllRequest:KS_POST groupId:self.groupId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [dic arrayValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [dic ks_arrayValueForKey:@"data"];
             for (NSDictionary *parm in sourceArray) {
                 GroupMemberModel *model = [[GroupMemberModel alloc] initWithDictionary:parm];
                 [self.sourceArray addObject:model];
@@ -243,7 +243,7 @@
 - (void)dismissGroup {
     
     [KSNetworkingManager imGroupDismiss:KS_POST groupId:self.groupId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             MJWeakSelf;
             [self KSShowMsg:@"群已解散" promptCompletion:^{
                 [[RCIMClient sharedRCIMClient] removeConversation:ConversationType_GROUP targetId:self.groupId];

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

@@ -89,7 +89,7 @@
     
     [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"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             MJWeakSelf;
             [self KSShowMsg:@"已收到您的投诉,我们会认真审核并处理" promptCompletion:^{
                 [weakSelf.navigationController popViewControllerAnimated:YES];

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/GroupNotice/Controller/GroupNoticeEditController.m

@@ -55,7 +55,7 @@
         [self showhud];
         [KSNetworkingManager imGroupNoticeUpdateRequest:KS_POST groupId:self.groupId title:title content:content isTop:[NSString stringWithFormat:@"%d",self.bodyView.isOn] noticeID:self.noticeID success:^(NSDictionary * _Nonnull dic) {
             [self removehub];
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
                 MJWeakSelf;
                 [self KSShowMsg:@"修改成功" promptCompletion:^{
                     [weakSelf.navigationController popViewControllerAnimated:YES];
@@ -74,7 +74,7 @@
         [self showhud];
         [KSNetworkingManager imGroupNoticeCreateRequest:KS_POST groupId:self.groupId title:title content:content isTop:[NSString stringWithFormat:@"%d",self.bodyView.isOn] success:^(NSDictionary * _Nonnull dic) {
             [self removehub];
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
                 MJWeakSelf;
                 [self KSShowMsg:@"设置成功" promptCompletion:^{
                     [weakSelf.navigationController popViewControllerAnimated:YES];

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/GroupNotice/Controller/GroupNoticeViewController.m

@@ -88,9 +88,9 @@
     [KSNetworkingManager queryNoticeListRequest:KS_POST groupId:self.groupId page:[NSString stringWithFormat:@"%zd", self.pages] rows:[NSString stringWithFormat:@"%zd", self.rows] success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             // 赋值
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             for (NSDictionary *parm in sourceArray) {
                 GroupNoticeModel *model = [[GroupNoticeModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];
@@ -164,7 +164,7 @@
     [self showhud];
     [KSNetworkingManager imGroupNoticeDelRequest:KS_POST noticeID:[NSString stringWithFormat:@"%.0f",model.internalBaseClassIdentifier] success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             MJWeakSelf;
             [self KSShowMsg:@"删除成功" promptCompletion:^{
                 [weakSelf resetParamenter];
@@ -219,7 +219,7 @@
     [self showhud];
     [KSNetworkingManager imGroupNoticeUpdateRequest:KS_POST groupId:self.groupId title:model.title content:model.content isTop:isTop noticeID:[NSString stringWithFormat:@"%.0f",model.internalBaseClassIdentifier] success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self resetParamenter];
             [self requestData];
         }

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/KSChatLiveMessage.m

@@ -43,10 +43,10 @@
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json == nil) return;
     
-    self.roomUID = [json stringValueForKey:@"roomUID"];
-    self.teacherAvatar = [json stringValueForKey:@"teacherAvatar"];
-    self.teacherName = [json stringValueForKey:@"teacherName"];
-    self.liveDescMessage = [json stringValueForKey:@"liveDescMessage"];
+    self.roomUID = [json ks_stringValueForKey:@"roomUID"];
+    self.teacherAvatar = [json ks_stringValueForKey:@"teacherAvatar"];
+    self.teacherName = [json ks_stringValueForKey:@"teacherName"];
+    self.liveDescMessage = [json ks_stringValueForKey:@"liveDescMessage"];
     
 }
 

+ 7 - 7
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/KSChatMusicMessage.m

@@ -61,13 +61,13 @@
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json == nil) return;
     
-    self.songName = [json stringValueForKey:@"songName"];
-    self.teacherAvatar = [json stringValueForKey:@"teacherAvatar"];
-    self.teacherName = [json stringValueForKey:@"teacherName"];
-    self.chargeType = [json stringValueForKey:@"chargeType"];
-    self.songAuth = [json stringValueForKey:@"songAuth"];
-    self.musicTagNames = [json stringValueForKey:@"musicTagNames"];
-    self.songId = [json stringValueForKey:@"songId"];
+    self.songName = [json ks_stringValueForKey:@"songName"];
+    self.teacherAvatar = [json ks_stringValueForKey:@"teacherAvatar"];
+    self.teacherName = [json ks_stringValueForKey:@"teacherName"];
+    self.chargeType = [json ks_stringValueForKey:@"chargeType"];
+    self.songAuth = [json ks_stringValueForKey:@"songAuth"];
+    self.musicTagNames = [json ks_stringValueForKey:@"musicTagNames"];
+    self.songId = [json ks_stringValueForKey:@"songId"];
 }
 
 + (NSString *)getObjectName {

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/Controller/ShareMusicViewController.m

@@ -130,8 +130,8 @@
     [KSNetworkingManager musicListRequest:KS_POST auditStatus:@"PASS" page:self.pages rows:self.rows search:self.searchKey subjectIds:@"" success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             for (NSDictionary *parm in sourceArray) {
                 MusicMessageModel *model = [[MusicMessageModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ChatAddressBodyView.m

@@ -93,8 +93,8 @@
         [MBProgressHUD ksShowHUDWithText:@"数据加载中......"];
         [KSNetworkingManager imUserFriendRequest:KS_POST search:self.searchKey success:^(NSDictionary * _Nonnull dic) {
             [self endRefresh];
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSArray *array = [dic arrayValueForKey:@"data"];
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+                NSArray *array = [dic ks_arrayValueForKey:@"data"];
                 for (NSDictionary *parm in array) {
                     if ([parm isKindOfClass:[NSNull class]]) {
                         continue;
@@ -126,8 +126,8 @@
     else {
         [KSNetworkingManager imGroupQueryPage:KS_POST search:self.searchKey success:^(NSDictionary * _Nonnull dic) {
             [self endRefresh];
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSArray *array = [dic arrayValueForKey:@"data"];
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+                NSArray *array = [dic ks_arrayValueForKey:@"data"];
                 for (NSDictionary *parm in array) {
                     GroupListModel *model = [[GroupListModel alloc] initWithDictionary:parm];
                     [self.classArray addObject:model];

+ 7 - 7
KulexiuForTeacher/KulexiuForTeacher/Module/Classroom/ClassroomSong/MusicScoreViewController.m

@@ -102,8 +102,8 @@
 //    [self showhud];
 //    [KSRequestManager resourceRepositoryQuery:KS_GET subjectId:self.subjectId success:^(NSDictionary * _Nonnull dic) {
 //        [self removehub];
-//        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-//            NSArray *sourceArray = [dic arrayValueForKey:@"data"];
+//        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+//            NSArray *sourceArray = [dic ks_arrayValueForKey:@"data"];
 //            [self configSourceArray:sourceArray nodeIndex:0];
 //            [self evaluateSource];
 //        }
@@ -119,7 +119,7 @@
 - (void)evaluateSource {
     NSMutableArray *modelArray = [NSMutableArray array];
     for (NSDictionary *dic in self.nodeArray) {
-        BOOL hasSubNode = [dic boolValueForKey:@"hasSubNode"];
+        BOOL hasSubNode = [dic ks_boolValueForKey:@"hasSubNode"];
         YKNodeModel *node  = [YKNodeModel nodeWithParentID:dic[@"parentID"]
                                                       name:dic[@"name"]
                                                 childrenID:dic[@"ID"]
@@ -163,13 +163,13 @@
         NSDictionary *subDic = sourceArray[i];
         NSMutableDictionary *nodeDic = [NSMutableDictionary dictionary];
         [nodeDic setValue:parentID forKey:@"parentID"];
-        [nodeDic setValue:[subDic stringValueForKey:@"name"] forKey:@"name"];
+        [nodeDic setValue:[subDic ks_stringValueForKey:@"name"] forKey:@"name"];
         [nodeDic setValue:currentID forKey:@"ID"];
-        [nodeDic setValue:[subDic stringValueForKey:@"url"] forKey:@"url"];
+        [nodeDic setValue:[subDic ks_stringValueForKey:@"url"] forKey:@"url"];
         
         
-        if ([subDic arrayValueForKey:@"repositories"].count > 0) {
-            NSArray *array = [subDic arrayValueForKey:@"repositories"];
+        if ([subDic ks_arrayValueForKey:@"repositories"].count > 0) {
+            NSArray *array = [subDic ks_arrayValueForKey:@"repositories"];
             [self configSourceArray:array nodeIndex:[currentID integerValue]];
             [nodeDic setValue:[NSNumber numberWithBool:YES] forKey:@"hasSubNode"];
         }

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Classroom/View/CoursewarePlayView/CourseWarePreviewView.m

@@ -101,7 +101,7 @@
     if (self.callback) {
         NSString *url = self.imageUrlArray[self.chooseIndex];
         NSDictionary *dic = self.sizeArray[self.chooseIndex];
-        CGSize size = CGSizeMake([dic floatValueForKey:@"width"], [dic floatValueForKey:@"height"]);
+        CGSize size = CGSizeMake([dic ks_floatValueForKey:@"width"], [dic ks_floatValueForKey:@"height"]);
         self.callback(url, size);
     }
     [self hideView];

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Classroom/View/CoursewareView/CoursewareAlertView.m

@@ -125,8 +125,8 @@
     [KSNetworkingManager courseCoursewareRequest:KS_POST status:1 searchKey:self.searchKey page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
         [LOADING_MANAGER removeHUD];
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *dataArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *dataArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             for (NSDictionary *parm in dataArray) {
                 CoursewareListModel *model = [[CoursewareListModel alloc] initWithDictionary:parm];
                 [self.sourceArray addObject:model];

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

@@ -72,10 +72,10 @@
 
 - (void)requestRoomConfig {
     [KSNetworkingManager selectRoomConfigRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-            self.joinRoomBeforeTime = [result integerValueForKey:@"practiceStartTime"];
-            self.quitRomeEndTime = [result integerValueForKey:@"practiceEndTime"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
+            self.joinRoomBeforeTime = [result ks_integerValueForKey:@"practiceStartTime"];
+            self.quitRomeEndTime = [result ks_integerValueForKey:@"practiceEndTime"];
         }
         else {
             [self MBPShow:MESSAGEKEY];
@@ -87,8 +87,8 @@
 
 - (void)requestHomeworkMessage {
     [KSNetworkingManager homeworkDetailRequest:KS_GET courseId:self.courseId studentId:self.studentId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            self.homeworkModel = [[HomeworkDetailModel alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            self.homeworkModel = [[HomeworkDetailModel alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             if (self.homeworkModel.submitHomework == 1) {
                 if (![NSString isEmptyString:self.homeworkModel.studentAttachments]) {
                     self.fileArray = [NSMutableArray arrayWithArray:[self.homeworkModel.studentAttachments componentsSeparatedByString:@","]];
@@ -112,8 +112,8 @@
 
 - (void)requestEvaluateMessage {
     [KSNetworkingManager selectRepliedRequest:KS_POST courseGroupId:self.courseGroupId courseScheduleId:self.courseId studentId:self.studentId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            self.evaluateModel = [[EvaluateDetailModel alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            self.evaluateModel = [[EvaluateDetailModel alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
         }
         else {
             [self MBPShow:MESSAGEKEY];
@@ -261,7 +261,7 @@
     [self showhud];
     [KSNetworkingManager teacherCourseRepliedRequest:KS_POST courseScheduleId:self.courseId courseGroupId:self.courseGroupId studentId:self.studentId teacherReplied:content success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self MBPShow:@"评价成功"];
             [self requestCourseInfoMessage];
         }
@@ -293,7 +293,7 @@
     [self showhud];
     [KSNetworkingManager homeworkDecorateRequest:KS_POST content:homeworkContent courseScheduleId:self.courseId success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self MBPShow:@"布置成功"];
             [self requestCourseInfoMessage];
         }
@@ -330,7 +330,7 @@
     [self showhud];
     [KSNetworkingManager homeworkReviewRequest:KS_POST courseScheduleId:self.courseId studentId:self.studentId review:commentMessage success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self MBPShow:@"点评成功"];
             [self requestCourseInfoMessage];
         }

+ 18 - 18
KulexiuForTeacher/KulexiuForTeacher/Module/Course/Controller/CourseViewController.m

@@ -104,17 +104,17 @@
 
 - (void)requestAdjustConfig {
     [KSNetworkingManager queryCourseAdjustTimeLimit:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *result = [dic arrayValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *result = [dic ks_arrayValueForKey:@"data"];
             for (NSDictionary *parm in result) {
-                if ([[parm stringValueForKey:@"paramName"] isEqualToString:@"course_start_setting"]) { // 开始时间
-                    NSString *begTime = [parm stringValueForKey:@"paramValue"];
+                if ([[parm ks_stringValueForKey:@"paramName"] isEqualToString:@"course_start_setting"]) { // 开始时间
+                    NSString *begTime = [parm ks_stringValueForKey:@"paramValue"];
                     if (![NSString isEmptyString:begTime]) {
                         self.adjustBeginTime = [NSString stringWithFormat:@"%@",begTime];
                     }
                 }
-                else if ([[parm stringValueForKey:@"paramName"] isEqualToString:@"course_end_setting"]) { // 结束时间
-                    NSString *endTime = [parm stringValueForKey:@"paramValue"];
+                else if ([[parm ks_stringValueForKey:@"paramName"] isEqualToString:@"course_end_setting"]) { // 结束时间
+                    NSString *endTime = [parm ks_stringValueForKey:@"paramValue"];
                     if (![NSString isEmptyString:endTime]) {
                         self.adjustEndTime = [NSString stringWithFormat:@"%@",endTime];
                     }
@@ -333,8 +333,8 @@
 - (void)loadMonthCourse:(NSString *)month {
     [KSNetworkingManager queryCourseSchedule:KS_POST classMonth:month success:^(NSDictionary * _Nonnull dic) {
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *courseArray = [dic arrayValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *courseArray = [dic ks_arrayValueForKey:@"data"];
             NSMutableArray *courseDateArray = [NSMutableArray array];
             for (NSString *dateString in courseArray) {
                 NSString *dateStr = [NSString stringWithFormat:@"%@ %@", dateString, @"00:00:00"];
@@ -356,17 +356,17 @@
     [self showhud];
     [KSNetworkingManager queryCourseForDay:KS_POST classDate:date success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             // 配置信息
-            NSDictionary *config = [[dic dictionaryValueForKey:@"data"] dictionaryValueForKey:@"sysConfig"];
-            self.practiceStartTime = [config integerValueForKey:@"practiceStartTime"];
-            self.practiceEndTime = [config integerValueForKey:@"practiceEndTime"];
-            self.liveStartTime = [config integerValueForKey:@"liveStartTime"];
-            self.liveEndTime = [config integerValueForKey:@"liveEndTime"];
-            self.pianoStartTime = [config integerValueForKey:@"pianoStartTime"];
-            self.pianoEndTime = [config integerValueForKey:@"pianoEndTime"];
+            NSDictionary *config = [[dic ks_dictionaryValueForKey:@"data"] ks_dictionaryValueForKey:@"sysConfig"];
+            self.practiceStartTime = [config ks_integerValueForKey:@"practiceStartTime"];
+            self.practiceEndTime = [config ks_integerValueForKey:@"practiceEndTime"];
+            self.liveStartTime = [config ks_integerValueForKey:@"liveStartTime"];
+            self.liveEndTime = [config ks_integerValueForKey:@"liveEndTime"];
+            self.pianoStartTime = [config ks_integerValueForKey:@"pianoStartTime"];
+            self.pianoEndTime = [config ks_integerValueForKey:@"pianoEndTime"];
             
-            NSArray *courseArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"studentList"];
+            NSArray *courseArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"studentList"];
             NSMutableArray *lessonArray = [NSMutableArray array];
             for (NSDictionary *parm in courseArray) {
                 TableCourseModel *model = [[TableCourseModel alloc] initWithDictionary:parm];
@@ -552,7 +552,7 @@
     [self showhud];
     [KSNetworkingManager courseAdjustRequst:KS_POST courseId:model.courseId classDate:classDate startTime:chooseTime endTime:endTime success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             MJWeakSelf;
             [self KSShowMsg:@"调整成功" promptCompletion:^{
                 [weakSelf loadMonthCourse:weakSelf.chooseMonth];

+ 7 - 7
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Controller/MusicRoomViewController.m

@@ -71,10 +71,10 @@
 
 - (void)requestRoomConfig {
     [KSNetworkingManager selectRoomConfigRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-            self.joinRoomBeforeTime = [result integerValueForKey:@"pianoStartTime"];
-            self.quitRomeEndTime = [result integerValueForKey:@"pianoEndTime"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
+            self.joinRoomBeforeTime = [result ks_integerValueForKey:@"pianoStartTime"];
+            self.quitRomeEndTime = [result ks_integerValueForKey:@"pianoEndTime"];
         }
         else {
             [self MBPShow:MESSAGEKEY];
@@ -88,8 +88,8 @@
     [self showhud];
     [KSNetworkingManager musicRoomDetailRequest:KS_POST courseId:self.courseId success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            self.detailModel = [[MusicRoomDetailModel alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            self.detailModel = [[MusicRoomDetailModel alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             self.studentArray = [NSMutableArray arrayWithArray:self.detailModel.studentHomeworkList.records];
             [self evaluateBottomButtonStatus];
         }
@@ -210,7 +210,7 @@
     [self showhud];
     [KSNetworkingManager homeworkDecorateRequest:KS_POST content:homeworkContent courseScheduleId:self.courseId success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self MBPShow:@"布置成功"];
             [self requestCourseInfoMessage];
         }

+ 31 - 31
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m

@@ -147,8 +147,8 @@
 
 - (void)requestUserInfo {
     [KSNetworkingManager queryTeacherInfoRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            self.mineInfo = [[TeacherInfo alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            self.mineInfo = [[TeacherInfo alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             NSString *rongToken = UserDefault(RongTokenKey);
             if ([NSString isEmptyString:rongToken]) {
                 [USER_MANAGER queryUserInfoConnectRongCloud:YES];
@@ -169,8 +169,8 @@
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager checkReceiveRewardRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
         dispatch_group_leave(self.requestGroup);
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            BOOL isCheck = [[dic dictionaryValueForKey:@"data"] boolValueForKey:@"check"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            BOOL isCheck = [[dic ks_dictionaryValueForKey:@"data"] ks_boolValueForKey:@"check"];
             self.isCheck = isCheck;
         }
     } faliure:^(NSError * _Nonnull error) {
@@ -183,8 +183,8 @@
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager helpCenterContentListRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
         dispatch_group_leave(self.requestGroup);
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             if (sourceArray.count) {
                 NSDictionary *parm = [sourceArray firstObject];
                 NoticeSourceModel *bannerModel = [[NoticeSourceModel alloc] initWithDictionary:parm];
@@ -208,8 +208,8 @@
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager queryRecentLiveAndVideo:KS_GET success:^(NSDictionary * _Nonnull dic) {
         dispatch_group_leave(self.requestGroup);
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *parm = [[dic dictionaryValueForKey:@"data"] dictionaryValueForKey:@"recentCourses"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *parm = [[dic ks_dictionaryValueForKey:@"data"] ks_dictionaryValueForKey:@"recentCourses"];
             if (parm == nil) {
                 self.recentCourseModel = nil;
             }
@@ -291,7 +291,7 @@
     }
     // 如果今日已提示过,就不再提醒
     NSDictionary *awardAlertDic = UserDefaultObjectForKey(@"awardAlertTime");
-    NSString *awardAlertTime = [awardAlertDic stringValueForKey:@"time"];
+    NSString *awardAlertTime = [awardAlertDic ks_stringValueForKey:@"time"];
     NSDate *currendDate = [NSDate date];
     NSDateFormatter *dateFormatter = [NSObject getDateformatter];
     [dateFormatter setDateFormat:@"yyyy-MM-dd"];
@@ -299,7 +299,7 @@
     
     if (![NSString isEmptyString:awardAlertTime]) {
         
-        NSString *userId = [awardAlertDic stringValueForKey:@"userId"];
+        NSString *userId = [awardAlertDic ks_stringValueForKey:@"userId"];
         if ([todayString isEqualToString:awardAlertTime] && [userId isEqualToString:UserDefaultObjectForKey(UIDKey)]) {
             return;
         }
@@ -406,10 +406,10 @@
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager homeButtonList:KS_POST version:[USER_MANAGER getCurrentVersion] success:^(NSDictionary * _Nonnull dic) {
         dispatch_group_leave(self.requestGroup);
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *result = [dic dictionaryValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
             // banner
-            NSArray *bannerArray = [result arrayValueForKey:@"banner"];
+            NSArray *bannerArray = [result ks_arrayValueForKey:@"banner"];
             NSMutableArray *bannerInfoArray = [NSMutableArray array];
             for (NSDictionary *parm in bannerArray) {
                 HomeMessageModel *model = [[HomeMessageModel alloc] initWithDictionary:parm];
@@ -418,7 +418,7 @@
             self.bannerArray = [NSMutableArray arrayWithArray:bannerInfoArray];
             
             // button
-            NSArray *buttonArray = [result arrayValueForKey:@"appMenu"];
+            NSArray *buttonArray = [result ks_arrayValueForKey:@"appMenu"];
             NSMutableArray *buttonInfoArray = [NSMutableArray array];
             for (NSDictionary *parm in buttonArray) {
                 HomeMessageModel *model = [[HomeMessageModel alloc] initWithDictionary:parm];
@@ -427,7 +427,7 @@
             self.buttonArray = [NSMutableArray arrayWithArray:buttonInfoArray];
             
             // 首页悬浮按钮
-            NSArray *suspensionArray = [result arrayValueForKey:@"suspension"];
+            NSArray *suspensionArray = [result ks_arrayValueForKey:@"suspension"];
             if (suspensionArray.count) {
                 self.buttonModel = [[HomeMessageModel alloc] initWithDictionary:[suspensionArray firstObject]];
             }
@@ -514,8 +514,8 @@
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager HomeHotAlbumRequest:KS_POST version:[USER_MANAGER getCurrentVersion] subjectIds:self.mineInfo.defaultSubject success:^(NSDictionary * _Nonnull dic) {
         dispatch_group_leave(self.requestGroup);
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             NSMutableArray *albumArray = [NSMutableArray array];
             for (NSDictionary *parm in sourceArray) {
                 HomeAlbumModel *model = [[HomeAlbumModel alloc] initWithDictionary:parm];
@@ -550,9 +550,9 @@
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager homeAppMusicSheetRequest:KS_POST version:[USER_MANAGER getCurrentVersion] subjectIds:self.mineInfo.defaultSubject success:^(NSDictionary * _Nonnull dic) {
         dispatch_group_leave(self.requestGroup);
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-            NSArray *hotMusicSheet = [result arrayValueForKey:@"hotMusicSheet"]; // 最热曲目
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
+            NSArray *hotMusicSheet = [result ks_arrayValueForKey:@"hotMusicSheet"]; // 最热曲目
             NSMutableArray *hotArray = [NSMutableArray array];
             for (NSDictionary *parm in hotMusicSheet) {
                 HomeMusicModel *model = [[HomeMusicModel alloc] initWithDictionary:parm];
@@ -560,7 +560,7 @@
             }
             self.dataArray = [NSMutableArray arrayWithArray:hotArray];
             
-            NSArray *newMusicSheet = [result arrayValueForKey:@"newMusicSheet"]; // 最新曲目
+            NSArray *newMusicSheet = [result ks_arrayValueForKey:@"newMusicSheet"]; // 最新曲目
             NSMutableArray *newMusicArray = [NSMutableArray array];
             for (NSDictionary *parm in newMusicSheet) {
                 HomeMusicModel *model = [[HomeMusicModel alloc] initWithDictionary:parm];
@@ -568,7 +568,7 @@
             }
             self.newestMusicArray = [NSMutableArray arrayWithArray:newMusicArray];
             
-            NSArray *topMusicSheet = [result arrayValueForKey:@"topMusicSheet"]; // 推荐曲目
+            NSArray *topMusicSheet = [result ks_arrayValueForKey:@"topMusicSheet"]; // 推荐曲目
             NSMutableArray *topMusicArray = [NSMutableArray array];
             for (NSDictionary *parm in topMusicSheet) {
                 HomeMusicModel *model = [[HomeMusicModel alloc] initWithDictionary:parm];
@@ -796,16 +796,16 @@
 
 - (void)requestUnreadCount {
     [KSNetworkingManager queryCountOfUnreadRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *countArray = [dic arrayValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *countArray = [dic ks_arrayValueForKey:@"data"];
             NSInteger courseCount = 0;
             NSInteger sysCount = 0;
             for (NSDictionary *parm in countArray) {
-                if ([[parm stringValueForKey:@"key"] isEqualToString:@"COURSE"]) {
-                    courseCount = [parm integerValueForKey:@"value"];
+                if ([[parm ks_stringValueForKey:@"key"] isEqualToString:@"COURSE"]) {
+                    courseCount = [parm ks_integerValueForKey:@"value"];
                 }
-                if ([[parm stringValueForKey:@"key"] isEqualToString:@"SYSTEM"]) {
-                    sysCount = [parm integerValueForKey:@"value"];
+                if ([[parm ks_stringValueForKey:@"key"] isEqualToString:@"SYSTEM"]) {
+                    sysCount = [parm ks_integerValueForKey:@"value"];
                 }
             }
             if (courseCount != 0 || sysCount != 0) {
@@ -931,8 +931,8 @@
     MJWeakSelf;
     [ctrl chooseCallback:^(NSMutableArray * _Nullable chooseArray) {
         NSDictionary *parm = [chooseArray firstObject];
-        NSString *subjectId = [parm stringValueForKey:@"subjectId"];
-        NSString *subjectName = [parm stringValueForKey:@"subjectName"];
+        NSString *subjectId = [parm ks_stringValueForKey:@"subjectId"];
+        NSString *subjectName = [parm ks_stringValueForKey:@"subjectName"];
         weakSelf.headView.subjectLabel.text = subjectName;
         [weakSelf setDefaultSubject:subjectId];
     }];
@@ -944,7 +944,7 @@
     [self showhud];
     [KSNetworkingManager defaultSubjectRequest:KS_POST subjectId:subjectId success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             // 请求数据
             [self requestHomeMessage];
         }

+ 3 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Home/EvaluateCourse/Controller/EvaluateDetailViewController.m

@@ -47,8 +47,8 @@
     [KSNetworkingManager selectRepliedRequest:KS_POST courseGroupId:self.courseGroupId courseScheduleId:self.courseId studentId:self.studentId success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
         NSLog(@"%@- " , [dic mj_JSONString]);
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            self.detailModel = [[EvaluateDetailModel alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            self.detailModel = [[EvaluateDetailModel alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
         }
         else {
             
@@ -105,7 +105,7 @@
     [self showhud];
     [KSNetworkingManager teacherCourseRepliedRequest:KS_POST courseScheduleId:self.courseId courseGroupId:self.courseGroupId studentId:self.studentId teacherReplied:content success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self MBPShow:@"评价成功"];
             [self requestData];
         }

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/EvaluateCourse/View/EvaluateCourseBodyView.m

@@ -107,8 +107,8 @@
     NSInteger isEvaluate = self.selectIndex == 0 ? 0 : 1;
     [KSNetworkingManager courseRepliedListRequest:KS_POST classMonth:self.chooseDate replied:isEvaluate studentName:self.searchKey page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             for (NSDictionary *parm in sourceArray) {
                 EvaluateListModel *model = [[EvaluateListModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];

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

@@ -59,8 +59,8 @@
     [self showhud];
     [KSNetworkingManager homeworkDetailRequest:KS_GET courseId:self.courseId studentId:self.studentId  success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            self.detailModel = [[HomeworkDetailModel alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            self.detailModel = [[HomeworkDetailModel alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             [self evaluateViewDisplay];
         }
         else {
@@ -177,7 +177,7 @@
     [self showhud];
     [KSNetworkingManager homeworkReviewRequest:KS_POST courseScheduleId:self.courseId studentId:self.studentId review:evaluateContent success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self MBPShow:@"点评成功"];
             [self requestCourseMessage];
         }
@@ -193,7 +193,7 @@
     [self showhud];
     [KSNetworkingManager homeworkDecorateRequest:KS_POST content:homeworkContent courseScheduleId:self.courseId success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self MBPShow:@"布置成功"];
             [self requestCourseMessage];
         }

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/MusicRoomHomeworkStudentController.m

@@ -48,8 +48,8 @@
     [self showhud];
     [KSNetworkingManager musicRoomDetailRequest:KS_POST courseId:self.courseId success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            self.detailModel = [[MusicRoomDetailModel alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            self.detailModel = [[MusicRoomDetailModel alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             self.studentArray = [NSMutableArray arrayWithArray:self.detailModel.studentHomeworkList.records];
         }
         else {

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/View/HomeworkBodyView.m

@@ -108,8 +108,8 @@
     NSInteger decorate = self.selectIndex == 0 ? 0 : 1;
     [KSNetworkingManager homeworkListRequest:KS_POST date:self.chooseDate decorate:decorate page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             for (NSDictionary *parm in sourceArray) {
                 HomeworkListModel *model = [[HomeworkListModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];

+ 6 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/FreezeListViewController.m

@@ -113,8 +113,8 @@
 
 - (void)requestAccountDetail {
     [KSNetworkingManager teacherAccountDetail:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            double freezeAmount = [[dic dictionaryValueForKey:@"data"] doubleValueForKey:@"amountFrozen"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            double freezeAmount = [[dic ks_dictionaryValueForKey:@"data"] ks_doubleValueForKey:@"amountFrozen"];
             self.headView.moneyLabel.text = [NSString formatMoneyDoubleNum:freezeAmount];
         }
         else {
@@ -132,8 +132,8 @@
     [KSNetworkingManager userAccountPageRequest:KS_POST paymentStatus:@"OUT" searchDate:self.searchDate bizType:self.bizType postStatus:@"FROZEN" page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             
             for (NSDictionary *parm in sourceArray) {
                 IncomeListModel *model = [[IncomeListModel alloc] initWithDictionary:parm];
@@ -228,7 +228,7 @@
         {
             NSMutableArray *nameArray = [NSMutableArray array];
             for (NSDictionary *parm in self.sortArray) {
-                [nameArray addObject:[parm stringValueForKey:@"name"]];
+                [nameArray addObject:[parm ks_stringValueForKey:@"name"]];
             }
             MJWeakSelf;
             KSChoosePicker *picker = [[KSChoosePicker alloc] initWithTitle:@"" sourceData:nameArray chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
@@ -239,7 +239,7 @@
                 else {
                     weakSelf.headView.typeLabel.text = returnValue;
                     NSDictionary *parm = self.sortArray[chooseIndex];
-                    weakSelf.bizType = [parm stringValueForKey:@"bizType"];
+                    weakSelf.bizType = [parm ks_stringValueForKey:@"bizType"];
                 }
                 self.headView.secondArrowUp = NO;
                 [weakSelf refreshAndRequestData];

+ 18 - 18
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/IncomeCountViewController.m

@@ -133,10 +133,10 @@
     [self showhud];
     [KSNetworkingManager accountTotalRequest:KS_POST dateTime:self.chooseDate timeType:timeType success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *returnValue = [dic dictionaryValueForKey:@"data"];
-            self.topView.totalSalary.text = [NSString formatMoneyDoubleNum:[returnValue floatValueForKey:@"totalInAmount"]];
-            NSArray *sourceArray = [returnValue arrayValueForKey:@"infoList"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *returnValue = [dic ks_dictionaryValueForKey:@"data"];
+            self.topView.totalSalary.text = [NSString formatMoneyDoubleNum:[returnValue ks_floatValueForKey:@"totalInAmount"]];
+            NSArray *sourceArray = [returnValue ks_arrayValueForKey:@"infoList"];
             if (sourceArray != nil && sourceArray.count > 0) {
                 [self showEmptyView:NO];
                 if (self.hasLoad) {
@@ -165,38 +165,38 @@
     NSMutableArray *descArray = [NSMutableArray array];
     NSMutableArray *amountArray = [NSMutableArray array];
     NSMutableArray *rateArray = [NSMutableArray array];
-    float practiceAmount = [parmDic floatValueForKey:@"practiceAmount"];
+    float practiceAmount = [parmDic ks_floatValueForKey:@"practiceAmount"];
     NSString *practiceDescString = @"陪练课";
     [descArray addObject:practiceDescString];
     [amountArray addObject:[NSString stringWithFormat:@"%.2f",practiceAmount]];
     
-    float liveAmount = [parmDic floatValueForKey:@"liveAmount"];
+    float liveAmount = [parmDic ks_floatValueForKey:@"liveAmount"];
     NSString *liveDesc = @"直播课";
     [descArray addObject:liveDesc];
     [amountArray addObject:[NSString stringWithFormat:@"%.2f",liveAmount]];
     
-    float videoAmount = [parmDic floatValueForKey:@"videoAmount"];
+    float videoAmount = [parmDic ks_floatValueForKey:@"videoAmount"];
     NSString *videoDesc = @"视频课";
     [descArray addObject:videoDesc];
     [amountArray addObject:[NSString stringWithFormat:@"%.2f",videoAmount]];
     
-    float musicAmount = [parmDic floatValueForKey:@"musicAmount"];
+    float musicAmount = [parmDic ks_floatValueForKey:@"musicAmount"];
     NSString *musicDesc = @"乐谱";
     [descArray addObject:musicDesc];
     [amountArray addObject:[NSString stringWithFormat:@"%.2f",musicAmount]];
     
     [self.topView configSource:descArray amountArray:amountArray];
     
-    float practiceRate = [parmDic floatValueForKey:@"practiceRate"];
+    float practiceRate = [parmDic ks_floatValueForKey:@"practiceRate"];
     [rateArray addObject:[NSString stringWithFormat:@"%.2f",practiceRate]];
     
-    float liveRate = [parmDic floatValueForKey:@"liveRate"];
+    float liveRate = [parmDic ks_floatValueForKey:@"liveRate"];
     [rateArray addObject:[NSString stringWithFormat:@"%.2f",liveRate]];
     
-    float videoRate = [parmDic floatValueForKey:@"videoRate"];
+    float videoRate = [parmDic ks_floatValueForKey:@"videoRate"];
     [rateArray addObject:[NSString stringWithFormat:@"%.2f",videoRate]];
     
-    float musicRate = [parmDic floatValueForKey:@"musicRate"];
+    float musicRate = [parmDic ks_floatValueForKey:@"musicRate"];
     [rateArray addObject:[NSString stringWithFormat:@"%.2f",musicRate]];
     
     NSArray *colorArray = @[@"#5B8FF9",
@@ -222,22 +222,22 @@
     NSMutableArray *musicAmountArray = [NSMutableArray array];
     for (NSDictionary *dic in source) {
         
-        float practiceAmount = [dic floatValueForKey:@"practiceAmount"];
+        float practiceAmount = [dic ks_floatValueForKey:@"practiceAmount"];
         NSString *practiceDescString = @"陪练课";
         [practiceAmountArray addObject:[NSString stringWithFormat:@"%.2f",practiceAmount]];
         [practiceArray addObject:practiceDescString];
         
-        float liveAmount = [dic floatValueForKey:@"liveAmount"];
+        float liveAmount = [dic ks_floatValueForKey:@"liveAmount"];
         NSString *liveDesc = @"直播课";
         [liveAmountArray addObject:[NSString stringWithFormat:@"%.2f",liveAmount]];
         [liveArray addObject:liveDesc];
         
-        float videoAmount = [dic floatValueForKey:@"videoAmount"];
+        float videoAmount = [dic ks_floatValueForKey:@"videoAmount"];
         NSString *videoDesc = @"视频课";
         [videoAmountArray addObject:[NSString stringWithFormat:@"%.2f",videoAmount]];
         [videoArray addObject:videoDesc];
         
-        float musicAmount = [dic floatValueForKey:@"musicAmount"];
+        float musicAmount = [dic ks_floatValueForKey:@"musicAmount"];
         NSString *musicDesc = @"乐谱";
         [musicAmountArray addObject:[NSString stringWithFormat:@"%.2f",musicAmount]];
         [musicArray addObject:musicDesc];
@@ -251,10 +251,10 @@
     for (NSDictionary *dic in source) {
         NSString *bottomValue = @"";
         if (_isYear) {
-            bottomValue = [NSString stringWithFormat:@"%@月",[[[dic stringValueForKey:@"timeStr"] componentsSeparatedByString:@"-"] lastObject]];
+            bottomValue = [NSString stringWithFormat:@"%@月",[[[dic ks_stringValueForKey:@"timeStr"] componentsSeparatedByString:@"-"] lastObject]];
         }
         else {
-            bottomValue = [NSString stringWithFormat:@"%@日",[[[dic stringValueForKey:@"timeStr"] componentsSeparatedByString:@"-"] lastObject]];
+            bottomValue = [NSString stringWithFormat:@"%@日",[[[dic ks_stringValueForKey:@"timeStr"] componentsSeparatedByString:@"-"] lastObject]];
         }
         [keyArray addObject:bottomValue];
     }

+ 8 - 8
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/MyIncomeViewController.m

@@ -133,10 +133,10 @@
 
 - (void)requestAccountDetail {
     [KSNetworkingManager teacherAccountDetail:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            double amount = [[dic dictionaryValueForKey:@"data"] doubleValueForKey:@"amountUsable"];
-            double freezeAmount = [[dic dictionaryValueForKey:@"data"] doubleValueForKey:@"amountFrozen"];
-            double noRecordAmount = [[dic dictionaryValueForKey:@"data"] doubleValueForKey:@"amountUnrecorded"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            double amount = [[dic ks_dictionaryValueForKey:@"data"] ks_doubleValueForKey:@"amountUsable"];
+            double freezeAmount = [[dic ks_dictionaryValueForKey:@"data"] ks_doubleValueForKey:@"amountFrozen"];
+            double noRecordAmount = [[dic ks_dictionaryValueForKey:@"data"] ks_doubleValueForKey:@"amountUnrecorded"];
             self.headView.moneyLabel.text = [NSString formatMoneyDoubleNum:amount];
             self.headView.freezeAmount.text = [NSString formatMoneyDoubleNum:freezeAmount];
             self.headView.noRecordAmount.text = [NSString formatMoneyDoubleNum:noRecordAmount];
@@ -155,8 +155,8 @@
     [KSNetworkingManager userAccountPageRequest:KS_POST paymentStatus:@"IN" searchDate:self.searchDate bizType:self.bizType postStatus:@"RECORDED" page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             
             for (NSDictionary *parm in sourceArray) {
                 IncomeListModel *model = [[IncomeListModel alloc] initWithDictionary:parm];
@@ -249,7 +249,7 @@
         {
             NSMutableArray *nameArray = [NSMutableArray array];
             for (NSDictionary *parm in self.sortArray) {
-                [nameArray addObject:[parm stringValueForKey:@"name"]];
+                [nameArray addObject:[parm ks_stringValueForKey:@"name"]];
             }
             MJWeakSelf;
             KSChoosePicker *picker = [[KSChoosePicker alloc] initWithTitle:@"" sourceData:nameArray chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
@@ -260,7 +260,7 @@
                 else {
                     weakSelf.headView.typeLabel.text = returnValue;
                     NSDictionary *parm = self.sortArray[chooseIndex];
-                    weakSelf.bizType = [parm stringValueForKey:@"bizType"];
+                    weakSelf.bizType = [parm ks_stringValueForKey:@"bizType"];
                 }
                 self.headView.secondArrowUp = NO;
                 [weakSelf refreshAndRequestData];

+ 6 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/NoRecordViewController.m

@@ -114,8 +114,8 @@
 
 - (void)requestAccountDetail {
     [KSNetworkingManager teacherAccountDetail:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            double noRecordAmount = [[dic dictionaryValueForKey:@"data"] doubleValueForKey:@"amountUnrecorded"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            double noRecordAmount = [[dic ks_dictionaryValueForKey:@"data"] ks_doubleValueForKey:@"amountUnrecorded"];
             self.headView.moneyLabel.text = [NSString formatMoneyDoubleNum:noRecordAmount];
         }
         else {
@@ -133,8 +133,8 @@
     [KSNetworkingManager userAccountPageRequest:KS_POST paymentStatus:@"IN" searchDate:self.searchDate bizType:self.bizType postStatus:@"WAIT" page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             
             for (NSDictionary *parm in sourceArray) {
                 IncomeListModel *model = [[IncomeListModel alloc] initWithDictionary:parm];
@@ -228,7 +228,7 @@
         {
             NSMutableArray *nameArray = [NSMutableArray array];
             for (NSDictionary *parm in self.sortArray) {
-                [nameArray addObject:[parm stringValueForKey:@"name"]];
+                [nameArray addObject:[parm ks_stringValueForKey:@"name"]];
             }
             MJWeakSelf;
             KSChoosePicker *picker = [[KSChoosePicker alloc] initWithTitle:@"" sourceData:nameArray chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
@@ -239,7 +239,7 @@
                 else {
                     weakSelf.headView.typeLabel.text = returnValue;
                     NSDictionary *parm = self.sortArray[chooseIndex];
-                    weakSelf.bizType = [parm stringValueForKey:@"bizType"];
+                    weakSelf.bizType = [parm ks_stringValueForKey:@"bizType"];
                 }
                 self.headView.secondArrowUp = NO;
                 [weakSelf refreshAndRequestData];

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/Controller/CashRecordViewController.m

@@ -114,8 +114,8 @@
         [self removehub];
         [self endRefresh];
         NSLog(@"%@",[dic mj_JSONString]);
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             
             for (NSDictionary *parm in sourceArray) {
                 FeeRecordModel *model = [[FeeRecordModel alloc] initWithDictionary:parm];

+ 5 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/Controller/WithdrawViewController.m

@@ -42,8 +42,8 @@
 
 - (void)checkSighMessage {
     [KSNetworkingManager checkContractSignRequest:KS_GET contractType:@"WITHDRAW" success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            BOOL hasSign = [dic boolValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            BOOL hasSign = [dic ks_boolValueForKey:@"data"];
             if (hasSign == NO) { // 未实名
                 [self showSignAlert];
             }
@@ -81,8 +81,8 @@
     [self showhud];
     [KSNetworkingManager getWithdrawalInfoRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            self.drawModel = [[WithdrawModel alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            self.drawModel = [[WithdrawModel alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
         }
         else {
             [self MBPShow:MESSAGEKEY];
@@ -144,7 +144,7 @@
     [self showhud];
     [KSNetworkingManager withdrawalRequest:KS_POST amountWithdrawal:[amountString doubleValue] bankCardId:[NSString stringWithFormat:@"%.0f",self.drawModel.userBankCard.userBankCardIdentifier] success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self showSuccessView];
         }
         else {

+ 10 - 10
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/Controller/MyMusicViewController.m

@@ -113,8 +113,8 @@
     [self showhud];
     [KSNetworkingManager queryMusicShareMessageRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *resultDic = [dic dictionaryValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *resultDic = [dic ks_dictionaryValueForKey:@"data"];
             MusicShareModel *model = [[MusicShareModel alloc] initWithDictionary:resultDic];
             if (model.musicSheetCount == 0) {
                 [self MBPShow:@"您还没有上架曲谱"];
@@ -216,8 +216,8 @@
 
 - (void)requestTeachMessage {
     [KSNetworkingManager queryTeacherInfoRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            self.teacherInfo = [[TeacherInfo alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            self.teacherInfo = [[TeacherInfo alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             NSString *rongToken = UserDefault(RongTokenKey);
             if ([NSString isEmptyString:rongToken]) {
                 [USER_MANAGER queryUserInfoConnectRongCloud:YES];
@@ -249,14 +249,14 @@
 
 - (void)requestSubjectList {
     [KSNetworkingManager querySubjectItemRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             NSArray *dataArray = [NSMutableArray array];
-            dataArray = [dic arrayValueForKey:@"data"];
+            dataArray = [dic ks_arrayValueForKey:@"data"];
             NSMutableArray *subjectArray = [NSMutableArray array];
             for (NSDictionary *parm in dataArray) {
                 NSMutableDictionary *subjectSource = [NSMutableDictionary dictionary];
-                [subjectSource setValue:[parm stringValueForKey:@"id"] forKey:@"subjectId"];
-                [subjectSource setValue:[parm stringValueForKey:@"name"] forKey:@"subjectName"];
+                [subjectSource setValue:[parm ks_stringValueForKey:@"id"] forKey:@"subjectId"];
+                [subjectSource setValue:[parm ks_stringValueForKey:@"name"] forKey:@"subjectName"];
                 [subjectArray addObject:subjectSource];
             }
             self.subjectList = [subjectArray mutableCopy];
@@ -399,7 +399,7 @@
         NSMutableArray *nameArray = [NSMutableArray array];
         [nameArray addObject:@"全部"];
         for (NSDictionary *parm in self.subjectList) {
-            [nameArray addObject:[parm stringValueForKey:@"subjectName"]];
+            [nameArray addObject:[parm ks_stringValueForKey:@"subjectName"]];
         }
         MJWeakSelf;
         KSChoosePicker *picker = [[KSChoosePicker alloc] initWithTitle:@"声部筛选" sourceData:nameArray chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
@@ -411,7 +411,7 @@
                 NSDictionary *parm = self.subjectList[chooseIndex-1];
 
                 weakSelf.searchView.subjectLabel.text = returnValue;
-                weakSelf.subjectIds = [parm stringValueForKey:@"subjectId"];
+                weakSelf.subjectIds = [parm ks_stringValueForKey:@"subjectId"];
             }
             [weakSelf refreshSearchSource];
         } cancel:^{

+ 3 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicBodyView.m

@@ -114,8 +114,8 @@
     
     [KSNetworkingManager musicListRequest:KS_POST auditStatus:self.audioStatus page:self.pages rows:self.rows search:self.searchKey subjectIds:self.subjectIds success:^(NSDictionary * _Nonnull dic) {
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             for (NSDictionary *parm in sourceArray) {
                 MusicMessageModel *model = [[MusicMessageModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];
@@ -232,7 +232,7 @@
 
 - (void)musicOffAction:(MusicMessageModel *)songMessage {
     [KSNetworkingManager musicOffRequest:KS_POST musicId:[NSString stringWithFormat:@"%.0f",songMessage.internalBaseClassIdentifier] success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             MJWeakSelf;
             [self KSShowMsg:@"下架成功" promptCompletion:^{
                 [weakSelf refreshAndRequestData];

+ 6 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Controller/MyCourseViewController.m

@@ -48,8 +48,8 @@
 
 - (void)requestTeachMessage {
     [KSNetworkingManager queryTeacherInfoRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            self.teacherInfo = [[TeacherInfo alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            self.teacherInfo = [[TeacherInfo alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             NSString *rongToken = UserDefault(RongTokenKey);
             if ([NSString isEmptyString:rongToken]) {
                 [USER_MANAGER queryUserInfoConnectRongCloud:YES];
@@ -145,14 +145,14 @@
 
 - (void)requestSubjectList {
     [KSNetworkingManager querySubjectItemRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             NSArray *dataArray = [NSMutableArray array];
-            dataArray = [dic arrayValueForKey:@"data"];
+            dataArray = [dic ks_arrayValueForKey:@"data"];
             NSMutableArray *subjectArray = [NSMutableArray array];
             for (NSDictionary *parm in dataArray) {
                 NSMutableDictionary *subjectSource = [NSMutableDictionary dictionary];
-                [subjectSource setValue:[parm stringValueForKey:@"id"] forKey:@"subjectId"];
-                [subjectSource setValue:[parm stringValueForKey:@"name"] forKey:@"subjectName"];
+                [subjectSource setValue:[parm ks_stringValueForKey:@"id"] forKey:@"subjectId"];
+                [subjectSource setValue:[parm ks_stringValueForKey:@"name"] forKey:@"subjectName"];
                 [subjectArray addObject:subjectSource];
             }
             self.subjectList = [subjectArray mutableCopy];

+ 7 - 7
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyLessonBodyView.m

@@ -131,8 +131,8 @@
     if (self.selectIndex == 0) { // 陪练课
         [KSNetworkingManager accompanyCourseRequest:KS_POST classMonth:self.classDate status:self.status subjectId:self.subjectId page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
             [self endRefresh];
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+                NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
                 for (NSDictionary *parm in sourceArray) {
                     AccompanyLessonModel *model = [[AccompanyLessonModel alloc] initWithDictionary:parm];
                     [self.dataArray addObject:model];
@@ -160,8 +160,8 @@
     else { // 直播课
         [KSNetworkingManager queryTeacherLiveCourse:KS_POST classDate:self.classDate status:self.status subjectId:self.subjectId page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
             [self endRefresh];
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+                NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
                 for (NSDictionary *parm in sourceArray) {
                     LiveLessonModel *model = [[LiveLessonModel alloc] initWithDictionary:parm];
                     [self.dataArray addObject:model];
@@ -249,7 +249,7 @@
             NSMutableArray *nameArray = [NSMutableArray array];
             [nameArray addObject:@"全部"];
             for (NSDictionary *parm in self.subjectList) {
-                [nameArray addObject:[parm stringValueForKey:@"subjectName"]];
+                [nameArray addObject:[parm ks_stringValueForKey:@"subjectName"]];
             }
             MJWeakSelf;
             KSChoosePicker *picker = [[KSChoosePicker alloc] initWithTitle:@"声部筛选" sourceData:nameArray chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
@@ -260,7 +260,7 @@
                 else {
                     [weakSelf.sortView.thirdButton setTitle:returnValue forState:UIControlStateNormal];
                     NSDictionary *parm = self.subjectList[chooseIndex-1];
-                    weakSelf.subjectId = [parm stringValueForKey:@"subjectId"];
+                    weakSelf.subjectId = [parm ks_stringValueForKey:@"subjectId"];
                 }
                 self.sortView.thirdArrowUp = NO;
                 [weakSelf refreshAndRequestData];
@@ -364,7 +364,7 @@
         }
         else {
             NSDictionary *parm = self.subjectMessageArray[chooseIndex-1];
-            self.subjectId = [parm stringValueForKey:@"subjectId"];
+            self.subjectId = [parm ks_stringValueForKey:@"subjectId"];
         }
     }
     [self resetParamenter];

+ 5 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyMusicRoomBodyView.m

@@ -126,8 +126,8 @@
 - (void)requestData {
     [KSNetworkingManager musicRoomListRequest:KS_POST month:self.classDate status:self.status subjectId:self.subjectId page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             for (NSDictionary *parm in sourceArray) {
                 MusicRoomListModel *model = [[MusicRoomListModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];
@@ -214,7 +214,7 @@
             NSMutableArray *nameArray = [NSMutableArray array];
             [nameArray addObject:@"全部"];
             for (NSDictionary *parm in self.subjectList) {
-                [nameArray addObject:[parm stringValueForKey:@"subjectName"]];
+                [nameArray addObject:[parm ks_stringValueForKey:@"subjectName"]];
             }
             MJWeakSelf;
             KSChoosePicker *picker = [[KSChoosePicker alloc] initWithTitle:@"声部筛选" sourceData:nameArray chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
@@ -225,7 +225,7 @@
                 else {
                     [weakSelf.sortView.thirdButton setTitle:returnValue forState:UIControlStateNormal];
                     NSDictionary *parm = self.subjectList[chooseIndex-1];
-                    weakSelf.subjectId = [parm stringValueForKey:@"subjectId"];
+                    weakSelf.subjectId = [parm ks_stringValueForKey:@"subjectId"];
                 }
                 self.sortView.thirdArrowUp = NO;
                 [weakSelf refreshAndRequestData];
@@ -329,7 +329,7 @@
         }
         else {
             NSDictionary *parm = self.subjectMessageArray[chooseIndex-1];
-            self.subjectId = [parm stringValueForKey:@"subjectId"];
+            self.subjectId = [parm ks_stringValueForKey:@"subjectId"];
         }
     }
     [self resetParamenter];

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyVideoCourseBodyView.m

@@ -99,8 +99,8 @@
 - (void)requestData {
     [KSNetworkingManager videoLessonListRequest:KS_POST lessonSubject:self.searchKey auditStatus:self.audioStatus pageNo:self.pages pageSize:self.rows success:^(NSDictionary * _Nonnull dic) {
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             for (NSDictionary *parm in sourceArray) {
                 VideoCourseModel *model = [[VideoCourseModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];
@@ -171,7 +171,7 @@
         NSMutableArray *nameArray = [NSMutableArray array];
         [nameArray addObject:@"全部"];
         for (NSDictionary *parm in self.subjectList) {
-            [nameArray addObject:[parm stringValueForKey:@"subjectName"]];
+            [nameArray addObject:[parm ks_stringValueForKey:@"subjectName"]];
         }
         MJWeakSelf;
         KSChoosePicker *picker = [[KSChoosePicker alloc] initWithTitle:@"声部筛选" sourceData:nameArray chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
@@ -182,7 +182,7 @@
             else {
                 weakSelf.sortView.sortTitleLabel.text = returnValue;
                 NSDictionary *parm = self.subjectList[chooseIndex-1];
-                weakSelf.searchKey = [parm stringValueForKey:@"subjectId"];
+                weakSelf.searchKey = [parm ks_stringValueForKey:@"subjectId"];
             }
             self.sortView.arrowUp = NO;
             [weakSelf refreshAndRequestData];

+ 16 - 16
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m

@@ -62,7 +62,7 @@
         return;
     }
     [KSNetworkingManager batchSetReadRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self MBPShow:@"清除成功"];
             dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                 [self resetSourceAndRequest];
@@ -119,16 +119,16 @@
 
 - (void)queryUnReadCount {
     [KSNetworkingManager queryCountOfUnreadRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *countArray = [dic arrayValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *countArray = [dic ks_arrayValueForKey:@"data"];
             NSInteger courseCount = 0;
             NSInteger sysCount = 0;
             for (NSDictionary *parm in countArray) {
-                if ([[parm stringValueForKey:@"key"] isEqualToString:@"COURSE"]) {
-                    courseCount = [parm integerValueForKey:@"value"];
+                if ([[parm ks_stringValueForKey:@"key"] isEqualToString:@"COURSE"]) {
+                    courseCount = [parm ks_integerValueForKey:@"value"];
                 }
-                if ([[parm stringValueForKey:@"key"] isEqualToString:@"SYSTEM"]) {
-                    sysCount = [parm integerValueForKey:@"value"];
+                if ([[parm ks_stringValueForKey:@"key"] isEqualToString:@"SYSTEM"]) {
+                    sysCount = [parm ks_integerValueForKey:@"value"];
                 }
             }
             if (courseCount > 0 || sysCount > 0) {
@@ -167,9 +167,9 @@
     [KSNetworkingManager sysMessageListRequest:KS_POST group:self.groupType page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             // rows
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             for (NSDictionary *parm in sourceArray) {
                 NotiferMessageModel *model = [[NotiferMessageModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];
@@ -223,7 +223,7 @@
 
 - (void)readMessage:(NotiferMessageModel *)model baseCell:(NotiferMessageCell *)cell {
     [KSNetworkingManager setReadMessage:KS_POST messageId:model.internalBaseClassIdentifier success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self queryUnReadCount];
             model.readStatus = 1;
             cell.isRead = YES;
@@ -244,9 +244,9 @@
         NSError *error;
         NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&error];
         if (!error) {
-            NSString *action = [dict stringValueForKey:@"action"];
+            NSString *action = [dict ks_stringValueForKey:@"action"];
             if ([action isEqualToString:@"app"]) {
-                NSString *pageType = [dict stringValueForKey:@"pageTag"];
+                NSString *pageType = [dict ks_stringValueForKey:@"pageTag"];
                 if ([pageType isEqualToString:@"buyPractice"] || [pageType isEqualToString:@"courseRemind"]) {
                     [self toCourseTable];
                 }
@@ -255,13 +255,13 @@
                     [self.navigationController pushViewController:ctrl animated:YES];
                 }
                 else if ([pageType isEqualToString:@"homework"]) {
-                    NSString *parmString = [dict stringValueForKey:@"params"];
+                    NSString *parmString = [dict ks_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"];
-                        detailVC.studentId = [parm stringValueForKey:@"studentId"];
+                        detailVC.courseId = [parm ks_stringValueForKey:@"courseId"];
+                        detailVC.studentId = [parm ks_stringValueForKey:@"studentId"];
                         [self.navigationController pushViewController:detailVC animated:YES];
                     }
                 }
@@ -271,7 +271,7 @@
                 }
             }
             else {
-                NSString *webUrl = [dict stringValueForKey:@"url"];
+                NSString *webUrl = [dict ks_stringValueForKey:@"url"];
                 if (![NSString isEmptyString:webUrl]) {
                     KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
                     webCtrl.url = webUrl;

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/Controller/ReceiveEvaluateListController.m

@@ -98,8 +98,8 @@
     [KSNetworkingManager myReceiveRepliedRequest:KS_POST classMonth:self.chooseDate search:self.searchKey page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             NSLog(@"%@",[dic mj_JSONString]);
             for (NSDictionary *parm in sourceArray) {
                 ReceiveListModel *model = [[ReceiveListModel alloc] initWithDictionary:parm];

+ 7 - 7
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeBodyView.m

@@ -65,43 +65,43 @@
 
 - (void)configSource:(NSDictionary *)parm {
     
-    NSInteger courseCount = [parm integerValueForKey:@"courseSchedule"];
+    NSInteger courseCount = [parm ks_integerValueForKey:@"courseSchedule"];
     NSString *courseCountContent = [NSString stringWithFormat:@"本周剩余\n%zd 课时",courseCount];
     BOOL needCourseTips = courseCount == 0 ? NO : YES;
     HomeActionView *courseView = self.actionViewArray[0];
     courseView.firstDescLabel.attributedText = [self createAttrStringWithDesc:courseCountContent valueString:[NSString stringWithFormat:@"%zd",courseCount] needTips:needCourseTips];
     
-    NSInteger courseHomework = [parm integerValueForKey:@"courseHomework"];
+    NSInteger courseHomework = [parm ks_integerValueForKey:@"courseHomework"];
     NSString *courseHomeworkContent = [NSString stringWithFormat:@"本周共 %zd 节课\n未布置作业",courseHomework];
     BOOL needHomeworkTips = courseHomework == 0 ? NO : YES;
     HomeActionView *homeworkView = self.actionViewArray[1];
     homeworkView.firstDescLabel.attributedText = [self createAttrStringWithDesc:courseHomeworkContent valueString:[NSString stringWithFormat:@"%zd",courseHomework] needTips:needHomeworkTips];
     
-    NSInteger courseScheduleReplied = [parm integerValueForKey:@"courseScheduleReplied"];
+    NSInteger courseScheduleReplied = [parm ks_integerValueForKey:@"courseScheduleReplied"];
     NSString *courseScheduleRepliedContent = [NSString stringWithFormat:@"剩余 %zd 节\n尚未评价",courseScheduleReplied];
     BOOL needEvaluateTips = courseScheduleReplied == 0 ? NO : YES;
     HomeActionView *evaluateView = self.actionViewArray[2];
     evaluateView.firstDescLabel.attributedText = [self createAttrStringWithDesc:courseScheduleRepliedContent valueString:[NSString stringWithFormat:@"%zd",courseScheduleReplied] needTips:needEvaluateTips];
     
-    NSInteger musicSheet = [parm integerValueForKey:@"musicSheet"];
+    NSInteger musicSheet = [parm ks_integerValueForKey:@"musicSheet"];
     NSString *musicSheetContent = [NSString stringWithFormat:@"共 %zd 支\n乐谱",musicSheet];
     BOOL needMusicSheetTips = musicSheet == 0 ? NO : YES;
     HomeActionView *musicView = self.actionViewArray[3];
     musicView.firstDescLabel.attributedText =[self createAttrStringWithDesc:musicSheetContent valueString:[NSString stringWithFormat:@"%zd",musicSheet] needTips:needMusicSheetTips];
     
-    NSInteger studentReplied = [parm integerValueForKey:@"studentReplied"];
+    NSInteger studentReplied = [parm ks_integerValueForKey:@"studentReplied"];
     NSString *studentRepliedContent = [NSString stringWithFormat:@"本周收到\n%zd 个评价",studentReplied];
     BOOL needStudentRepliedTips = studentReplied == 0 ? NO : YES;
     HomeActionView *studentRepliedView = self.actionViewArray[4];
     studentRepliedView.firstDescLabel.attributedText = [self createAttrStringWithDesc:studentRepliedContent valueString:[NSString stringWithFormat:@"%zd",studentReplied] needTips:needStudentRepliedTips];
     
-    NSInteger pianoTime = [parm integerValueForKey:@"pianoTime"];
+    NSInteger pianoTime = [parm ks_integerValueForKey:@"pianoTime"];
     NSString *pianoTimeContent = [NSString stringWithFormat:@"剩余\n%zd 分钟",pianoTime];
     BOOL needPianoTimeTips = pianoTime == 0 ? NO : YES;
     HomeActionView *pianoTimeView = self.actionViewArray[5];
     pianoTimeView.firstDescLabel.attributedText = [self createAttrStringWithDesc:pianoTimeContent valueString:[NSString stringWithFormat:@"%zd",pianoTime] needTips:needPianoTimeTips];
     
-    double decimal = [parm doubleValueForKey:@"decimal"];
+    double decimal = [parm ks_doubleValueForKey:@"decimal"];
     NSString *decimalContent = [NSString stringWithFormat:@"本月收入\n%.2f 元",decimal];
     BOOL needDecimalTips = decimal == 0 ? NO : YES;
     HomeActionView *decimalView = self.actionViewArray[6];

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/CreateLiveViewController.m

@@ -132,8 +132,8 @@
    
     [KSNetworkingManager liveRoomCreateTempLiveRoom:KS_POST coverPic:coverImageUrl liveRemark:content roomTitle:title liveTime:[self.chooseTime integerValue] success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSString *roomId = [dic stringValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSString *roomId = [dic ks_stringValueForKey:@"data"];
             [self previewViewWithRoomId:roomId liveDesc:content];
         }
         else {

+ 17 - 17
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m

@@ -417,23 +417,23 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
 - (void)setupLiveroomConfig:(NSDictionary *)source {
     NSLog(@"room config----- %@",source);
     self.liveRoleType = RCRTCLiveRoleTypeBroadcaster;
-    self.createrId = [source stringValueForKey:@"speakerId"];
-    self.createrName = [source stringValueForKey:@"speakerName"];
-    self.createrAvatal = [source stringValueForKey:@"speakerPic"];
-    self.likeCount = [source integerValueForKey:@"likeNum"]; // 点赞数
-    NSInteger lookCount = [source integerValueForKey:@"lookNum"];
+    self.createrId = [source ks_stringValueForKey:@"speakerId"];
+    self.createrName = [source ks_stringValueForKey:@"speakerName"];
+    self.createrAvatal = [source ks_stringValueForKey:@"speakerPic"];
+    self.likeCount = [source ks_integerValueForKey:@"likeNum"]; // 点赞数
+    NSInteger lookCount = [source ks_integerValueForKey:@"lookNum"];
     self.totalCount = lookCount; // 观看人数
     
-    self.enableSeat = ![source boolValueForKey:@"whether_mic"];
+    self.enableSeat = ![source ks_boolValueForKey:@"whether_mic"];
 
-    BOOL isTemp = [[source stringValueForKey:@"roomType"] isEqualToString:@"TEMP"];
+    BOOL isTemp = [[source ks_stringValueForKey:@"roomType"] isEqualToString:@"TEMP"];
     self.isTempRoom = isTemp;
     if (isTemp == NO) {
-        self.liveEndTime = [source stringValueForKey:@"liveEndTime"];
-        self.expiredCloseMinute = [source integerValueForKey:@"expiredCloseMinute"];
+        self.liveEndTime = [source ks_stringValueForKey:@"liveEndTime"];
+        self.expiredCloseMinute = [source ks_integerValueForKey:@"expiredCloseMinute"];
     }
     else {
-        self.liveEndTime = [source stringValueForKey:@"liveEndTime"];
+        self.liveEndTime = [source ks_stringValueForKey:@"liveEndTime"];
         self.expiredCloseMinute = 0;
     }
 }
@@ -645,7 +645,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
         if (self.hasJoinRoomSuccess) { // 如果已经发送了进入消息
             // 查询是否直播间开启
             [KSNetworkingManager speakerCheckRoomInfoRequest:KS_GET roomUid:self.roomId success:^(NSDictionary * _Nonnull dic) {
-                if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+                if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
                     // 回调信息
                     MJWeakSelf;
                     [self notiferJoinSuccessToServiceCallback:^{
@@ -1128,11 +1128,11 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
 #pragma mark -- 退出直播间回掉服务
 - (void)quitNotiferService {
     [KSNetworkingManager LiveroomQuit:KS_POST success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"errCode"] == 0) {
+        if ([dic ks_integerValueForKey:@"errCode"] == 0) {
             NSLog(@"success");
         }
         else {
-            NSLog(@"----- error %@", [dic stringValueForKey:@"errMsg"]);
+            NSLog(@"----- error %@", [dic ks_stringValueForKey:@"errMsg"]);
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -1141,11 +1141,11 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
 
 - (void)closeRoomNotiferService {
     [KSNetworkingManager destroyLiveRoomRequest:KS_GET roomUid:self.roomId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"errCode"] == 0) {
+        if ([dic ks_integerValueForKey:@"errCode"] == 0) {
             NSLog(@"success");
         }
         else {
-            NSLog(@"----- error %@", [dic stringValueForKey:@"errMsg"]);
+            NSLog(@"----- error %@", [dic ks_stringValueForKey:@"errMsg"]);
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -1965,7 +1965,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
     [self showhud];
     [KSNetworkingManager liveRoomSetMicApplyEnable:KS_GET roomUid:self.roomId whetherMic:whetherMic success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             if (whetherMic == 0) {
                 self.seatActionView.isForbiddenApply = NO;
                 [self enableSeatAction];
@@ -2163,7 +2163,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
         return;
     }
     [KSNetworkingManager syncLikeRequest:KS_GET likeNum:self.likeCount roomUid:self.roomId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self notiferLikeStatusToAudience];
         }
     } faliure:^(NSError * _Nonnull error) {

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomDownSeat.m

@@ -34,8 +34,8 @@
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json == nil) return;
     
-    self.audienceName = [json stringValueForKey:@"audienceName"];
-    self.audienceId = [json stringValueForKey:@"audienceId"];
+    self.audienceName = [json ks_stringValueForKey:@"audienceName"];
+    self.audienceId = [json ks_stringValueForKey:@"audienceId"];
     NSDictionary *userinfoDic = dictionary[@"user"];
     [self decodeUserInfo:userinfoDic];
 }

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomEnter.m

@@ -32,8 +32,8 @@
     NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json == nil) return;
-    self.userId = [json stringValueForKey:@"userId"];
-    self.userName = [json stringValueForKey:@"userName"];
+    self.userId = [json ks_stringValueForKey:@"userId"];
+    self.userName = [json ks_stringValueForKey:@"userName"];
     NSDictionary *userinfoDic = dictionary[@"user"];
     [self decodeUserInfo:userinfoDic];
 }

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomKickOut.m

@@ -42,10 +42,10 @@
     NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json == nil) return;
-    self.userId = [json stringValueForKey:@"userId"];
-    self.userName = [json stringValueForKey:@"userName"];
-    self.targetId = [json stringValueForKey:@"targetId"];
-    self.targetName = [json stringValueForKey:@"targetName"];
+    self.userId = [json ks_stringValueForKey:@"userId"];
+    self.userName = [json ks_stringValueForKey:@"userName"];
+    self.targetId = [json ks_stringValueForKey:@"targetId"];
+    self.targetName = [json ks_stringValueForKey:@"targetName"];
     NSDictionary *userinfoDic = dictionary[@"user"];
     [self decodeUserInfo:userinfoDic];
 }

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomLeave.m

@@ -32,8 +32,8 @@
     NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json == nil) return;
-    self.userId = [json stringValueForKey:@"userId"];
-    self.userName = [json stringValueForKey:@"userName"];
+    self.userId = [json ks_stringValueForKey:@"userId"];
+    self.userName = [json ks_stringValueForKey:@"userName"];
     NSDictionary *userinfoDic = dictionary[@"user"];
     [self decodeUserInfo:userinfoDic];
 }

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomLike.m

@@ -32,8 +32,8 @@
     NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json) {
-        self.counts = [[json stringValueForKey:@"counts"] intValue];
-        self.extra = [json stringValueForKey:@"extra"];
+        self.counts = [[json ks_stringValueForKey:@"counts"] intValue];
+        self.extra = [json ks_stringValueForKey:@"extra"];
         
         NSDictionary *userinfoDic = dictionary[@"user"];
         [self decodeUserInfo:userinfoDic];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomMemberCount.m

@@ -23,7 +23,7 @@
     NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json == nil) return;
-    self.count = [[json stringValueForKey:@"count"] intValue];
+    self.count = [[json ks_stringValueForKey:@"count"] intValue];
     NSDictionary *userinfoDic = dictionary[@"user"];
     [self decodeUserInfo:userinfoDic];
 }

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomMemberUp.m

@@ -24,7 +24,7 @@
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json == nil) return;
     
-    self.count = [[json dictionaryValueForKey:@"content"] integerValueForKey:@"count"];
+    self.count = [[json ks_dictionaryValueForKey:@"content"] ks_integerValueForKey:@"count"];
     NSLog(@"member count-----------%zd",_count);
     NSDictionary *userinfoDic = dictionary[@"user"];
     [self decodeUserInfo:userinfoDic];

+ 7 - 7
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomSeatApply.m

@@ -58,13 +58,13 @@
     NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json == nil) return;
-    self.teacherName = [json stringValueForKey:@"teacherName"];
-    self.teacherId = [json stringValueForKey:@"teacherId"];
-    self.audienceName = [json stringValueForKey:@"audienceName"];
-    self.audienceId = [json stringValueForKey:@"audienceId"];
-    self.type = [json integerValueForKey:@"type"];
-    self.audienceAvatar = [json stringValueForKey:@"audienceAvatar"];
-    self.audienceSubjectName = [json stringValueForKey:@"audienceSubjectName"];
+    self.teacherName = [json ks_stringValueForKey:@"teacherName"];
+    self.teacherId = [json ks_stringValueForKey:@"teacherId"];
+    self.audienceName = [json ks_stringValueForKey:@"audienceName"];
+    self.audienceId = [json ks_stringValueForKey:@"audienceId"];
+    self.type = [json ks_integerValueForKey:@"type"];
+    self.audienceAvatar = [json ks_stringValueForKey:@"audienceAvatar"];
+    self.audienceSubjectName = [json ks_stringValueForKey:@"audienceSubjectName"];
     NSDictionary *userinfoDic = dictionary[@"user"];
     [self decodeUserInfo:userinfoDic];
 }

+ 5 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomSeatResponse.m

@@ -45,11 +45,11 @@
     NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json == nil) return;
-    self.teacherName = [json stringValueForKey:@"teacherName"];
-    self.teacherId = [json stringValueForKey:@"teacherId"];
-    self.audienceName = [json stringValueForKey:@"audienceName"];
-    self.audienceId = [json stringValueForKey:@"audienceId"];
-    self.type = [json integerValueForKey:@"type"];
+    self.teacherName = [json ks_stringValueForKey:@"teacherName"];
+    self.teacherId = [json ks_stringValueForKey:@"teacherId"];
+    self.audienceName = [json ks_stringValueForKey:@"audienceName"];
+    self.audienceId = [json ks_stringValueForKey:@"audienceId"];
+    self.type = [json ks_integerValueForKey:@"type"];
     NSDictionary *userinfoDic = dictionary[@"user"];
     [self decodeUserInfo:userinfoDic];
 }

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomUserQuit.m

@@ -32,8 +32,8 @@
     NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json == nil) return;
-    self.userId = [json stringValueForKey:@"userId"];
-    self.userName = [json stringValueForKey:@"userName"];
+    self.userId = [json ks_stringValueForKey:@"userId"];
+    self.userName = [json ks_stringValueForKey:@"userName"];
     NSDictionary *userinfoDic = dictionary[@"user"];
     [self decodeUserInfo:userinfoDic];
 }

+ 5 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomWelcome.m

@@ -49,12 +49,12 @@
     NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json) {
-        self.msgId = [json stringValueForKey:@"msgId"];
-        self.counts = [[json stringValueForKey:@"counts"] intValue];
-        self.rank = [[json stringValueForKey:@"rank"] intValue];
-        self.level = [[json stringValueForKey:@"level"] intValue];
+        self.msgId = [json ks_stringValueForKey:@"msgId"];
+        self.counts = [[json ks_stringValueForKey:@"counts"] intValue];
+        self.rank = [[json ks_stringValueForKey:@"rank"] intValue];
+        self.level = [[json ks_stringValueForKey:@"level"] intValue];
         
-        self.extra = [json stringValueForKey:@"extra"];
+        self.extra = [json ks_stringValueForKey:@"extra"];
         NSDictionary *userinfoDic = dictionary[@"user"];
         [self decodeUserInfo:userinfoDic];
     }

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSRCShopRushMessage.m

@@ -34,8 +34,8 @@
     NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json == nil) return;
-    self.userId = [json stringValueForKey:@"userId"];
-    self.userName = [json stringValueForKey:@"userName"];
+    self.userId = [json ks_stringValueForKey:@"userId"];
+    self.userName = [json ks_stringValueForKey:@"userName"];
     NSDictionary *userinfoDic = dictionary[@"user"];
     [self decodeUserInfo:userinfoDic];
 }

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/RCChatroomLikeCount.m

@@ -24,7 +24,7 @@
     NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json == nil) return;
-    self.count = [[json stringValueForKey:@"count"] intValue];
+    self.count = [[json ks_stringValueForKey:@"count"] intValue];
     NSDictionary *userinfoDic = dictionary[@"user"];
     [self decodeUserInfo:userinfoDic];
 }

+ 3 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/RCChatroomSeatsControl.m

@@ -34,9 +34,9 @@
     NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json == nil) return;
-    self.userId = [json stringValueForKey:@"userId"];
-    self.userName = [json stringValueForKey:@"userName"];
-    self.seatBan = [[json stringValueForKey:@"seatBan"] boolValue];
+    self.userId = [json ks_stringValueForKey:@"userId"];
+    self.userName = [json ks_stringValueForKey:@"userName"];
+    self.seatBan = [[json ks_stringValueForKey:@"seatBan"] boolValue];
     NSDictionary *userinfoDic = dictionary[@"user"];
     [self decodeUserInfo:userinfoDic];
 }

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Model/KSEnterLiveroomManager.h

@@ -19,6 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 + (void)queryLiveroomConfig:(NSString *)roomId callback:(RoomConfigCallback)callback;
 
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Model/KSEnterLiveroomManager.m

@@ -13,8 +13,8 @@
 
 + (void)queryLiveroomConfig:(NSString *)roomId callback:(RoomConfigCallback)callback {
     [KSNetworkingManager speakerCheckRoomInfoRequest:KS_GET roomUid:roomId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            callback([dic dictionaryValueForKey:@"data"]);
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            callback([dic ks_dictionaryValueForKey:@"data"]);
         }
         else {
             [self MBShowInWindow:MESSAGEKEY];

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/SeatContentView.m

@@ -112,11 +112,11 @@
 
 - (void)queryUserInfoWithUserId:(NSString *)userId {
     [KSNetworkingManager imUserFriendQueryDetail:KS_POST userId:userId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *result = [dic dictionaryValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
             if (self) {
-                self.nameLabel.text = [result stringValueForKey:@"friendNickname"];
-                [self.userAvatar sd_setImageWithURL:[NSURL URLWithString:[[result stringValueForKey:@"friendAvatar"] getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+                self.nameLabel.text = [result ks_stringValueForKey:@"friendNickname"];
+                [self.userAvatar sd_setImageWithURL:[NSURL URLWithString:[[result ks_stringValueForKey:@"friendAvatar"] getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
             }
             else {
                 NSLog(@"-delloc------");

+ 6 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/SeatListView/LiveMemberSeatCell.m

@@ -53,8 +53,8 @@
     }
     if ([NSString isEmptyString:member.name]) {
         [KSNetworkingManager imUserFriendQueryDetail:KS_POST userId:member.userId success:^(NSDictionary * _Nonnull dic) {
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSDictionary *result = [dic dictionaryValueForKey:@"data"];
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+                NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
                 if (self) {
                     [self configUserMessage:result];
                 }
@@ -74,10 +74,10 @@
 - (void)configUserMessage:(NSDictionary *)result {
     if (self) {
         if (result) {
-            self.userName.text = [result stringValueForKey:@"friendNickname"];
-            [self.userAvatar sd_setImageWithURL:[NSURL URLWithString:[[result stringValueForKey:@"friendAvatar"] getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
-            self.member.name = [result stringValueForKey:@"friendNickname"];
-            self.member.avatar = [result stringValueForKey:@"friendAvatar"];
+            self.userName.text = [result ks_stringValueForKey:@"friendNickname"];
+            [self.userAvatar sd_setImageWithURL:[NSURL URLWithString:[[result ks_stringValueForKey:@"friendAvatar"] getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+            self.member.name = [result ks_stringValueForKey:@"friendNickname"];
+            self.member.avatar = [result ks_stringValueForKey:@"friendAvatar"];
         }
         else {
             if (self) {

+ 3 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Login/Controller/FirstSettingViewController.m

@@ -29,8 +29,8 @@
 
 - (void)requestConfig {
     [KSNetworkingManager queryByParamName:KS_GET paramName:@"last_username_month" success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSInteger month = [[dic dictionaryValueForKey:@"data"] integerValueForKey:@"paramValue"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSInteger month = [[dic ks_dictionaryValueForKey:@"data"] ks_integerValueForKey:@"paramValue"];
             self.bodyView.descLabel.hidden = NO;
             self.bodyView.descLabel.text = [NSString stringWithFormat:@"每隔%zd个月可修改一次",month];
         }
@@ -103,7 +103,7 @@
     [self showhud];
     [KSNetworkingManager setPasswordRequest:KS_POST username:nickName password:pwdCode userSex:self.userSex token:self.access_token success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             MJWeakSelf;
             UserDefaultSet(self.phone, PHONEKEY);
             UserDefaultSet(self.access_token, TokenKey);

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Login/Controller/LoginViewController.m

@@ -11,6 +11,7 @@
 #import "PasswordLoginController.h"
 #import "KSBaseWKWebViewController.h"
 #import "NSString+phone.h"
+
 @interface LoginViewController ()
 
 @property (nonatomic, strong) LoginBodyView *bodyView;

+ 10 - 10
KulexiuForTeacher/KulexiuForTeacher/Module/Login/Controller/PasswordLoginController.m

@@ -65,22 +65,22 @@
         [self backAction];
     }
     else if (action == PWDLOGIN_LOGIN) {
-        if (![NSString isMobilePhoneNumber:[parm stringValueForKey:@"phone"]]) {
+        if (![NSString isMobilePhoneNumber:[parm ks_stringValueForKey:@"phone"]]) {
             [self MBPShow:@"手机号码输入有误"];
             return;
         }
         [self showhud];
-        [KSNetworkingManager LoginRequest:KS_POST phone:[parm stringValueForKey:@"phone"] password:[parm stringValueForKey:@"password"] success:^(NSDictionary * _Nonnull dic) {
+        [KSNetworkingManager LoginRequest:KS_POST phone:[parm ks_stringValueForKey:@"phone"] password:[parm ks_stringValueForKey:@"password"] success:^(NSDictionary * _Nonnull dic) {
             [self removehub];
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSDictionary *result = [dic dictionaryValueForKey:@"data"];
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+                NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
                 // 保存用户类型
-                UserDefaultSet([parm stringValueForKey:@"phone"], PHONEKEY);
-                UserDefaultSet([parm stringValueForKey:@"password"], PASSWORDKEY);
-                NSDictionary *authentication = [result dictionaryValueForKey:@"authentication"];
-                UserDefaultSet([authentication stringValueForKey:@"access_token"], TokenKey);
-                UserDefaultSet([authentication stringValueForKey:@"refresh_token"], RefreshToken);
-                UserDefaultSet([authentication stringValueForKey:@"token_type"], Token_type);
+                UserDefaultSet([parm ks_stringValueForKey:@"phone"], PHONEKEY);
+                UserDefaultSet([parm ks_stringValueForKey:@"password"], PASSWORDKEY);
+                NSDictionary *authentication = [result ks_dictionaryValueForKey:@"authentication"];
+                UserDefaultSet([authentication ks_stringValueForKey:@"access_token"], TokenKey);
+                UserDefaultSet([authentication ks_stringValueForKey:@"refresh_token"], RefreshToken);
+                UserDefaultSet([authentication ks_stringValueForKey:@"token_type"], Token_type);
                 [[NSUserDefaults standardUserDefaults] synchronize];
                 [KSNetworkingManager configRequestHeader];
                 

+ 9 - 9
KulexiuForTeacher/KulexiuForTeacher/Module/Login/Controller/VefiCodeLoginController.m

@@ -88,7 +88,7 @@
     [self showhud];
     [KSNetworkingManager sendSmsRequest:KS_POST mobile:self.phoneNo type:@"LOGIN" success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self MBPShow:@"验证码已发送"];
             [self codeButtonCountDown];
         }
@@ -139,16 +139,16 @@
     [self showhud];
     [KSNetworkingManager smsLoginRequest:KS_POST phone:self.phoneNo smsCode:code success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *result = [dic dictionaryValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
             // 保存用户类型
-            UserDefaultSet([result stringValueForKey:@"companyId"], OrganizationIDKey);
+            UserDefaultSet([result ks_stringValueForKey:@"companyId"], OrganizationIDKey);
             UserDefaultSet(self.phoneNo, PHONEKEY);
             UserDefaultRemoveObjectForKey(PASSWORDKEY);
-            NSDictionary *authentication = [result dictionaryValueForKey:@"authentication"];
-            UserDefaultSet([authentication stringValueForKey:@"access_token"], TokenKey);
-            UserDefaultSet([authentication stringValueForKey:@"refresh_token"], RefreshToken);
-            UserDefaultSet([authentication stringValueForKey:@"token_type"], Token_type);
+            NSDictionary *authentication = [result ks_dictionaryValueForKey:@"authentication"];
+            UserDefaultSet([authentication ks_stringValueForKey:@"access_token"], TokenKey);
+            UserDefaultSet([authentication ks_stringValueForKey:@"refresh_token"], RefreshToken);
+            UserDefaultSet([authentication ks_stringValueForKey:@"token_type"], Token_type);
             [[NSUserDefaults standardUserDefaults] synchronize];
             [KSNetworkingManager configRequestHeader];
             
@@ -156,7 +156,7 @@
             [USER_MANAGER queryUserInfoSendLoginUMCount];
             MJWeakSelf;
             [self KSShowMsg:@"登录成功" promptCompletion:^{
-                if ([result boolValueForKey:@"password"] == YES) {
+                if ([result ks_boolValueForKey:@"password"] == YES) {
                     [weakSelf toHomeView];
                 }
                 else { // 第一次登录,跳转到设置界面

+ 7 - 7
KulexiuForTeacher/KulexiuForTeacher/Module/Login/Model/UserInfoManager.m

@@ -118,7 +118,7 @@
 
 - (void)checkTokenEnableCallback:(void(^)(BOOL enable))checkCallback {
     [KSNetworkingManager checkTokenRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             checkCallback(YES);
         }
         else {
@@ -131,9 +131,9 @@
 
 - (void)queryUserInfoConnectRongCloud:(BOOL)connectRM {
     [KSNetworkingManager queryUserInfo:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             // 保存用户信息
-            self.userInfo = [[UserInfo alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+            self.userInfo = [[UserInfo alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             // 判断是否实名
             if (![NSString isEmptyString:self.userInfo.realName] && ![NSString isEmptyString:self.userInfo.idCardNo]) {
                 self.hasAuth = YES;
@@ -183,9 +183,9 @@
 
 - (void)queryUserInfoSendLoginUMCount {
     [KSNetworkingManager queryUserInfo:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             // 保存用户信息
-            self.userInfo = [[UserInfo alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+            self.userInfo = [[UserInfo alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             // 判断是否实名
             if (![NSString isEmptyString:self.userInfo.realName] && ![NSString isEmptyString:self.userInfo.idCardNo]) {
                 self.hasAuth = YES;
@@ -335,8 +335,8 @@
 
 - (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"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSString *serviceVersion = [[dic ks_dictionaryValueForKey:@"data"] ks_stringValueForKey:@"version"];
             NSString *currentVersion = [self getCurrentVersion];
             if ([self isLowerVersionCompareLocalVersion:currentVersion serviceVersion:serviceVersion]) {
                 callback(YES);

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/MidiPlayer/ShareInChat/Controller/KSShareGroupViewController.m

@@ -55,8 +55,8 @@
     [self showhud];
     [KSNetworkingManager imGroupQueryPage:KS_POST search:nil success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *array = [dic arrayValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *array = [dic ks_arrayValueForKey:@"data"];
             for (NSDictionary *parm in array) {
                 GroupListModel *model = [[GroupListModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/MidiPlayer/ShareInChat/View/ShareChooseMainView.m

@@ -93,8 +93,8 @@
         [MBProgressHUD ksShowHUDWithText:@"数据加载中......"];
         [KSNetworkingManager imUserFriendRequest:KS_POST search:self.searchKey success:^(NSDictionary * _Nonnull dic) {
             [self endRefresh];
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSArray *array = [dic arrayValueForKey:@"data"];
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+                NSArray *array = [dic ks_arrayValueForKey:@"data"];
                 for (NSDictionary *parm in array) {
                     if ([parm isKindOfClass:[NSNull class]]) {
                         continue;
@@ -126,8 +126,8 @@
     else {
         [KSNetworkingManager imGroupQueryPage:KS_POST search:self.searchKey success:^(NSDictionary * _Nonnull dic) {
             [self endRefresh];
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSArray *array = [dic arrayValueForKey:@"data"];
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+                NSArray *array = [dic ks_arrayValueForKey:@"data"];
                 for (NSDictionary *parm in array) {
                     GroupListModel *model = [[GroupListModel alloc] initWithDictionary:parm];
                     [self.classArray addObject:model];

+ 16 - 16
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/AddressList/Controller/AddressDetailViewController.m

@@ -43,11 +43,11 @@
     [self showhud];
     [KSNetworkingManager queryAddressDetailRequst:KS_GET addressId:self.addressId success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200) {
-            [self evaluateUI:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200) {
+            [self evaluateUI:[dic ks_dictionaryValueForKey:@"data"]];
         }
         else {
-            [self MBPShow:[dic stringValueForKey:@"message"]];
+            [self MBPShow:[dic ks_stringValueForKey:@"message"]];
         }
     } faliure:^(NSError * _Nonnull error) {
         [self removehub];
@@ -55,20 +55,20 @@
 }
 
 - (void)evaluateUI:(NSDictionary *)parm {
-    self.bodyView.nameField.text = [NSString returnNoNullStringWithString:[parm stringValueForKey:@"name"]];
-    self.bodyView.phoneField.text = [NSString returnNoNullStringWithString:[parm stringValueForKey:@"phoneNumber"]];
-    self.province = [parm stringValueForKey:@"province"];
-    self.city = [parm stringValueForKey:@"city"];
-    self.region = [parm stringValueForKey:@"region"];
-    self.cityCode = [parm stringValueForKey:@"postCode"];
+    self.bodyView.nameField.text = [NSString returnNoNullStringWithString:[parm ks_stringValueForKey:@"name"]];
+    self.bodyView.phoneField.text = [NSString returnNoNullStringWithString:[parm ks_stringValueForKey:@"phoneNumber"]];
+    self.province = [parm ks_stringValueForKey:@"province"];
+    self.city = [parm ks_stringValueForKey:@"city"];
+    self.region = [parm ks_stringValueForKey:@"region"];
+    self.cityCode = [parm ks_stringValueForKey:@"postCode"];
     self.bodyView.addressView.text = [NSString stringWithFormat:@"%@ %@ %@",[NSString returnNoNullStringWithString:self.province],[NSString returnNoNullStringWithString:self.city],[NSString returnNoNullStringWithString:self.region]];
     self.bodyView.addressTips.hidden = YES;
-    if (![NSString isEmptyString:[parm stringValueForKey:@"detailAddress"]]) {
-        self.bodyView.detailAddress.text = [parm stringValueForKey:@"detailAddress"];
+    if (![NSString isEmptyString:[parm ks_stringValueForKey:@"detailAddress"]]) {
+        self.bodyView.detailAddress.text = [parm ks_stringValueForKey:@"detailAddress"];
         self.bodyView.descLabel.hidden = YES;
     }
     
-    self.bodyView.isOn = [parm boolValueForKey:@"defaultStatus"];
+    self.bodyView.isOn = [parm ks_boolValueForKey:@"defaultStatus"];
     
 }
 
@@ -140,14 +140,14 @@
         [self showhud];
         [KSNetworkingManager updateAddressRequest:KS_POST addressId:self.addressId name:self.bodyView.nameField.text phoneNumber:phoneNo defaultStatus:self.bodyView.isOn detailAddress:self.bodyView.detailAddress.text province:self.province city:self.city region:self.region postCode:self.cityCode success:^(NSDictionary * _Nonnull dic) {
             [self removehub];
-            if ([dic integerValueForKey:@"code"] == 200) {
+            if ([dic ks_integerValueForKey:@"code"] == 200) {
                 MJWeakSelf;
                 [self KSShowMsg:@"修改成功" promptCompletion:^{
                     [weakSelf backAction];
                 }];
             }
             else {
-                [self MBPShow:[dic stringValueForKey:@"message"]];
+                [self MBPShow:[dic ks_stringValueForKey:@"message"]];
             }
         } faliure:^(NSError * _Nonnull error) {
             [self removehub];
@@ -157,14 +157,14 @@
         [self showhud];
         [KSNetworkingManager addAddressRequest:KS_POST name:self.bodyView.nameField.text phoneNumber:phoneNo defaultStatus:self.bodyView.isOn detailAddress:self.bodyView.detailAddress.text province:self.province city:self.city region:self.region postCode:self.cityCode success:^(NSDictionary * _Nonnull dic) {
             [self removehub];
-            if ([dic integerValueForKey:@"code"] == 200) {
+            if ([dic ks_integerValueForKey:@"code"] == 200) {
                 MJWeakSelf;
                 [self KSShowMsg:@"新增成功" promptCompletion:^{
                     [weakSelf backAction];
                 }];
             }
             else {
-                [self MBPShow:[dic stringValueForKey:@"message"]];
+                [self MBPShow:[dic ks_stringValueForKey:@"message"]];
             }
         } faliure:^(NSError * _Nonnull error) {
             [self removehub];

+ 5 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/AddressList/Controller/AddressListViewController.m

@@ -82,15 +82,15 @@
     [KSNetworkingManager companyAddressListRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200) {
-            NSArray *listArray = [dic arrayValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200) {
+            NSArray *listArray = [dic ks_arrayValueForKey:@"data"];
             for (NSDictionary *parm in listArray) {
                 AddressListModel *model = [[AddressListModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];
             }
         }
         else {
-            [self MBPShow:[dic stringValueForKey:@"message"]];
+            [self MBPShow:[dic ks_stringValueForKey:@"message"]];
         }
         [self.tableView reloadData];
         [self changePromptLabelState];
@@ -166,12 +166,12 @@
 - (void)deleteAddress:(NSString *)addressId {
     [self showhud];
     [KSNetworkingManager deleteAddressRequest:KS_POST addressId:addressId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200) {
+        if ([dic ks_integerValueForKey:@"code"] == 200) {
             [self MBPShow:@"删除成功"];
             [self refreshAndRequestData];
         }
         else {
-            [self MBPShow:[dic stringValueForKey:@"message"]];
+            [self MBPShow:[dic ks_stringValueForKey:@"message"]];
         }
     } faliure:^(NSError * _Nonnull error) {
         

+ 15 - 15
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/AddressList/View/KSAddressPickerView.m

@@ -114,16 +114,16 @@
     // 省
     NSMutableArray *provinceArray = [NSMutableArray array];
     for (NSDictionary *subDic in dataArray) {
-        [provinceArray addObject:[subDic stringValueForKey:@"area_name"]];
+        [provinceArray addObject:[subDic ks_stringValueForKey:@"area_name"]];
     }
     
     [self.arrangeSource addObject:provinceArray];
     
     // 市
     NSMutableArray *cityArray = [NSMutableArray array];
-    NSArray *citys = [proviceDict arrayValueForKey:@"city"];
+    NSArray *citys = [proviceDict ks_arrayValueForKey:@"city"];
     for (NSDictionary *cityDict in citys) {
-        [cityArray addObject:[cityDict stringValueForKey:@"area_name"]];
+        [cityArray addObject:[cityDict ks_stringValueForKey:@"area_name"]];
     }
     [self.arrangeSource addObject:cityArray];
     
@@ -132,10 +132,10 @@
         cityStr = self.arrangeSource[1][_index2];
         // 区
         NSMutableArray *districtArray = [NSMutableArray array];
-        NSDictionary *cityDict = [proviceDict arrayValueForKey:@"city"][_index2];
-        NSArray *districts = [cityDict arrayValueForKey:@"area"];
+        NSDictionary *cityDict = [proviceDict ks_arrayValueForKey:@"city"][_index2];
+        NSArray *districts = [cityDict ks_arrayValueForKey:@"area"];
         for (NSDictionary *districtDict in districts) {
-            [districtArray addObject:[districtDict stringValueForKey:@"area_name"]];
+            [districtArray addObject:[districtDict ks_stringValueForKey:@"area_name"]];
         }
         [self.arrangeSource addObject:districtArray];
     }
@@ -162,22 +162,22 @@
         NSArray *dataArray = self.sourceData;
         // 省
         NSDictionary *provinceDict = dataArray[_index1];
-        [returnObj addObject:[provinceDict stringValueForKey:@"area_code"]];
-        [chooseData addObject:[provinceDict stringValueForKey:@"area_name"]];
+        [returnObj addObject:[provinceDict ks_stringValueForKey:@"area_code"]];
+        [chooseData addObject:[provinceDict ks_stringValueForKey:@"area_name"]];
         // 市
-        NSArray *citys = [provinceDict arrayValueForKey:@"city"];
+        NSArray *citys = [provinceDict ks_arrayValueForKey:@"city"];
         if (citys.count > 0) {
             NSDictionary *cityDict = citys[_index2];
-            NSString *cityCode = [cityDict stringValueForKey:@"area_code"];
+            NSString *cityCode = [cityDict ks_stringValueForKey:@"area_code"];
             [returnObj addObject:cityCode];
-            [chooseData addObject:[cityDict stringValueForKey:@"area_name"]];
+            [chooseData addObject:[cityDict ks_stringValueForKey:@"area_name"]];
             // 区
-            NSArray *districts = [cityDict arrayValueForKey:@"area"];
+            NSArray *districts = [cityDict ks_arrayValueForKey:@"area"];
             if (districts.count > 0) {
-                NSDictionary *districtDict = [cityDict arrayValueForKey:@"area"][_index3];
-                NSString *districtCode = [districtDict stringValueForKey:@"area_code"];
+                NSDictionary *districtDict = [cityDict ks_arrayValueForKey:@"area"][_index3];
+                NSString *districtCode = [districtDict ks_stringValueForKey:@"area_code"];
                 [returnObj addObject:districtCode];
-                [chooseData addObject:[districtDict stringValueForKey:@"area_name"]];
+                [chooseData addObject:[districtDict ks_stringValueForKey:@"area_name"]];
             }
             else {
                 [returnObj addObject:@""];

+ 3 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/BankCard/Controller/BandCardViewController.m

@@ -35,9 +35,9 @@
     [self showhud];
     [KSNetworkingManager queryBankList:KS_POST success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             self.dataArray = [NSMutableArray array];
-            NSArray *sourceArray = [dic arrayValueForKey:@"data"];
+            NSArray *sourceArray = [dic ks_arrayValueForKey:@"data"];
             NSMutableArray *nameArray = [NSMutableArray array];
             for (NSDictionary *parm in sourceArray) {
                 BankNameModel *model = [[BankNameModel alloc] initWithDictionary:parm];
@@ -130,7 +130,7 @@
     [self showhud];
     [KSNetworkingManager bankCardRequest:KS_POST name:self.bodyView.nameField.text bankCard:self.bodyView.cardNoField.text bankName:self.bodyView.bankNameField.text bankCode:self.bankId idCardNo:self.bodyView.idCardField.text phone:self.bodyView.phoneField.text success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self showResultViewSuccess:YES errorMessage:nil];
         }
         else {

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/BankCard/Controller/MyBankCardViewController.m

@@ -59,8 +59,8 @@
 - (void)requestCardMessage {
     [KSNetworkingManager queryBankCardMessage:KS_POST success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             if (sourceArray.count == 0) {
                 self.isEmpty = YES;
             }

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/BankCard/Controller/UnbindCardViewController.m

@@ -61,7 +61,7 @@
     [self showhud];
     [KSNetworkingManager unBindCardRequest:KS_POST cardId:self.cardId idCardNo:self.bodyView.cardField.text name:self.bodyView.nameField.text success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self showResultViewSuccess:YES errorMsg:nil];
         }
         else {

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Controller/MineViewController.m

@@ -105,8 +105,8 @@
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager teacherAccountDetail:KS_GET success:^(NSDictionary * _Nonnull dic) {
         dispatch_group_leave(self.requestGroup);
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            self.amount = [[dic dictionaryValueForKey:@"data"] doubleValueForKey:@"amountShare"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            self.amount = [[dic ks_dictionaryValueForKey:@"data"] ks_doubleValueForKey:@"amountShare"];
         }
         else {
             [self MBPShow:MESSAGEKEY];
@@ -167,8 +167,8 @@
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager queryTeacherInfoRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
         dispatch_group_leave(self.requestGroup);
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            self.mineInfo = [[TeacherInfo alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            self.mineInfo = [[TeacherInfo alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             NSString *rongToken = UserDefault(RongTokenKey);
             if ([NSString isEmptyString:rongToken]) {
                 [USER_MANAGER queryUserInfoConnectRongCloud:YES];

+ 3 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Courseware/ViewModel/CoursewareViewModel.m

@@ -36,8 +36,8 @@
     [KSNetworkingManager courseCoursewareRequest:KS_POST status:0 searchKey:self.searchKey page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
         [LOADING_MANAGER removeHUD];
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *dataArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *dataArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             for (NSDictionary *parm in dataArray) {
                 CoursewareListModel *model = [[CoursewareListModel alloc] initWithDictionary:parm];
                 [self.sourceArray addObject:model];
@@ -97,7 +97,7 @@
     [LOADING_MANAGER showHUD];
     [KSNetworkingManager courseCoursewareRemoveRequest:KS_POST ids:ids success:^(NSDictionary * _Nonnull dic) {
         [LOADING_MANAGER removeHUD];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [LOADING_MANAGER KSShowMsg:@"删除成功" promptCompletion:^{
                 [self refreshAndRequest];
             }];

+ 6 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/Controller/InstrumentChooseViewController.m

@@ -102,8 +102,8 @@
     [self showhud];
     [KSNetworkingManager querySubjectAllRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            [self evaluateSource:[dic arrayValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            [self evaluateSource:[dic ks_arrayValueForKey:@"data"]];
         }
         else {
             [self MBPShow:MESSAGEKEY];
@@ -124,10 +124,10 @@
             for (NSInteger i = 0; i < valueArray.count; i++) {
                 NSMutableDictionary *parentNodeDic = [NSMutableDictionary dictionary];
                 NSDictionary *parm = valueArray[i];
-                [parentNodeDic setValue:[parm stringValueForKey:@"id"] forKey:@"subjectId"];
-                [parentNodeDic setValue:[parm stringValueForKey:@"name"] forKey:@"subjectName"];
+                [parentNodeDic setValue:[parm ks_stringValueForKey:@"id"] forKey:@"subjectId"];
+                [parentNodeDic setValue:[parm ks_stringValueForKey:@"name"] forKey:@"subjectName"];
                 
-                NSArray *subjects = [parm arrayValueForKey:@"subjects"];
+                NSArray *subjects = [parm ks_arrayValueForKey:@"subjects"];
                 if (subjects.count > 0) {
                     // 添加父节点分类
                     [parentNodeArray addObject:parentNodeDic];
@@ -259,7 +259,7 @@
 
 - (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath {
     NSDictionary *parm = self.parentArray[indexPath.section];
-    NSString *subjectName = [parm stringValueForKey:@"subjectName"];
+    NSString *subjectName = [parm ks_stringValueForKey:@"subjectName"];
     InstrumentHeaderView *headView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"InstrumentHeaderView" forIndexPath:indexPath];
     [headView evaluateWithMessage:subjectName];
     return headView;

+ 10 - 10
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/Controller/MyStyleViewController.m

@@ -125,14 +125,14 @@
     [self showhud];
     [KSNetworkingManager queryTeacherStyleRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-            NSString *subjectIds = [result stringValueForKey:@"subjectId"];
-            NSString *subjectNames = [result stringValueForKey:@"subjectName"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
+            NSString *subjectIds = [result ks_stringValueForKey:@"subjectId"];
+            NSString *subjectNames = [result ks_stringValueForKey:@"subjectName"];
             [self configWithSubjectMessage:subjectIds subjectName:subjectNames];
             // introduction
-            self.content = [result stringValueForKey:@"introduction"];
-            NSArray *videoList = [result arrayValueForKey:@"styleVideo"];
+            self.content = [result ks_stringValueForKey:@"introduction"];
+            NSArray *videoList = [result ks_arrayValueForKey:@"styleVideo"];
             [self.videoArray removeAllObjects];
             for (NSDictionary *parm in videoList) {
                 StyleVideoModel *model = [[StyleVideoModel alloc] initWithDictionary:parm];
@@ -188,8 +188,8 @@
     NSMutableArray *subjectNameArray = [NSMutableArray array];
     
     for (NSDictionary *parm in self.instrumentArray) {
-        [subjectIdArray addObject:[parm stringValueForKey:@"subjectId"]];
-        [subjectNameArray addObject:[parm stringValueForKey:@"subjectName"]];
+        [subjectIdArray addObject:[parm ks_stringValueForKey:@"subjectId"]];
+        [subjectNameArray addObject:[parm ks_stringValueForKey:@"subjectName"]];
     }
     NSString *subjectIds = [subjectIdArray componentsJoinedByString:@","];
     NSString *subjectNames = [subjectNameArray componentsJoinedByString:@","];
@@ -213,7 +213,7 @@
     [self showhud];
     [KSNetworkingManager saveTeacherStyleRequest:KS_POST styleVideo:videoArray subjectId:subjectIds subjectName:subjectNames introduction:self.content success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             self.hasModify = NO;
             MJWeakSelf;
             NSString *descMessage = (hasNewVideoSubmit || self.hasModifyVideoImage) ? @"提交成功,请耐心等待审核" : @"保存成功";
@@ -741,7 +741,7 @@
     [self showhud];
     [KSNetworkingManager modifyTeacherMessage:KS_POST avatal:imgUrl gender:gender username:userName success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self MBPShow:@"修改成功"];
             if (![NSString isEmptyString:imgUrl]) {
                 UserDefaultSetObjectForKey(imgUrl, AvatarUrlKey);

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/View/instrument/MyStyleInstrumentCell.m

@@ -45,7 +45,7 @@
     CGFloat viewHeight = [StyleInstrumentView getViewHeight];
     for (NSInteger i = 0; i < self.instrumentArray.count; i++) {
         NSDictionary *parm = self.instrumentArray[i];
-        NSString *name = [parm stringValueForKey:@"subjectName"];
+        NSString *name = [parm ks_stringValueForKey:@"subjectName"];
         CGFloat labelWidth = [StyleInstrumentView getViewWidth:name];
         CGFloat viewWidth = labelWidth;
         if (xSpace + viewWidth > width) {

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/LiveCourse/Controller/MyLiveCourseViewController.m

@@ -72,8 +72,8 @@
 
 - (void)requestTeachMessage {
     [KSNetworkingManager queryTeacherInfoRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            self.teacherInfo = [[TeacherInfo alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            self.teacherInfo = [[TeacherInfo alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             NSString *rongToken = UserDefault(RongTokenKey);
             if ([NSString isEmptyString:rongToken]) {
                 [USER_MANAGER queryUserInfoConnectRongCloud:YES];

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/LiveCourse/View/MyLiveCourseBodyView.m

@@ -147,8 +147,8 @@
 - (void)requestData {
     [KSNetworkingManager LiveCourseGroupRequest:KS_POST groupStatus:self.groupStatus page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             for (NSDictionary *parm in sourceArray) {
                 LiveCourseModel *model = [[LiveCourseModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/LiveList/View/LiveListBodyView.m

@@ -107,8 +107,8 @@
     NSInteger liveStatus = self.selectIndex == 0 ? 1 : 2;
     [KSNetworkingManager queryPageRoomRequest:KS_POST liveState:liveStatus page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             for (NSDictionary *parm in sourceArray) {
                 LiveListModel *model = [[LiveListModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];
@@ -209,8 +209,8 @@
 - (void)requestVideoList:(LiveListModel *)listModel {
     [KSNetworkingManager queryVideoRequest:KS_GET roomUid:listModel.roomUid success:^(NSDictionary * _Nonnull dic) {
         
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *videoList = [dic arrayValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *videoList = [dic ks_arrayValueForKey:@"data"];
             NSMutableArray *videoArray = [NSMutableArray array];
             for (NSDictionary *parm in videoList) {
                 LiveVideoModel *model = [[LiveVideoModel alloc] initWithDictionary:parm];

+ 6 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/Controller/MinePageViewController.m

@@ -93,8 +93,8 @@
 
 - (void)requestTeachMessage {
     [KSNetworkingManager queryTeacherInfoRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            self.teacherInfo = [[TeacherInfo alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            self.teacherInfo = [[TeacherInfo alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             NSString *rongToken = UserDefault(RongTokenKey);
             if ([NSString isEmptyString:rongToken]) {
                 [USER_MANAGER queryUserInfoConnectRongCloud:YES];
@@ -169,14 +169,14 @@
 
 - (void)requestSubjectList {
     [KSNetworkingManager querySubjectItemRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             NSArray *dataArray = [NSMutableArray array];
-            dataArray = [dic arrayValueForKey:@"data"];
+            dataArray = [dic ks_arrayValueForKey:@"data"];
             NSMutableArray *subjectArray = [NSMutableArray array];
             for (NSDictionary *parm in dataArray) {
                 NSMutableDictionary *subjectSource = [NSMutableDictionary dictionary];
-                [subjectSource setValue:[parm stringValueForKey:@"id"] forKey:@"subjectId"];
-                [subjectSource setValue:[parm stringValueForKey:@"name"] forKey:@"subjectName"];
+                [subjectSource setValue:[parm ks_stringValueForKey:@"id"] forKey:@"subjectId"];
+                [subjectSource setValue:[parm ks_stringValueForKey:@"name"] forKey:@"subjectName"];
                 [subjectArray addObject:subjectSource];
             }
             self.subjectList = [subjectArray mutableCopy];

+ 8 - 8
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageCourseView.m

@@ -129,8 +129,8 @@
     if (self.selectIndex == 1) { // 陪练课
         [KSNetworkingManager accompanyCourseRequest:KS_POST classMonth:self.chooseMonth status:nil subjectId:nil page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
             [self endRefresh];
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+                NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
                 for (NSDictionary *parm in sourceArray) {
                     AccompanyLessonModel *model = [[AccompanyLessonModel alloc] initWithDictionary:parm];
                     [self.dataArray addObject:model];
@@ -158,8 +158,8 @@
     else if (self.selectIndex == 2) { // 直播课
         [KSNetworkingManager LiveCourseGroupRequest:KS_POST groupStatus:@"APPLY" page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
             [self endRefresh];
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+                NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
                 for (NSDictionary *parm in sourceArray) {
                     LiveCourseModel *model = [[LiveCourseModel alloc] initWithDictionary:parm];
                     [self.dataArray addObject:model];
@@ -187,8 +187,8 @@
     else if (self.selectIndex == 4) { // 乐谱
         [KSNetworkingManager musicListRequest:KS_POST auditStatus:@"PASS" page:self.pages rows:self.rows search:self.searchKey subjectIds:self.subjectIds success:^(NSDictionary * _Nonnull dic) {
             [self endRefresh];
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+                NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
                 for (NSDictionary *parm in sourceArray) {
                     MusicMessageModel *model = [[MusicMessageModel alloc] initWithDictionary:parm];
                     [self.dataArray addObject:model];
@@ -769,7 +769,7 @@
         NSMutableArray *nameArray = [NSMutableArray array];
         [nameArray addObject:@"全部"];
         for (NSDictionary *parm in self.subjectList) {
-            [nameArray addObject:[parm stringValueForKey:@"subjectName"]];
+            [nameArray addObject:[parm ks_stringValueForKey:@"subjectName"]];
         }
         MJWeakSelf;
         KSChoosePicker *picker = [[KSChoosePicker alloc] initWithTitle:@"声部" sourceData:nameArray chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
@@ -780,7 +780,7 @@
             else {
                 weakSelf.searchView.subjectLabel.text = returnValue;
                 NSDictionary *parm = self.subjectList[chooseIndex-1];
-                weakSelf.subjectIds = [parm stringValueForKey:@"subjectId"];
+                weakSelf.subjectIds = [parm ks_stringValueForKey:@"subjectId"];
             }
             [weakSelf refreshAndRequestData];
         } cancel:^{

+ 6 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageMienBodyView.m

@@ -76,10 +76,10 @@
 - (void)requestData {
     [KSNetworkingManager queryTeacherStyleRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-            self.content = [result stringValueForKey:@"introduction"];
-            NSArray *videoList = [result arrayValueForKey:@"styleVideo"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
+            self.content = [result ks_stringValueForKey:@"introduction"];
+            NSArray *videoList = [result ks_arrayValueForKey:@"styleVideo"];
             [self.videoArray removeAllObjects];
             for (NSDictionary *parm in videoList) {
                 StyleVideoModel *model = [[StyleVideoModel alloc] initWithDictionary:parm];
@@ -97,8 +97,8 @@
 
 - (void)requestTeacherGroup {
     [KSNetworkingManager queryTeacherGroupRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [dic arrayValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [dic ks_arrayValueForKey:@"data"];
             NSMutableArray *groupArray = [NSMutableArray array];
             for (NSDictionary *parm in sourceArray) {
                 MinePageGroupModel *model = [[MinePageGroupModel alloc] initWithDictionary:parm];

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageVideoView.m

@@ -97,8 +97,8 @@
 - (void)requestData {
     [KSNetworkingManager videoLessonListRequest:KS_POST lessonSubject:nil auditStatus:@"PASS" pageNo:self.pages pageSize:self.rows success:^(NSDictionary * _Nonnull dic) {
         [self endRefresh];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
             for (NSDictionary *parm in sourceArray) {
                 VideoCourseModel *model = [[VideoCourseModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/FeedbackViewController.m

@@ -48,7 +48,7 @@
     [self showhud];
     [KSNetworkingManager suggestionAddRequest:KS_POST content:suggession mobileNo:phone success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             KSWeakSelf(weakSelf);
             [self KSShowMsg:@"提交成功" promptCompletion:^{
                 [weakSelf.navigationController popViewControllerAnimated:YES];

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/ModifyNameViewController.m

@@ -33,8 +33,8 @@
 
 - (void)requestConfig {
     [KSNetworkingManager queryByParamName:KS_GET paramName:@"last_username_month" success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSInteger month = [[dic dictionaryValueForKey:@"data"] integerValueForKey:@"paramValue"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSInteger month = [[dic ks_dictionaryValueForKey:@"data"] ks_integerValueForKey:@"paramValue"];
             self.bodyView.descLabel.hidden = NO;
             self.bodyView.descLabel.text = [NSString stringWithFormat:@"每隔%zd个月可修改一次",month];
         }
@@ -77,7 +77,7 @@
         [self showhud];
         [KSNetworkingManager imGroupModify:KS_POST name:self.bodyView.nameField.text groupId:self.groupId success:^(NSDictionary * _Nonnull dic) {
             [self removehub];
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
                 MJWeakSelf;
                 [self KSShowMsg:@"修改成功" promptCompletion:^{
                     if (weakSelf.callback) {
@@ -101,7 +101,7 @@
         [self showhud];
         [KSNetworkingManager modifyTeacherMessage:KS_POST avatal:avatal gender:gendar username:self.bodyView.nameField.text success:^(NSDictionary * _Nonnull dic) {
             [self removehub];
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
                 UserDefaultSetObjectForKey(self.bodyView.nameField.text, NicknameKey);
 
                 MJWeakSelf;

Some files were not shown because too many files changed in this diff