Browse Source

修改dict解析

Steven 1 year ago
parent
commit
5ae2864454
100 changed files with 868 additions and 867 deletions
  1. 3 3
      KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj
  2. 1 1
      KulexiuForStudent/KulexiuForStudent.xcodeproj/xcshareddata/xcschemes/KulexiuForStudent.xcscheme
  3. 26 26
      KulexiuForStudent/KulexiuForStudent/AppDelegate.m
  4. 2 2
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/chat_collegeTag.imageset/Contents.json
  5. 0 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/chat_collegeTag.imageset/chat_collegeTag@2x.png
  6. 0 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/chat_collegeTag.imageset/chat_collegeTag@3x.png
  7. 73 73
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSAccompanyWebViewController.m
  8. 82 82
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m
  9. 4 4
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m
  10. 6 6
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSOrderManager.m
  11. 16 16
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSRCIMDataSource.m
  12. 8 8
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSUploadManager.m
  13. 1 1
      KulexiuForStudent/KulexiuForStudent/Common/Define/UserKeyHeader.h
  14. 1 1
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Custom/NSString+MD5.m
  15. 15 16
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Extension/NSDictionary+Extension.h
  16. 22 20
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Extension/NSDictionary+Extension.m
  17. 18 18
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSChatConversationViewController.m
  18. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSChatListViewController.m
  19. 4 4
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSChatUserDetailViewController.m
  20. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/GroupApplyViewController.m
  21. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/GroupMemberViewController.m
  22. 5 5
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/GroupSettingViewController.m
  23. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/KSChatComplainController.m
  24. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Chat/GroupNotice/Controller/GroupNoticeEditController.m
  25. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Chat/GroupNotice/Controller/GroupNoticeViewController.m
  26. 4 4
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Model/KSChatLiveMessage.m
  27. 7 7
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Model/KSChatMusicMessage.m
  28. 4 4
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/ChatAddressBodyView.m
  29. 7 7
      KulexiuForStudent/KulexiuForStudent/Module/Classroom/Controller/NewClassRoomViewController.m
  30. 32 32
      KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/Controller/KSCloudViewController.m
  31. 3 3
      KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/View/SettingView/JudgePageView.m
  32. 10 10
      KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m
  33. 11 11
      KulexiuForStudent/KulexiuForStudent/Module/Course/Controller/CourseViewController.m
  34. 7 7
      KulexiuForStudent/KulexiuForStudent/Module/Course/MusicRoom/Controller/MusicRoomDetailViewController.m
  35. 41 41
      KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/HomeViewController.m
  36. 15 15
      KulexiuForStudent/KulexiuForStudent/Module/Home/NoticeCenter/Controller/NotiferMessageViewController.m
  37. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomePageView/HomeInformationBodyView.m
  38. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomePageView/HomePageBodyView.m
  39. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/KSLiveWebViewController.m
  40. 3 3
      KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m
  41. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveBlockUser.m
  42. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomDownSeat.m
  43. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomEnter.m
  44. 4 4
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomKickOut.m
  45. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomLeave.m
  46. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomLike.m
  47. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomMemberCount.m
  48. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomMemberUp.m
  49. 7 7
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomSeatApply.m
  50. 5 5
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomSeatResponse.m
  51. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomUserQuit.m
  52. 5 5
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomWelcome.m
  53. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveUnBlockUser.m
  54. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSRCShopRushMessage.m
  55. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/RCChatroomLikeCount.m
  56. 3 3
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/RCChatroomSeatsControl.m
  57. 13 13
      KulexiuForStudent/KulexiuForStudent/Module/Live/Model/KSEnterLiveroomManager.m
  58. 4 4
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/SeatContentView.m
  59. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/FirstSettingViewController.m
  60. 9 9
      KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/InstrumentChooseViewController.m
  61. 9 9
      KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/PasswordLoginController.m
  62. 7 7
      KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/SubjectChooseViewController.m
  63. 9 9
      KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/VefiCodeLoginController.m
  64. 7 7
      KulexiuForStudent/KulexiuForStudent/Module/Login/Model/UserInfoManager.m
  65. 16 16
      KulexiuForStudent/KulexiuForStudent/Module/Mine/AddressList/Controller/AddressDetailViewController.m
  66. 5 5
      KulexiuForStudent/KulexiuForStudent/Module/Mine/AddressList/Controller/AddressListViewController.m
  67. 15 15
      KulexiuForStudent/KulexiuForStudent/Module/Mine/AddressList/View/KSAddressPickerView.m
  68. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Controller/MineViewController.m
  69. 3 3
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Homework/Controller/HomeworkDetailViewController.m
  70. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Homework/View/HomeworkBodyView.m
  71. 4 4
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/Controller/MyCourseViewController.m
  72. 9 9
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyLessonBodyView.m
  73. 4 4
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyVideoCourseBodyView.m
  74. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/FeedbackViewController.m
  75. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/ModifyNameViewController.m
  76. 9 9
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/ModifyPhoneChangeController.m
  77. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/ModifyPhoneCheckController.m
  78. 7 7
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/ModifyViewController.m
  79. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/UserAuthViewController.m
  80. 3 3
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/UserSettingViewController.m
  81. 7 7
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/Controller/AccountDeleteViewController.m
  82. 3 3
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/NewWhiteboard/WhiteUtils.m
  83. 9 9
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/ClassroomService.m
  84. 7 7
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Message/MemberChangeMessage.m
  85. 8 8
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Model/ClassSongMessage.m
  86. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Model/Classroom.m
  87. 24 24
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Model/RoomMember.m
  88. 13 13
      KulexiuForStudent/Podfile.lock
  89. 13 13
      KulexiuForStudent/Pods/Manifest.lock
  90. 143 143
      KulexiuForStudent/Pods/Pods.xcodeproj/project.pbxproj
  91. 1 1
      KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/AFNetworking.xcscheme
  92. 1 1
      KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/Bugly.xcscheme
  93. 1 1
      KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/CHIPageControl.xcscheme
  94. 1 1
      KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/IQKeyboardManager.xcscheme
  95. 1 1
      KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/JCore.xcscheme
  96. 1 1
      KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/JPush.xcscheme
  97. 1 1
      KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/JXCategoryView.xcscheme
  98. 1 1
      KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/JXPagingView.xcscheme
  99. 1 1
      KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/MBProgressHUD.xcscheme
  100. 1 1
      KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/MJExtension.xcscheme

+ 3 - 3
KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj

@@ -6366,7 +6366,7 @@
 			isa = PBXProject;
 			attributes = {
 				BuildIndependentTargetsInParallel = 1;
-				LastUpgradeCheck = 1400;
+				LastUpgradeCheck = 1420;
 				TargetAttributes = {
 					275E8AA427E18F8800DD3F6E = {
 						CreatedOnToolsVersion = 13.2.1;
@@ -7727,7 +7727,7 @@
 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
 				INFOPLIST_KEY_UISupportsDocumentBrowser = YES;
 				INFOPLIST_KEY_UIUserInterfaceStyle = Light;
-				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",
@@ -7804,7 +7804,7 @@
 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
 				INFOPLIST_KEY_UISupportsDocumentBrowser = YES;
 				INFOPLIST_KEY_UIUserInterfaceStyle = Light;
-				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",

+ 1 - 1
KulexiuForStudent/KulexiuForStudent.xcodeproj/xcshareddata/xcschemes/KulexiuForStudent.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1400"
+   LastUpgradeVersion = "1420"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 26 - 26
KulexiuForStudent/KulexiuForStudent/AppDelegate.m

@@ -235,14 +235,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];
                             }
@@ -591,8 +591,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) {
@@ -602,21 +602,21 @@ 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;
                     [navCtrl popToRootViewControllerAnimated: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.courseId = [parm ks_stringValueForKey:@"courseId"];
                         CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
                         [navCtrl pushViewController:detailVC animated:YES];
                     }
@@ -669,7 +669,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;
@@ -715,7 +715,7 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
 
 - (void)showMemoAlert {
     if (_isShowFlashAlert == NO && self.messageDict != nil) {
-        [self showAlertWithMemo:[self.messageDict stringValueForKey:@"memo"] descMessage:[self.messageDict stringValueForKey:@"descMessage"] isforce:[self.messageDict boolValueForKey:@"isforce"] openUrl:[self.messageDict stringValueForKey:@"openUrl"]];
+        [self showAlertWithMemo:[self.messageDict ks_stringValueForKey:@"memo"] descMessage:[self.messageDict ks_stringValueForKey:@"descMessage"] isforce:[self.messageDict ks_boolValueForKey:@"isforce"] openUrl:[self.messageDict ks_stringValueForKey:@"openUrl"]];
     }
 }
 
@@ -768,8 +768,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];
@@ -861,9 +861,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;
@@ -887,20 +887,20 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
                         [navCtrl pushViewController:ctrl animated:YES];
                     }
                     else if ([pageType isEqualToString:@"liveRoom"]) { // 直播
-                        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) {
                             CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
-                            [KSEnterLiveroomManager joinLiveWithRoomId:[parm stringValueForKey:@"liveRoomId"] inController:navCtrl callback:^{
+                            [KSEnterLiveroomManager joinLiveWithRoomId:[parm ks_stringValueForKey:@"liveRoomId"] inController:navCtrl callback:^{
                                                             
                             }];
                         }
                     }
                 }
                 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;
@@ -955,9 +955,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];
@@ -985,25 +985,25 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
                 [navCtrl popToRootViewControllerAnimated: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.courseId = [parm ks_stringValueForKey:@"courseId"];
                     CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
                     [navCtrl pushViewController:detailVC animated:YES];
                 }
             }
             else if ([pageType isEqualToString:@"liveRoom"]) { // 直播
-                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) {
                     CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
-                    [KSEnterLiveroomManager joinLiveWithRoomId:[parm stringValueForKey:@"liveRoomId"] inController:navCtrl callback:^{
+                    [KSEnterLiveroomManager joinLiveWithRoomId:[parm ks_stringValueForKey:@"liveRoomId"] inController:navCtrl callback:^{
                                                     
                     }];
                 }
@@ -1056,7 +1056,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;

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/ChatTag/chat_talentTag.imageset/Contents.json → KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/chat_collegeTag.imageset/Contents.json

@@ -5,12 +5,12 @@
       "scale" : "1x"
     },
     {
-      "filename" : "chat_talentTag@2x.png",
+      "filename" : "chat_collegeTag@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
     {
-      "filename" : "chat_talentTag@3x.png",
+      "filename" : "chat_collegeTag@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/ChatTag/chat_talentTag.imageset/chat_talentTag@2x.png → KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/chat_collegeTag.imageset/chat_collegeTag@2x.png


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/ChatTag/chat_talentTag.imageset/chat_talentTag@3x.png → KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Chat/chat_collegeTag.imageset/chat_collegeTag@3x.png


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

@@ -151,7 +151,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"];
@@ -175,7 +175,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];
@@ -327,7 +327,7 @@
         NSLog(@"---- receive parm %@", [parm mj_JSONString]);
         // 回到主线程
         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];
@@ -335,7 +335,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];
@@ -352,51 +352,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;
@@ -404,14 +404,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];
@@ -419,7 +419,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];
@@ -428,28 +428,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) {
@@ -468,7 +468,7 @@
                 }
             }
 #pragma mark -------- 云教练原生播放对接
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cloudDetail"]) { // 初始化方法
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cloudDetail"]) { // 初始化方法
                 /**
                  api: 'cloudDetail',
                      content: {
@@ -485,17 +485,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];
@@ -514,7 +514,7 @@
                         
             }
 
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cloudGetMediaStatus"]) { // 获取播放状态
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cloudGetMediaStatus"]) { // 获取播放状态
             /**
              api: 'cloudGetMediaStatus',
                  content: {
@@ -530,14 +530,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: {
@@ -553,25 +553,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: {
@@ -583,7 +583,7 @@
                  [self postMessage:parm];
                  
             }
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cloudSetCurrentTime"]) { // // 跳转指定位置
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cloudSetCurrentTime"]) { // // 跳转指定位置
                 /**
                  api: 'cloudSetCurrentTime',
                      content: {
@@ -593,14 +593,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: {
@@ -612,9 +612,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];
@@ -622,7 +622,7 @@
                 [self postMessage:parm];
             }
             // 设置每个轨道音量
-            else if ([[parm stringValueForKey:@"api"] isEqualToString:@"cloudVolume"]) {
+            else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"cloudVolume"]) {
                 /**
                  api: 'cloudVolume',
                      content: {
@@ -635,9 +635,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];
@@ -647,18 +647,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;
@@ -667,9 +667,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];
                 }
@@ -677,9 +677,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];
                 }
@@ -687,9 +687,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"];
@@ -815,7 +815,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];
 }
 
@@ -845,7 +845,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];
@@ -1143,7 +1143,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];

+ 82 - 82
KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m

@@ -113,17 +113,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 {
@@ -330,20 +330,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;
@@ -352,22 +352,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) {
@@ -381,17 +381,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];
@@ -399,16 +399,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;
@@ -429,27 +429,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";
@@ -459,9 +459,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) {
@@ -472,22 +472,22 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             make.top.mas_equalTo(self.view.mas_top).offset(navHeight);
         }];
     }
-    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:@"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];
             ctrl.targetId = targetId;
@@ -495,7 +495,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;
@@ -506,15 +506,15 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             [self.navigationController pushViewController:ctrl animated:YES];
         }
     }
-    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;
@@ -523,27 +523,27 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
         }];
         [self.navigationController pushViewController:ctrl animated:YES];
     }
-    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 showhud];
         [KSEnterLiveroomManager joinLiveWithRoomId:roomId inController:(CustomNavViewController *)self.navigationController callback:^{
             [self removehub];
         }];
     }
-    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];
                 }
             }];
         }
@@ -553,27 +553,27 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             }
         }
     }
-    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];
@@ -582,8 +582,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];
     }
 }
@@ -682,16 +682,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 *saveLinkUrl = [content stringValueForKey:@"url"];
-    NSString *imgStr = [content stringValueForKey:@"image"];
+    NSString *shareTitle = [content ks_stringValueForKey:@"title"];
+    NSString *descMessage = [content ks_stringValueForKey:@"desc"];
+    NSString *videoUrl = [content ks_stringValueForKey:@"video"];
+    NSString *saveLinkUrl = [content ks_stringValueForKey:@"url"];
+    NSString *imgStr = [content ks_stringValueForKey:@"image"];
     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"]) {
@@ -702,9 +702,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"];

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m

@@ -83,13 +83,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);
@@ -120,13 +120,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
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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);
             }
@@ -114,16 +114,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);
         }

+ 8 - 8
KulexiuForStudent/KulexiuForStudent/Common/Base/KSUploadManager.m

@@ -82,13 +82,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];
@@ -161,7 +161,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];
                 
@@ -170,7 +170,7 @@
                     [sessions addObject:putObjRequest];
                 }
                 // token
-                [putObjRequest setStrKS3Token:[dic stringValueForKey:@"signature"]];
+                [putObjRequest setStrKS3Token:[dic ks_stringValueForKey:@"signature"]];
                 putObjRequest.filename = uploadFileName;
                 putObjRequest.data = fileData;
                 [putObjRequest setCompleteRequest];
@@ -235,13 +235,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;
@@ -283,13 +283,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
KulexiuForStudent/KulexiuForStudent/Common/Define/UserKeyHeader.h

@@ -54,7 +54,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
KulexiuForStudent/KulexiuForStudent/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]];
         }

+ 15 - 16
KulexiuForStudent/KulexiuForStudent/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,31 +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(内带判空)
@@ -56,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;
 
 /**
  从字典里取数组(内带判空)
@@ -78,7 +77,7 @@
  @param key 字典Key值
  @return NSArray
  */
-- (NSArray *)arrayValueForKey:(id)key;
+- (NSArray *)ks_arrayValueForKey:(id)key;
 
 /**
  从字典里取可变数组(内带判空)
@@ -86,7 +85,7 @@
  @param key 字典Key值
  @return NSMutableArray
  */
-- (NSMutableArray *)mutableArrayValueForKey:(NSString *)key;
+- (NSMutableArray *)ks_mutableArrayValueForKey:(NSString *)key;
 
 /**
  从字典里取字典(内带判空)
@@ -94,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
KulexiuForStudent/KulexiuForStudent/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

+ 18 - 18
KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSChatConversationViewController.m

@@ -325,12 +325,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];
@@ -348,8 +348,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;
@@ -378,13 +378,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:^{
@@ -457,8 +457,8 @@
             RCUserInfo *user = [[RCIM sharedRCIM] getGroupUserInfoCache:model.senderUserId withGroupId:self.targetId];
             NSDictionary *extraDic = [user.extra mj_JSONObject];
             
-            if ([[extraDic stringValueForKey:@"role"] isEqualToString:@"TEACHER"]) {
-                KSGroupTagImageView *avatarImage = [[KSGroupTagImageView alloc] initWithImage:[UIImage imageNamed:@"chat_talentTag"]];
+            if ([[extraDic ks_stringValueForKey:@"role"] isEqualToString:@"TEACHER"]) {
+                KSGroupTagImageView *avatarImage = [[KSGroupTagImageView alloc] initWithImage:[UIImage imageNamed:@"chat_collegeTag"]];
                 [contentView addSubview:avatarImage];
                 [avatarImage mas_makeConstraints:^(MASConstraintMaker *make) {
                     make.width.mas_equalTo(40);
@@ -468,7 +468,7 @@
                 }];
             }
             // owner
-            if ([[extraDic stringValueForKey:@"groupOwner"] isEqualToString:@"owner"]) {
+            if ([[extraDic ks_stringValueForKey:@"groupOwner"] isEqualToString:@"owner"]) {
                 
                 RCMessageCell *baseCell = (RCMessageCell *)cell;
                 
@@ -497,8 +497,8 @@
             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"]) {
-                KSGroupTagImageView *avatarImage = [[KSGroupTagImageView alloc] initWithImage:[UIImage imageNamed:@"chat_talentTag"]];
+            if ([[extraDic ks_stringValueForKey:@"role"] isEqualToString:@"TEACHER"]) {
+                KSGroupTagImageView *avatarImage = [[KSGroupTagImageView alloc] initWithImage:[UIImage imageNamed:@"chat_collegeTag"]];
                 [contentView addSubview:avatarImage];
                 [avatarImage mas_makeConstraints:^(MASConstraintMaker *make) {
                     make.width.mas_equalTo(40);
@@ -792,12 +792,12 @@
         [self displayStudent:userId];
     }
     else {
-        RCUserInfo *user = nil;
+//        RCUserInfo *user = nil;
         if (self.conversationType == ConversationType_PRIVATE) {
             RCUserInfo *user = [[RCIM sharedRCIM] getUserInfoCache:userId];
             
             NSDictionary *extraDic = [user.extra mj_JSONObject];
-            if ([[extraDic stringValueForKey:@"role"] isEqualToString:@"TEACHER"]) {
+            if ([[extraDic ks_stringValueForKey:@"role"] isEqualToString:@"TEACHER"]) {
                 [self displayTeacher:userId];
             }
             else {
@@ -807,7 +807,7 @@
         else {
             RCUserInfo *user = [[RCIM sharedRCIM] getGroupUserInfoCache:userId withGroupId:self.targetId];
             NSDictionary *extraDic = [user.extra mj_JSONObject];
-            if ([[extraDic stringValueForKey:@"role"] isEqualToString:@"TEACHER"]) {
+            if ([[extraDic ks_stringValueForKey:@"role"] isEqualToString:@"TEACHER"]) {
                 [self displayTeacher:userId];
             }
             else {

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

@@ -250,7 +250,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
KulexiuForStudent/KulexiuForStudent/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 {

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/GroupApplyViewController.m

@@ -119,8 +119,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
KulexiuForStudent/KulexiuForStudent/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;

+ 5 - 5
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/GroupSettingViewController.m

@@ -75,8 +75,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];
         }
@@ -91,8 +91,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];
@@ -223,7 +223,7 @@
 - (void)quitGroup {
     [self showhud];
     [KSNetworkingManager quitImGroupRequest: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
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/KSChatComplainController.m

@@ -87,7 +87,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
KulexiuForStudent/KulexiuForStudent/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];

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/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];

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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 {

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/Module/Classroom/Controller/NewClassRoomViewController.m

@@ -680,15 +680,15 @@ typedef NS_ENUM(NSInteger, ACCOMPANYACTION) {
     NSString *songId = [NSString stringWithFormat:@"%d", member.musicScoreAccompanimentId];
     
     NSDictionary *fileDic = UserDefaultObjectForKey(KSExamSongFileKey);
-    NSDictionary *storeDic = [fileDic dictionaryValueForKey:songId];
+    NSDictionary *storeDic = [fileDic ks_dictionaryValueForKey:songId];
     NSString *fileName = nil;
     NSString *filePath = nil;
     if (member.accompanimentPlayStatus) {
-        fileName = [[storeDic dictionaryValueForKey:@"accompany"] stringValueForKey:@"fileName"];
+        fileName = [[storeDic ks_dictionaryValueForKey:@"accompany"] ks_stringValueForKey:@"fileName"];
         filePath = [self getFilePathWithName:fileName];
     }
     else if (member.playStatus) {
-        fileName = [[storeDic dictionaryValueForKey:@"music"] stringValueForKey:@"fileName"];
+        fileName = [[storeDic ks_dictionaryValueForKey:@"music"] ks_stringValueForKey:@"fileName"];
         filePath = [self getFilePathWithName:fileName];
     }
     // 判断文件是否存在
@@ -868,7 +868,7 @@ typedef NS_ENUM(NSInteger, ACCOMPANYACTION) {
             fileDic = [NSMutableDictionary dictionary];
         }
         else {
-            storeDic = [NSMutableDictionary dictionaryWithDictionary:[fileDic dictionaryValueForKey:songId]];
+            storeDic = [NSMutableDictionary dictionaryWithDictionary:[fileDic ks_dictionaryValueForKey:songId]];
         }
         
         NSDictionary *parm = @{@"url" : songUrl,
@@ -893,10 +893,10 @@ typedef NS_ENUM(NSInteger, ACCOMPANYACTION) {
 - (BOOL)checkSongHasSave:(NSString *)songId songUrl:(NSString *)songUrl accompanyUrl:(NSString *)accompanyUrl {
     BOOL hasSaveFile = NO;
     NSMutableDictionary *fileDic = UserDefaultObjectForKey(KSExamSongFileKey);
-    NSDictionary *storeDic = [fileDic dictionaryValueForKey:songId];
+    NSDictionary *storeDic = [fileDic ks_dictionaryValueForKey:songId];
     NSFileManager *fileManager = [NSFileManager defaultManager];
     if (![NSString isEmptyString:songUrl]) {
-        NSString *fileName = [[storeDic dictionaryValueForKey:@"music"] stringValueForKey:@"fileName"];
+        NSString *fileName = [[storeDic ks_dictionaryValueForKey:@"music"] ks_stringValueForKey:@"fileName"];
         NSString *filePath = [self getFilePathWithName:fileName];
         if ([[fileDic allKeys] containsObject:songId] && [fileManager fileExistsAtPath:filePath] && ![NSString isEmptyString:fileName]) {
             hasSaveFile = YES;
@@ -906,7 +906,7 @@ typedef NS_ENUM(NSInteger, ACCOMPANYACTION) {
         }
     }
     if (![NSString isEmptyString:accompanyUrl]) {
-        NSString *fileName = [[storeDic dictionaryValueForKey:@"accompany"] stringValueForKey:@"fileName"];
+        NSString *fileName = [[storeDic ks_dictionaryValueForKey:@"accompany"] ks_stringValueForKey:@"fileName"];
         NSString *filePath = [self getFilePathWithName:fileName];
         if ([[fileDic allKeys] containsObject:songId] && [fileManager fileExistsAtPath:filePath] && ![NSString isEmptyString:fileName]) {
             hasSaveFile = YES;

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

@@ -333,7 +333,7 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
     self.beatType = MetronomeType4V4;
     NSString *savePath = [CloudSongMessageModel getSaveSpeedPath];
     NSDictionary *speedDic = [NSMutableDictionary dictionaryWithContentsOfFile:savePath];
-    NSInteger speed = [speedDic integerValueForKey:self.songMessageSource.examSongId];
+    NSInteger speed = [speedDic ks_integerValueForKey:self.songMessageSource.examSongId];
     if (speed != 0) {
         self.currentSpeed = speed;
     }
@@ -349,13 +349,13 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
     // 根据当前声部获取对应的音高对应图片
     NSString *subjectId = self.songMessageSource.subjectId;
     
-    NSDictionary *subjectDic = [fingerSubjectDic dictionaryValueForKey:subjectId];
+    NSDictionary *subjectDic = [fingerSubjectDic ks_dictionaryValueForKey:subjectId];
     if (subjectDic) {
-        NSString *subjectName = [subjectDic stringValueForKey:@"name"];
-        BOOL isVertical = [subjectDic boolValueForKey:@"vertical"];
+        NSString *subjectName = [subjectDic ks_stringValueForKey:@"name"];
+        BOOL isVertical = [subjectDic ks_boolValueForKey:@"vertical"];
         self.isVertical = isVertical;
         
-        NSDictionary *fingerSource = [imageDict dictionaryValueForKey:subjectName];
+        NSDictionary *fingerSource = [imageDict ks_dictionaryValueForKey:subjectName];
         self.fingerImageDic = [NSDictionary dictionaryWithDictionary:fingerSource];
         
         NSString *fullImageName = [NSString stringWithFormat:@"%@full",subjectName];
@@ -425,14 +425,14 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
         config = [NSDictionary dictionaryWithDictionary:newConfig];
     }
     
-    self.eyeShieldOn = [config boolValueForKey:@"eyeshield"];
-    self.soundCheckOn = [config boolValueForKey:@"soundCheck"];
-    self.cameraOn = [config boolValueForKey:@"cameraOn"];
-    self.isNeedRepeat = [config boolValueForKey:@"repeatOn"];
-    self.showFinger = [config boolValueForKey:@"showFinger"];
-    self.level = [config stringValueForKey:@"level"];
-    self.saveVideo = [config boolValueForKey:@"save"];
-    self.accompanyOn = [config boolValueForKey:@"accompanyOn"];
+    self.eyeShieldOn = [config ks_boolValueForKey:@"eyeshield"];
+    self.soundCheckOn = [config ks_boolValueForKey:@"soundCheck"];
+    self.cameraOn = [config ks_boolValueForKey:@"cameraOn"];
+    self.isNeedRepeat = [config ks_boolValueForKey:@"repeatOn"];
+    self.showFinger = [config ks_boolValueForKey:@"showFinger"];
+    self.level = [config ks_stringValueForKey:@"level"];
+    self.saveVideo = [config ks_boolValueForKey:@"save"];
+    self.accompanyOn = [config ks_boolValueForKey:@"accompanyOn"];
     
     NSMutableDictionary *saveConfig = [NSMutableDictionary dictionaryWithDictionary:config];
     [saveConfig setValue:self.songMessageSource.behaviorId forKey:@"behaviorId"];
@@ -473,8 +473,8 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
 //        songPath = [[NSBundle mainBundle] pathForResource:@"Danza_Del_Fuego" ofType:@"mid"];
         
         NSDictionary *xmlParm = [KSXMLInfoParse getInfoFromXMLMusicFile:xmlFile];
-        self.nodeArray = [NSMutableArray arrayWithArray:[xmlParm arrayValueForKey:@"noteInfo"]];
-        self.beatType = [self getBeatTypeFromString:[xmlParm stringValueForKey:@"beatType"]];
+        self.nodeArray = [NSMutableArray arrayWithArray:[xmlParm ks_arrayValueForKey:@"noteInfo"]];
+        self.beatType = [self getBeatTypeFromString:[xmlParm ks_stringValueForKey:@"beatType"]];
         self.manager = [[KYSourceParseManager alloc] init];
         [self.manager parseMessageSource:measurePath nodeSource:nodeSourePath];
         
@@ -648,20 +648,20 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
     if (_isEvaluating == NO) { // 非评测状态下不处理
         return;
     }
-    NSString *commond = [[messageDic dictionaryValueForKey:@"header"] stringValueForKey:@"commond"];
+    NSString *commond = [[messageDic ks_dictionaryValueForKey:@"header"] ks_stringValueForKey:@"commond"];
     if ([commond isEqualToString:@"measureScore"]) { // 评测返回数据
-        NSDictionary *body = [messageDic dictionaryValueForKey:@"body"];
-        NSInteger score = [body integerValueForKey:@"score"];
-        NSInteger measureIndex = [body integerValueForKey:@"measureIndex"];
+        NSDictionary *body = [messageDic ks_dictionaryValueForKey:@"body"];
+        NSInteger score = [body ks_integerValueForKey:@"score"];
+        NSInteger measureIndex = [body ks_integerValueForKey:@"measureIndex"];
         [self displayScore:score measureIndex:measureIndex];
     }
     else if ([commond isEqualToString:@"overall"]) { // 弹窗结果
-        NSDictionary *body = [messageDic dictionaryValueForKey:@"body"];
-        self.recordId = [body integerValueForKey:@"recordId"];
-        NSInteger score = [body integerValueForKey:@"score"];
-        NSInteger intonation = [body integerValueForKey:@"intonation"];
-        NSInteger integrity = [body integerValueForKey:@"integrity"];
-        NSInteger cadence = [body integerValueForKey:@"cadence"];
+        NSDictionary *body = [messageDic ks_dictionaryValueForKey:@"body"];
+        self.recordId = [body ks_integerValueForKey:@"recordId"];
+        NSInteger score = [body ks_integerValueForKey:@"score"];
+        NSInteger intonation = [body ks_integerValueForKey:@"intonation"];
+        NSInteger integrity = [body ks_integerValueForKey:@"integrity"];
+        NSInteger cadence = [body ks_integerValueForKey:@"cadence"];
         self.resultAlert = [EvaluateResultAlert shareInstance];
         self.resultAlert.frame = CGRectMake(0, 0, KLandscapeWidth, KLandscapeHeight);
         [self.resultAlert configWithScore:score intonation:intonation cadence:cadence integrity:integrity];
@@ -675,8 +675,8 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
         NSTimeInterval interval = [[NSDate date] timeIntervalSince1970];
         long long currentMilliseconds = interval * 1000;
         
-        NSDictionary *body = [messageDic dictionaryValueForKey:@"body"];
-        float frequency = [body doubleValueForKey:@"frequency"];
+        NSDictionary *body = [messageDic ks_dictionaryValueForKey:@"body"];
+        float frequency = [body ks_doubleValueForKey:@"frequency"];
         float baseFrequency = [KSXMLInfoParse parsePitchToHZ:self.checkPitch];
         if (frequency - baseFrequency > 5.0) { // 高了
             self.correctTimeInterval = 0.0f;
@@ -1152,7 +1152,7 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
     [self showhud];
     [KSNetworkingManager cloudFeedbackRequest:KS_POST content:content type:type 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.feedbackView removeFromSuperview];
         }
@@ -1613,9 +1613,9 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
     if (self.needShowFinger && self.fingerImageDic != nil) {
         
         NSMutableDictionary *parm  = self.nodeArray[self.lastPlayNodeIndex];
-        NSInteger noteValue = [parm integerValueForKey:@"note_value"];
+        NSInteger noteValue = [parm ks_integerValueForKey:@"note_value"];
 
-        NSArray *noteFingerArray = [self.fingerImageDic arrayValueForKey:[NSString stringWithFormat:@"%zd",noteValue]];
+        NSArray *noteFingerArray = [self.fingerImageDic ks_arrayValueForKey:[NSString stringWithFormat:@"%zd",noteValue]];
         // 剔除
         [self.fingerContentView removeAllSubViews];
         
@@ -1998,8 +1998,8 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
     }
     for (NSMutableDictionary *parm in self.nodeArray) {
         NSMutableDictionary *node = [parm mutableCopy];
-        float timeSapmle = [node floatValueForKey:@"timeStamp"];
-        float duration = [node floatValueForKey:@"duration"];
+        float timeSapmle = [node ks_floatValueForKey:@"timeStamp"];
+        float duration = [node ks_floatValueForKey:@"duration"];
         timeSapmle = timeSapmle * (120.0 / speed);
         duration = duration * (120.0 / speed);
         [node setValue:@(timeSapmle) forKey:@"timeStamp"];

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

@@ -73,9 +73,9 @@
     NSDictionary *config = [[NSUserDefaults standardUserDefaults] dictionaryForKey:@"cloudConfig"];
     
     self.configDict = [NSMutableDictionary dictionaryWithDictionary:config];
-    self.level = [config stringValueForKey:@"level"];
-    self.accompanyOn = [config boolValueForKey:@"accompanyOn"];
-    self.saveVideo = [config boolValueForKey:@"save"];
+    self.level = [config ks_stringValueForKey:@"level"];
+    self.accompanyOn = [config ks_boolValueForKey:@"accompanyOn"];
+    self.saveVideo = [config ks_boolValueForKey:@"save"];
     if ([self.level isEqualToString:@"BEGINNER"]) {
         
     }

+ 10 - 10
KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m

@@ -76,10 +76,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];
@@ -92,8 +92,8 @@
 
 - (void)requestHomeworkMessage {
     [KSNetworkingManager homeworkDetailRequest:KS_GET courseId:self.courseId 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:@","]];
@@ -135,8 +135,8 @@
 
 - (void)requestEvaluateMessage {
     [KSNetworkingManager selectRepliedRequest:KS_POST courseGroupId:self.courseGroupId courseScheduleId:self.courseId 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];
@@ -283,7 +283,7 @@
     [self showhud];
     [KSNetworkingManager accompanyCourseRepliedRequest:KS_POST courseScheduleId:self.courseId courseGroupId:self.courseGroupId studentReplied:content score:starNum 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];
         }
@@ -477,7 +477,7 @@
     [self showhud];
     [KSNetworkingManager homeSubmitAction:KS_POST courseScheduleId:self.courseId attachment:attachment 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];
             self.isModify = NO;

+ 11 - 11
KulexiuForStudent/KulexiuForStudent/Module/Course/Controller/CourseViewController.m

@@ -316,8 +316,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"];
@@ -339,17 +339,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];

+ 7 - 7
KulexiuForStudent/KulexiuForStudent/Module/Course/MusicRoom/Controller/MusicRoomDetailViewController.m

@@ -70,10 +70,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];
@@ -87,8 +87,8 @@
     [self showhud];
     [KSNetworkingManager homeworkDetailRequest:KS_GET courseId:self.courseId success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
-        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:@","]];
@@ -412,7 +412,7 @@
     [self showhud];
     [KSNetworkingManager homeSubmitAction:KS_POST courseScheduleId:self.courseId attachment:attachment 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];
             self.isModify = NO;

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

@@ -404,8 +404,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) {
@@ -424,10 +424,10 @@
     NSString *todayString = [dateFormatter stringFromDate:currendDate];
     
     if (awardAlertDic) {
-        NSString *awardAlertTime = [awardAlertDic stringValueForKey:@"time"];
+        NSString *awardAlertTime = [awardAlertDic ks_stringValueForKey:@"time"];
         
         if (![NSString isEmptyString:awardAlertTime]) {
-            NSString *userId = [awardAlertDic stringValueForKey:@"userId"];
+            NSString *userId = [awardAlertDic ks_stringValueForKey:@"userId"];
             if ([todayString isEqualToString:awardAlertTime] && [userId isEqualToString:UserDefaultObjectForKey(UIDKey)]) {
                 return YES;
             }
@@ -472,16 +472,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) {
@@ -502,8 +502,8 @@
 - (void)requestUserInfo:(BOOL)checkSubject {
     self.isFirstLoad = NO;
     [KSNetworkingManager queryStudentInfoRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            self.mineInfo = [[StudentInfoModel alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            self.mineInfo = [[StudentInfoModel alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             NSString *rongToken = UserDefault(RongTokenKey);
             if ([NSString isEmptyString:rongToken]) {
                 [USER_MANAGER queryUserInfoConnectRongCloud:YES];
@@ -551,10 +551,10 @@
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager homeNewsList: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];
@@ -563,7 +563,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];
@@ -572,13 +572,13 @@
             self.buttonArray = [NSMutableArray arrayWithArray:buttonInfoArray];
             
             // news
-            NSArray *flashArray = [result arrayValueForKey:@"flashPage"];
+            NSArray *flashArray = [result ks_arrayValueForKey:@"flashPage"];
             if (flashArray.count) {
                 self.flashModel = [[HomeMessageModel alloc] initWithDictionary:[flashArray firstObject]];
             }
             
             // 首页悬浮按钮
-            NSArray *suspensionArray = [result arrayValueForKey:@"suspension"];
+            NSArray *suspensionArray = [result ks_arrayValueForKey:@"suspension"];
             if (suspensionArray.count) {
                 self.buttonModel = [[HomeMessageModel alloc] initWithDictionary:[suspensionArray firstObject]];
             }
@@ -598,8 +598,8 @@
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager HomeHotAlbumRequest:KS_POST page:1 rows:10 version:[USER_MANAGER getCurrentVersion] 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];
@@ -621,9 +621,9 @@
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager homeQueryLiveAndVideo:KS_GET version:[USER_MANAGER getCurrentVersion] success:^(NSDictionary * _Nonnull dic) {
         dispatch_group_leave(self.requestGroup);
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *sourceDic = [dic dictionaryValueForKey:@"data"];
-            NSArray *liveList = [sourceDic arrayValueForKey:@"liveList"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *sourceDic = [dic ks_dictionaryValueForKey:@"data"];
+            NSArray *liveList = [sourceDic ks_arrayValueForKey:@"liveList"];
             NSMutableArray *liveCourse = [NSMutableArray array];
             for (NSDictionary *parm in liveList) {
                 HomeLiveGroupModel *model = [[HomeLiveGroupModel alloc] initWithDictionary:parm];
@@ -631,7 +631,7 @@
             }
             self.liveCourseArray = [NSMutableArray arrayWithArray:liveCourse];
             
-            NSArray *videoList = [sourceDic arrayValueForKey:@"videoList"];
+            NSArray *videoList = [sourceDic ks_arrayValueForKey:@"videoList"];
             NSMutableArray *videoCourse = [NSMutableArray array];
             for (NSDictionary *parm in videoList) {
                 HomeVideoGroupModel *model = [[HomeVideoGroupModel alloc] initWithDictionary:parm];
@@ -640,7 +640,7 @@
             self.videoCourseArray = [NSMutableArray arrayWithArray:videoCourse];
             
             // 最近课程
-            NSDictionary *parm = [sourceDic dictionaryValueForKey:@"recentCourses"];
+            NSDictionary *parm = [sourceDic ks_dictionaryValueForKey:@"recentCourses"];
             if (parm == nil) {
                 self.recentCourseModel = nil;
             }
@@ -661,8 +661,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];
@@ -687,9 +687,9 @@
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager homeAppMusicSheetRequest: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"];
-            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];
@@ -697,7 +697,7 @@
             }
             self.musicArray = [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];
@@ -705,7 +705,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];
@@ -726,8 +726,8 @@
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager queryHotTeacherListRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
         dispatch_group_leave(self.requestGroup);
-        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 *talentArray = [NSMutableArray array];
             for (NSDictionary *parm in sourceArray) {
                 TalentTeacherModel *model = [[TalentTeacherModel alloc] initWithDictionary:parm];
@@ -747,8 +747,8 @@
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager homeQueryTeacherStyle:KS_POST page:1 rows:10 version:[USER_MANAGER getCurrentVersion] 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 *styleArray = [NSMutableArray array];
             for (NSDictionary *parm in sourceArray) {
                 TeacherStyleModel *model = [[TeacherStyleModel alloc] initWithDictionary:parm];
@@ -769,8 +769,8 @@
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager queryTeacherLivingListRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
         dispatch_group_leave(self.requestGroup);
-        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 *liveListArray = [NSMutableArray array];
             for (NSDictionary *parm in sourceArray) {
                 HomeTeacherLiveModel *model = [[HomeTeacherLiveModel alloc] initWithDictionary:parm];
@@ -791,8 +791,8 @@
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager informationListRequest:KS_POST page:1 rows:10 version:[USER_MANAGER getCurrentVersion] 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 *informationInfoArray = [NSMutableArray array];
             for (NSDictionary *parm in sourceArray) {
                 HomeMessageModel *model = [[HomeMessageModel alloc] initWithDictionary:parm];
@@ -1439,7 +1439,7 @@
     [self showhud];
     [KSNetworkingManager starOrUnStarRequest:KS_GET userId:teacherId starStatus:@"1" 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:^{

+ 15 - 15
KulexiuForStudent/KulexiuForStudent/Module/Home/NoticeCenter/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];
@@ -117,16 +117,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) {
@@ -163,9 +163,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];
@@ -219,7 +219,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;
@@ -241,16 +241,16 @@
         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:@"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.courseId = [parm ks_stringValueForKey:@"courseId"];
                         [self.navigationController pushViewController:detailVC animated:YES];
                     }
                 }
@@ -259,7 +259,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
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomePageView/HomeInformationBodyView.m

@@ -77,8 +77,8 @@
 - (void)requestData {
     [KSNetworkingManager informationListRequest:KS_POST page:self.pages rows:self.rows version:[USER_MANAGER getCurrentVersion] 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"];
             NSMutableArray *informationArray = [NSMutableArray array];
             for (NSDictionary *parm in sourceArray) {
                 HomeMessageModel *model = [[HomeMessageModel alloc] initWithDictionary:parm];

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomePageView/HomePageBodyView.m

@@ -82,8 +82,8 @@
 - (void)requestData {
     [KSNetworkingManager homeQueryTeacherStyle:KS_POST page:self.pages rows:self.rows version:[USER_MANAGER getCurrentVersion] 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"];
             NSMutableArray *styleArray = [NSMutableArray array];
             for (NSDictionary *parm in sourceArray) {
                 TeacherStyleModel *model = [[TeacherStyleModel alloc] initWithDictionary:parm];

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/KSLiveWebViewController.m

@@ -26,7 +26,7 @@
 
 
 - (void)handleScriptMessageSource:(NSDictionary *)parm {
-    if ([[parm stringValueForKey:@"api"] isEqualToString:@"joinLiveRoom"]) {
+    if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"joinLiveRoom"]) {
         [self backAction];
     }
     else {

+ 3 - 3
KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m

@@ -224,7 +224,7 @@ static int clickPraiseBtnTimes  = 0;
         if (self.hasSendWelcomeMessage) { // 如果已经发送了进入消息
             // 查询是否直播间开启
             [KSNetworkingManager liveRoomJoinRoomRequest: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:^{
@@ -1286,11 +1286,11 @@ static int clickPraiseBtnTimes  = 0;
 #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) {
         

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveBlockUser.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.userId = [[json dictionaryValueForKey:@"content"] stringValueForKey:@"userId"];
+    self.userId = [[json ks_dictionaryValueForKey:@"content"] ks_stringValueForKey:@"userId"];
     NSDictionary *userinfoDic = dictionary[@"user"];
     [self decodeUserInfo:userinfoDic];
 }

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomLike.m

@@ -33,8 +33,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
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomMemberUp.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 dictionaryValueForKey:@"content"] integerValueForKey:@"count"];
+    self.count = [[json ks_dictionaryValueForKey:@"content"] ks_integerValueForKey:@"count"];
     NSDictionary *userinfoDic = dictionary[@"user"];
     [self decodeUserInfo:userinfoDic];
 }

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

@@ -59,13 +59,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
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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];
     }

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveUnBlockUser.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.userId = [[json dictionaryValueForKey:@"content"] stringValueForKey:@"userId"];
+    self.userId = [[json ks_dictionaryValueForKey:@"content"] ks_stringValueForKey:@"userId"];
     NSDictionary *userinfoDic = dictionary[@"user"];
     [self decodeUserInfo:userinfoDic];
 }

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

@@ -33,8 +33,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
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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];
 }

+ 13 - 13
KulexiuForStudent/KulexiuForStudent/Module/Live/Model/KSEnterLiveroomManager.m

@@ -14,8 +14,8 @@
     [KSNetworkingManager liveRoomJoinRoomRequest:KS_GET roomUid:roomId success:^(NSDictionary * _Nonnull dic) {
         callback();
         
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            [self joinRoomWithMessage:[dic dictionaryValueForKey:@"data"] controller:navCtrl];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            [self joinRoomWithMessage:[dic ks_dictionaryValueForKey:@"data"] controller:navCtrl];
         }
         else {
             [self MBShowInWindow:MESSAGEKEY];
@@ -27,22 +27,22 @@
 
 + (void)joinRoomWithMessage:(NSDictionary *)source controller:(CustomNavViewController *)navCtrl {
     LiveVideoRoomViewController *liveVC = [[LiveVideoRoomViewController alloc] init];
-    liveVC.roomId = [source stringValueForKey:@"roomUid"];
+    liveVC.roomId = [source ks_stringValueForKey:@"roomUid"];
     liveVC.liveRoleType = RCRTCLiveRoleTypeAudience;
-    liveVC.createrId = [source stringValueForKey:@"speakerId"];
-    liveVC.createrName = [source stringValueForKey:@"speakerName"];
-    liveVC.createrAvatal = [source stringValueForKey:@"speakerPic"];
-    liveVC.likeCount = [source integerValueForKey:@"likeNum"]; // 点赞数
-    NSInteger lookCount = [source integerValueForKey:@"lookNum"] + 1;
-    liveVC.blacklistFlag = [source integerValueForKey:@"blacklistFlag"] == 1 ? YES : NO;
+    liveVC.createrId = [source ks_stringValueForKey:@"speakerId"];
+    liveVC.createrName = [source ks_stringValueForKey:@"speakerName"];
+    liveVC.createrAvatal = [source ks_stringValueForKey:@"speakerPic"];
+    liveVC.likeCount = [source ks_integerValueForKey:@"likeNum"]; // 点赞数
+    NSInteger lookCount = [source ks_integerValueForKey:@"lookNum"] + 1;
+    liveVC.blacklistFlag = [source ks_integerValueForKey:@"blacklistFlag"] == 1 ? YES : NO;
     liveVC.totalCount = lookCount; // 观看人数
-    BOOL isTemp = [[source stringValueForKey:@"roomType"] isEqualToString:@"TEMP"];
+    BOOL isTemp = [[source ks_stringValueForKey:@"roomType"] isEqualToString:@"TEMP"];
     liveVC.isTempRoom = isTemp;
     if (isTemp == NO) {
-        liveVC.liveEndTime = [source stringValueForKey:@"liveEndTime"];
-        liveVC.expiredMinute = [source integerValueForKey:@"expiredMinute"];
+        liveVC.liveEndTime = [source ks_stringValueForKey:@"liveEndTime"];
+        liveVC.expiredMinute = [source ks_integerValueForKey:@"expiredMinute"];
     }
-    liveVC.enableSeat = ![source boolValueForKey:@"whether_mic"];
+    liveVC.enableSeat = ![source ks_boolValueForKey:@"whether_mic"];
 
     CustomNavViewController *liveNav = [[CustomNavViewController alloc] initWithRootViewController:liveVC];
     liveNav.modalPresentationStyle = UIModalPresentationFullScreen;

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/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------");

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/FirstSettingViewController.m

@@ -87,7 +87,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);

+ 9 - 9
KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/InstrumentChooseViewController.m

@@ -106,8 +106,8 @@
     [self showhud];
     [KSNetworkingManager studentQuerySubject: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];
@@ -128,10 +128,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];
@@ -208,7 +208,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;
@@ -219,10 +219,10 @@
 - (UICollectionView *)collectionView {
     if (!_collectionView) {
         UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
-        CGFloat width = (kScreen_Width - 15 * 2 - 20) / 3.0f;
+        CGFloat width = (NSInteger)((KPortraitWidth - 15 * 2 - 20) / 3.0f);
         CGFloat height = width;
         layout.itemSize = CGSizeMake(width, height);
-        layout.headerReferenceSize = CGSizeMake(kScreen_Width - 30, 40);
+        layout.headerReferenceSize = CGSizeMake(KPortraitWidth - 30, 40);
         _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
         _collectionView.backgroundColor = [UIColor clearColor];
         _collectionView.delegate = self;
@@ -259,7 +259,7 @@
     NSString *subjectId = model.internalBaseClassIdentifier;
     [self showhud];
     [KSNetworkingManager studentSetSubject:KS_GET subjectIds:subjectId 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.callback) {

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

@@ -64,17 +64,17 @@
     }
     else if (action == PWDLOGIN_LOGIN) {
         [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];
                 

+ 7 - 7
KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/SubjectChooseViewController.m

@@ -60,8 +60,8 @@
     [self showhud];
     [KSNetworkingManager studentQuerySubject: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];
@@ -81,10 +81,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];
@@ -120,7 +120,7 @@
     }
     NSMutableArray *titleArray = [NSMutableArray array];
     for (NSDictionary *parm in self.parentArray) {
-        [titleArray addObject:[parm stringValueForKey:@"subjectName"]];
+        [titleArray addObject:[parm ks_stringValueForKey:@"subjectName"]];
     }
     [self.segCtrl configWithArray:titleArray];
     NSMutableArray *sourceArray = self.instrumentArray[self.chooseIndex];
@@ -256,7 +256,7 @@
     NSString *subjectId = self.chooseInstrument.internalBaseClassIdentifier;
     [self showhud];
     [KSNetworkingManager studentSetSubject:KS_GET subjectIds:subjectId 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.callback) {

+ 9 - 9
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/Module/Login/Model/UserInfoManager.m

@@ -119,7 +119,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 {
@@ -133,9 +133,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;
@@ -297,8 +297,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);
@@ -347,9 +347,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;

+ 16 - 16
KulexiuForStudent/KulexiuForStudent/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"];
     
 }
 
@@ -139,14 +139,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];
@@ -156,14 +156,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
KulexiuForStudent/KulexiuForStudent/Module/Mine/AddressList/Controller/AddressListViewController.m

@@ -83,15 +83,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];
@@ -167,12 +167,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
KulexiuForStudent/KulexiuForStudent/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:@""];

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/Mine/Controller/MineViewController.m

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

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

@@ -89,8 +89,8 @@
     [self showhud];
     [KSNetworkingManager homeworkDetailRequest:KS_GET courseId:self.courseId 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 {
@@ -339,7 +339,7 @@
     [self showhud];
     [KSNetworkingManager homeSubmitAction:KS_POST courseScheduleId:self.courseId attachment:attachment 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];
             self.isModify = NO;

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/Mine/Homework/View/HomeworkBodyView.m

@@ -111,8 +111,8 @@
     [KSNetworkingManager homeworkListRequest:KS_POST date:self.chooseDate submit:hasSubmit page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
         NSLog(@"%@",[dic mj_JSONString]);
         [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];

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/Controller/MyCourseViewController.m

@@ -98,14 +98,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];

+ 9 - 9
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyLessonBodyView.m

@@ -130,8 +130,8 @@
     if (self.selectIndex == 0) { // 陪练课
         [KSNetworkingManager queryStudentPracticeCourse: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];
@@ -159,8 +159,8 @@
     else if (self.selectIndex == 1) { // 直播课
         [KSNetworkingManager queryMyLiveCourse: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];
@@ -188,8 +188,8 @@
     else { // 琴房课
         [KSNetworkingManager queryPianoClassRequest: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) {
                     MusicRoomListModel *model = [[MusicRoomListModel alloc] initWithDictionary:parm];
                     [self.dataArray addObject:model];
@@ -271,7 +271,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) {
@@ -282,7 +282,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];
@@ -386,7 +386,7 @@
         }
         else {
             NSDictionary *parm = self.subjectMessageArray[chooseIndex-1];
-            self.subjectId = [parm stringValueForKey:@"subjectId"];
+            self.subjectId = [parm ks_stringValueForKey:@"subjectId"];
         }
     }
     [self resetParamenter];

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyVideoCourseBodyView.m

@@ -92,8 +92,8 @@
 - (void)requestData {
     [KSNetworkingManager videoLessonGroupRequest:KS_POST lessonSubject: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) {
                 VideoCourseModel *model = [[VideoCourseModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];
@@ -158,7 +158,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) {
@@ -169,7 +169,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];

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

@@ -49,7 +49,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];

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

@@ -62,7 +62,7 @@
     [self showhud];
     [KSNetworkingManager modifyUserMessage:KS_POST avatal:avatal gender:gendar username:self.bodyView.nameField.text birthdate:birthday 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) {

+ 9 - 9
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/ModifyPhoneChangeController.m

@@ -49,7 +49,7 @@
 }
 
 - (void)operationWithAction:(CHANGEACTION)action parm:(NSDictionary *)parm {
-    if (![NSString isMobilePhoneNumber:[parm stringValueForKey:@"phone"]]) {
+    if (![NSString isMobilePhoneNumber:[parm ks_stringValueForKey:@"phone"]]) {
         [self MBPShow:@"手机号码输入有误"];
         return;
     }
@@ -65,12 +65,12 @@
 #pragma mark --- 修改手机号
 - (void)modifyPhoneWithParm:(NSDictionary *)parm {
     [self showhud];
-    [KSNetworkingManager updatePhoneRequest:KS_POST oldPhone:self.prePhone authCode:[parm stringValueForKey:@"code"] newPhone:[parm stringValueForKey:@"phone"] success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager updatePhoneRequest:KS_POST oldPhone:self.prePhone authCode:[parm ks_stringValueForKey:@"code"] newPhone:[parm ks_stringValueForKey:@"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"]) {
             MJWeakSelf;
             [self KSShowMsg:@"修改成功" promptCompletion:^{
-                UserDefaultSet([parm stringValueForKey:@"phone"], PHONEKEY);
+                UserDefaultSet([parm ks_stringValueForKey:@"phone"], PHONEKEY);
                 [[NSUserDefaults standardUserDefaults] synchronize];
                 [weakSelf successChangeBack];
             }];
@@ -108,7 +108,7 @@
 
 #pragma mark --- 验证码
 - (void)veriCheckWithParm:(NSDictionary *)parm {
-    NSString *phoneNo = [parm stringValueForKey:@"phone"];
+    NSString *phoneNo = [parm ks_stringValueForKey:@"phone"];
     // 图形化验证
     VeriCheckView *view = [VeriCheckView shareInstanceShowInView:self.view];
     __weak typeof(view) weakView = view;
@@ -120,8 +120,8 @@
 
 - (void)veriImageCodeWithParm:(NSDictionary *)parm checkView:(VeriCheckView *)checkView {
     [self showhud];
-    [KSNetworkingManager verifyLoginImageRequest:KS_POST phone:[parm stringValueForKey:@"phone"] code:[parm stringValueForKey:@"code"] success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+    [KSNetworkingManager verifyLoginImageRequest:KS_POST phone:[parm ks_stringValueForKey:@"phone"] code:[parm ks_stringValueForKey:@"code"] success:^(NSDictionary * _Nonnull dic) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [checkView hiddView];
             [self sendSMSRequestWithParm:parm];
         }
@@ -136,9 +136,9 @@
 
 // 发送短信
 - (void)sendSMSRequestWithParm:(NSDictionary *)parm {
-    [KSNetworkingManager sendSmsRequest:KS_POST mobile:[parm stringValueForKey:@"phone"] type:@"PHONE" success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager sendSmsRequest:KS_POST mobile:[parm ks_stringValueForKey:@"phone"] type:@"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"]) {
             [self MBPShow:@"验证码已发送"];
             [self codeButtonCountDown];
         }

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

@@ -48,7 +48,7 @@
     [self showhud];
     [KSNetworkingManager checkUserRequest:KS_GET phone:phoneNo password:password 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 nextChangeViewWithWithPhone:phoneNo];
         }
         else {

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

@@ -62,9 +62,9 @@
 #pragma mark -- 修改密码
 - (void)modifyPassword:(NSDictionary *)parm {
     [self showhud];
-    [KSNetworkingManager updatePasswordRequest:KS_POST authCode:[parm stringValueForKey:@"code"] mobile:[parm stringValueForKey:@"phone"] newPassword:[parm stringValueForKey:@"password"] success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager updatePasswordRequest:KS_POST authCode:[parm ks_stringValueForKey:@"code"] mobile:[parm ks_stringValueForKey:@"phone"] newPassword:[parm ks_stringValueForKey:@"password"] 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 toLoginView];
@@ -101,7 +101,7 @@
 
 #pragma mark --- 验证码
 - (void)veriCheckWithParm:(NSDictionary *)parm {
-    NSString *phoneNo = [parm stringValueForKey:@"phone"];
+    NSString *phoneNo = [parm ks_stringValueForKey:@"phone"];
     // 图形化验证
     VeriCheckView *view = [VeriCheckView shareInstanceShowInView:self.view];
     __weak typeof(view) weakView = view;
@@ -113,8 +113,8 @@
 
 - (void)veriImageCodeWithParm:(NSDictionary *)parm checkView:(VeriCheckView *)checkView {
     [self showhud];
-    [KSNetworkingManager verifyLoginImageRequest:KS_POST phone:[parm stringValueForKey:@"phone"] code:[parm stringValueForKey:@"code"] success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+    [KSNetworkingManager verifyLoginImageRequest:KS_POST phone:[parm ks_stringValueForKey:@"phone"] code:[parm ks_stringValueForKey:@"code"] success:^(NSDictionary * _Nonnull dic) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [checkView hiddView];
             [self sendSMSRequestWithParm:parm];
         }
@@ -129,9 +129,9 @@
 
 // 发送短信
 - (void)sendSMSRequestWithParm:(NSDictionary *)parm {
-    [KSNetworkingManager sendSmsRequest:KS_POST mobile:[parm stringValueForKey:@"phone"] type:@"PASSWD" success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager sendSmsRequest:KS_POST mobile:[parm ks_stringValueForKey:@"phone"] type:@"PASSWD" 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];
         }

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

@@ -71,7 +71,7 @@
     [self showhud];
     [KSNetworkingManager realNameAuthRequest:KS_POST idCardNo:self.bodyView.cardField.text realName: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"]) {
             MJWeakSelf;
             [self KSShowMsg:@"认证成功" promptCompletion:^{
                 [weakSelf backAction];

+ 3 - 3
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/UserSettingViewController.m

@@ -53,8 +53,8 @@
 
 - (void)requestSubjectInfo {
     [KSNetworkingManager  queryStudentInfoRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            StudentInfoModel *studentInfo = [[StudentInfoModel alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            StudentInfoModel *studentInfo = [[StudentInfoModel alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             NSString *rongToken = UserDefault(RongTokenKey);
             if ([NSString isEmptyString:rongToken]) {
                 [USER_MANAGER queryUserInfoConnectRongCloud:YES];
@@ -273,7 +273,7 @@
     [self showhud];
     [KSNetworkingManager modifyUserMessage:KS_POST avatal:imgUrl gender:gender username:userName birthdate:birthday 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 requestUserMessage];
         }

+ 7 - 7
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/Controller/AccountDeleteViewController.m

@@ -65,7 +65,7 @@
         self.alertView = [KSPublicAlertView shareInstanceWithTitle:@"提示" descMessage:@"注销账号后您所有的留存信息将被清空且无法恢复,请谨慎操作" leftTitle:@"取消" rightTitle:@"确定" cancelAction:^{
             
         } sureAction:^{
-            [weakSelf deleteAccount:[parm stringValueForKey:@"code"]];
+            [weakSelf deleteAccount:[parm ks_stringValueForKey:@"code"]];
         }];
         
     }
@@ -76,7 +76,7 @@
     [self showhud];
     [KSNetworkingManager logoffRequest:KS_GET smsCode:code 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 successDeleteBack];
@@ -112,7 +112,7 @@
 
 #pragma mark --- 验证码
 - (void)veriCheckWithParm:(NSDictionary *)parm {
-    NSString *phoneNo = [parm stringValueForKey:@"phone"];
+    NSString *phoneNo = [parm ks_stringValueForKey:@"phone"];
     // 图形化验证
     VeriCheckView *view = [VeriCheckView shareInstanceShowInView:self.view];
     __weak typeof(view) weakView = view;
@@ -124,8 +124,8 @@
 
 - (void)veriImageCodeWithParm:(NSDictionary *)parm checkView:(VeriCheckView *)checkView {
     [self showhud];
-    [KSNetworkingManager verifyLoginImageRequest:KS_POST phone:[parm stringValueForKey:@"phone"] code:[parm stringValueForKey:@"code"] success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+    [KSNetworkingManager verifyLoginImageRequest:KS_POST phone:[parm ks_stringValueForKey:@"phone"] code:[parm ks_stringValueForKey:@"code"] success:^(NSDictionary * _Nonnull dic) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [checkView hiddView];
             [self sendSMSRequestWithParm:parm];
         }
@@ -140,9 +140,9 @@
 
 // 发送短信
 - (void)sendSMSRequestWithParm:(NSDictionary *)parm {
-    [KSNetworkingManager sendSmsRequest:KS_POST mobile:[parm stringValueForKey:@"phone"] type:@"LOGOFF" success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager sendSmsRequest:KS_POST mobile:[parm ks_stringValueForKey:@"phone"] type:@"LOGOFF" 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];
         }

+ 3 - 3
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/NewWhiteboard/WhiteUtils.m

@@ -16,10 +16,10 @@
     NSDictionary *params = @{@"name": @"Page1", @"userNum": @"0", @"courseScheduleId" : roomId};
 
     [KSNetworkingManager getWhiteBoardRoomMessage:KS_POST url:[SEALCLASSHOST stringByAppendingPathComponent:@"/hereWhite/create"] parm:params success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *returnObj = [dic dictionaryValueForKey:@"data"];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *returnObj = [dic ks_dictionaryValueForKey:@"data"];
             if (completionHandler) {
-                completionHandler([returnObj stringValueForKey:@"uuid"], [returnObj stringValueForKey:@"roomToken"], nil);
+                completionHandler([returnObj ks_stringValueForKey:@"uuid"], [returnObj ks_stringValueForKey:@"roomToken"], nil);
             }
         }
 

+ 9 - 9
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/ClassroomService.m

@@ -134,8 +134,8 @@
         return;
     }
     [KSNetworkingManager roomJoinRequest:KS_POST roomId:roomId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            Classroom *room = [Classroom classroomFromJson:[dic dictionaryValueForKey:@"data"]];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            Classroom *room = [Classroom classroomFromJson:[dic ks_dictionaryValueForKey:@"data"]];
             self.currentRoom = room;
             if (successBlock) {
                 dispatch_main_async_safe(^{
@@ -144,7 +144,7 @@
             }
         }
         else {
-            errorBlock([dic integerValueForKey:@"code"], MESSAGEKEY);
+            errorBlock([dic ks_integerValueForKey:@"code"], MESSAGEKEY);
         }
     } faliure:^(NSError * _Nonnull error) {
         if (errorBlock) {
@@ -163,7 +163,7 @@
         return;
     }
     [KSNetworkingManager joinRoomFailureRequest:KS_POST roomId:self.currentRoom.roomId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             NSLog(@"------ 通知成功");
         }
         else {
@@ -184,7 +184,7 @@
     NSLog(@"leave classroom start");
     
     [KSNetworkingManager roomLeaveRequest:KS_POST roomId:self.currentRoom.roomId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             dispatch_main_async_safe(^{
                 if ([self.classroomDelegate respondsToSelector:@selector(roomDidLeave)]) {
                     [self.classroomDelegate roomDidLeave];
@@ -219,7 +219,7 @@
     
     NSString *statusString = status == YES ? @"1" : @"2";
     [KSNetworkingManager  musicSheetDownNotifyRequest:KS_POST roomId:self.currentRoom.roomId status:statusString accompanimentId:songId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             
         }
         else {
@@ -248,7 +248,7 @@
     NSString *deviceType = [self getDeviceTypeDesc:type];
     
     [KSNetworkingManager roomDeviceSync:KS_POST deviceType:deviceType roomId:self.currentRoom.roomId enable:enable success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             if (type == DeviceTypeMicrophone) {
                 [self.currentRoom updateMember:self.currentRoom.currentMember.userId forMicrophone:enable];
             } else if (type == DeviceTypeCamera)  {
@@ -275,7 +275,7 @@
     NSString *deviceType = [self getDeviceTypeDesc:type];
     
     [KSNetworkingManager deviceApprove:KS_POST deviceType:deviceType roomId:self.currentRoom.roomId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             
         }
         else {
@@ -294,7 +294,7 @@
     }
     NSString *deviceType = [self getDeviceTypeDesc:type];
     [KSNetworkingManager deviceReject:KS_POST deviceType:deviceType roomId:self.currentRoom.roomId success:^(NSDictionary * _Nonnull dic) {
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             
         }
         else {

+ 7 - 7
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Message/MemberChangeMessage.m

@@ -16,12 +16,12 @@
 - (void)decodeWithData:(NSData *)data {
     NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
     if(dic) {
-        NSDictionary *member = [dic dictionaryValueForKey:@"roomMember"];
-        self.userId = [member stringValueForKey:@"imUserId"];
-        self.userName = [member stringValueForKey:@"username"];
-        self.role = [member intValueForKey:@"role"];
-        self.avatar = [member stringValueForKey:@"avatar"];
-        NSString *roleString = [dic stringValueForKey:@"changedEnum"];
+        NSDictionary *member = [dic ks_dictionaryValueForKey:@"roomMember"];
+        self.userId = [member ks_stringValueForKey:@"imUserId"];
+        self.userName = [member ks_stringValueForKey:@"username"];
+        self.role = [member ks_intValueForKey:@"role"];
+        self.avatar = [member ks_stringValueForKey:@"avatar"];
+        NSString *roleString = [dic ks_stringValueForKey:@"changedEnum"];
         if ([roleString isEqualToString:@"LEAVE"]) {
             self.action = MemberChangeActionLeave;
         }
@@ -33,7 +33,7 @@
         }
         
         
-        self.timestamp = [member longValueForKey:@"joinTime"];
+        self.timestamp = [member ks_longValueForKey:@"joinTime"];
         
     }
 }

+ 8 - 8
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Model/ClassSongMessage.m

@@ -12,14 +12,14 @@
 
 + (instancetype)messageFromJson:(NSDictionary *)dic {
     ClassSongMessage *message = [[ClassSongMessage alloc] init];
-    message.musicScoreAccompanimentId = [dic intValueForKey:@"musicScoreAccompanimentId"];
-    message.accompanimentPlayStatus = [dic boolValueForKey:@"accompanimentPlayStatus"];
-    message.downStatus = [dic boolValueForKey:@"downStatus"];
-    message.playStatus = [dic boolValueForKey:@"playStatus"];
-    message.speed = [dic intValueForKey:@"speed"];
-    message.url = [dic stringValueForKey:@"url"];
-    message.mp3Url = [dic stringValueForKey:@"mp3Url"];
-    message.examSongName = [dic stringValueForKey:@"musicScoreName"];
+    message.musicScoreAccompanimentId = [dic ks_intValueForKey:@"musicScoreAccompanimentId"];
+    message.accompanimentPlayStatus = [dic ks_boolValueForKey:@"accompanimentPlayStatus"];
+    message.downStatus = [dic ks_boolValueForKey:@"downStatus"];
+    message.playStatus = [dic ks_boolValueForKey:@"playStatus"];
+    message.speed = [dic ks_intValueForKey:@"speed"];
+    message.url = [dic ks_stringValueForKey:@"url"];
+    message.mp3Url = [dic ks_stringValueForKey:@"mp3Url"];
+    message.examSongName = [dic ks_stringValueForKey:@"musicScoreName"];
     return message;
 }
 

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Model/Classroom.m

@@ -29,12 +29,12 @@
     NSMutableArray *memberList = [[NSMutableArray alloc] init];
     for (NSDictionary *memberDic in memberArray) {
         NSMutableDictionary *memDic = [NSMutableDictionary dictionaryWithDictionary:memberDic];
-        [memberDic setValue:[dic dictionaryValueForKey:@"midiJson"] forKey:@"playMidiJson"];
+        [memberDic setValue:[dic ks_dictionaryValueForKey:@"midiJson"] forKey:@"playMidiJson"];
         RoomMember *member = [RoomMember memberFromJson:memDic];
         [memberList addObject:member];
     }
     room.memberList = memberList;
-    NSDictionary *userDic = [dic dictionaryValueForKey:@"roomMember"];
+    NSDictionary *userDic = [dic ks_dictionaryValueForKey:@"roomMember"];
     RoomMember *currentMember = [RoomMember memberFromJson:userDic];
     room.currentMemberId = currentMember.userId;
     room.joinTime = currentMember.joinTime;

+ 24 - 24
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Model/RoomMember.m

@@ -12,39 +12,39 @@
 
 + (instancetype)memberFromJson:(NSDictionary *)dic {
     RoomMember *member = [[RoomMember alloc] init];
-    member.headUrl = [dic stringValueForKey:@"avatar"];
-    member.userId = [dic stringValueForKey:@"imUserId"];
-    member.name = [dic stringValueForKey:@"username"];
-    member.joinTime = [dic longlongValueForKey:@"joinTime"];
-    member.role = [dic integerValueForKey:@"role"];
-    member.cameraEnable = [dic boolValueForKey:@"cameraFlag"];
-    member.microphoneEnable = [dic boolValueForKey:@"micFlag"];
-    member.musicModeOn = [dic boolValueForKey:@"musicModeFlag"];
-    member.handUpOn = [dic boolValueForKey:@"handFlag"];
+    member.headUrl = [dic ks_stringValueForKey:@"avatar"];
+    member.userId = [dic ks_stringValueForKey:@"imUserId"];
+    member.name = [dic ks_stringValueForKey:@"username"];
+    member.joinTime = [dic ks_longlongValueForKey:@"joinTime"];
+    member.role = [dic ks_integerValueForKey:@"role"];
+    member.cameraEnable = [dic ks_boolValueForKey:@"cameraFlag"];
+    member.microphoneEnable = [dic ks_boolValueForKey:@"micFlag"];
+    member.musicModeOn = [dic ks_boolValueForKey:@"musicModeFlag"];
+    member.handUpOn = [dic ks_boolValueForKey:@"handFlag"];
     
-    NSDictionary *jsonDic = [dic dictionaryValueForKey:@"playMidiJson"];
+    NSDictionary *jsonDic = [dic ks_dictionaryValueForKey:@"playMidiJson"];
     if (jsonDic) {
-        member.customType = [jsonDic integerValueForKey:@"customType"];
-        member.enable = [jsonDic boolValueForKey:@"enable"];
-        member.rate = [jsonDic intValueForKey:@"rate"];
-        member.volume = [jsonDic integerValueForKey:@"playVolume"];
+        member.customType = [jsonDic ks_integerValueForKey:@"customType"];
+        member.enable = [jsonDic ks_boolValueForKey:@"enable"];
+        member.rate = [jsonDic ks_intValueForKey:@"rate"];
+        member.volume = [jsonDic ks_integerValueForKey:@"playVolume"];
     }
     
-    NSArray *songMessageArray = [dic arrayValueForKey:@"scheduleStudentMusicScores"];
+    NSArray *songMessageArray = [dic ks_arrayValueForKey:@"scheduleStudentMusicScores"];
     member.songMessage = [NSMutableArray array];
     for (NSDictionary *parm in songMessageArray) {
         ClassSongMessage *songModel = [ClassSongMessage messageFromJson:parm];
         [member.songMessage addObject:songModel];
         // 如果当前在播放伴奏或原声
-        if ([parm boolValueForKey:@"playStatus"] || [parm boolValueForKey:@"accompanimentPlayStatus"]) {
-            member.musicScoreAccompanimentId = [parm intValueForKey:@"musicScoreAccompanimentId"];
-            member.accompanimentPlayStatus = [parm boolValueForKey:@"accompanimentPlayStatus"];
-            member.downStatus = [parm boolValueForKey:@"downStatus"];
-            member.playStatus = [parm boolValueForKey:@"playStatus"];
-            member.speed = [parm intValueForKey:@"speed"];
-            member.url = [parm stringValueForKey:@"url"];
-            member.mp3Url = [parm stringValueForKey:@"mp3Url"];
-            member.examSongName = [parm stringValueForKey:@"musicScoreName"];
+        if ([parm ks_boolValueForKey:@"playStatus"] || [parm ks_boolValueForKey:@"accompanimentPlayStatus"]) {
+            member.musicScoreAccompanimentId = [parm ks_intValueForKey:@"musicScoreAccompanimentId"];
+            member.accompanimentPlayStatus = [parm ks_boolValueForKey:@"accompanimentPlayStatus"];
+            member.downStatus = [parm ks_boolValueForKey:@"downStatus"];
+            member.playStatus = [parm ks_boolValueForKey:@"playStatus"];
+            member.speed = [parm ks_intValueForKey:@"speed"];
+            member.url = [parm ks_stringValueForKey:@"url"];
+            member.mp3Url = [parm ks_stringValueForKey:@"mp3Url"];
+            member.examSongName = [parm ks_stringValueForKey:@"musicScoreName"];
         }
     }
     return member;

+ 13 - 13
KulexiuForStudent/Podfile.lock

@@ -75,25 +75,25 @@ PODS:
   - SocketRocket (0.6.0)
   - SSZipArchive (2.4.3)
   - TYCyclePagerView (1.2.0)
-  - Whiteboard (2.16.39):
-    - Whiteboard/Whiteboard-YYModel (= 2.16.39)
-  - Whiteboard/Base (2.16.39):
+  - Whiteboard (2.16.48):
+    - Whiteboard/Whiteboard-YYModel (= 2.16.48)
+  - Whiteboard/Base (2.16.48):
     - NTLBridge (~> 3.1.4)
     - Whiteboard/Object
-  - Whiteboard/Converter (2.16.39):
+  - Whiteboard/Converter (2.16.48):
     - Whiteboard/Object
-  - Whiteboard/Model (2.16.39):
+  - Whiteboard/Model (2.16.48):
     - YYModel
-  - Whiteboard/NativeReplayer (2.16.39):
+  - Whiteboard/NativeReplayer (2.16.48):
     - Whiteboard/Replayer
-  - Whiteboard/Object (2.16.39):
+  - Whiteboard/Object (2.16.48):
     - Whiteboard/Model
-  - Whiteboard/Replayer (2.16.39):
+  - Whiteboard/Replayer (2.16.48):
     - Whiteboard/Base
-  - Whiteboard/Resource (2.16.39)
-  - Whiteboard/Room (2.16.39):
+  - Whiteboard/Resource (2.16.48)
+  - Whiteboard/Room (2.16.48):
     - Whiteboard/Base
-  - Whiteboard/Whiteboard-YYModel (2.16.39):
+  - Whiteboard/Whiteboard-YYModel (2.16.48):
     - Whiteboard/Converter
     - Whiteboard/NativeReplayer
     - Whiteboard/Resource
@@ -185,10 +185,10 @@ SPEC CHECKSUMS:
   SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
   SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef
   TYCyclePagerView: 2b051dade0615c70784aa34f40c646feeddb7344
-  Whiteboard: 4622f3866b7c35a9c757955619ba0a2b26d968f5
+  Whiteboard: 7a09387d227121ad8fb3cbfdc6b66a383c024a0e
   YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30
   ZKCycleScrollView: 4b353d17b7f469b245a1c606d5a977e72b940895
 
-PODFILE CHECKSUM: cee4a3730ba6532d2033844f1fe91321b47ae688
+PODFILE CHECKSUM: dcda1baded1f0037d2b98e9b2ae8166675aa8795
 
 COCOAPODS: 1.11.3

+ 13 - 13
KulexiuForStudent/Pods/Manifest.lock

@@ -75,25 +75,25 @@ PODS:
   - SocketRocket (0.6.0)
   - SSZipArchive (2.4.3)
   - TYCyclePagerView (1.2.0)
-  - Whiteboard (2.16.39):
-    - Whiteboard/Whiteboard-YYModel (= 2.16.39)
-  - Whiteboard/Base (2.16.39):
+  - Whiteboard (2.16.48):
+    - Whiteboard/Whiteboard-YYModel (= 2.16.48)
+  - Whiteboard/Base (2.16.48):
     - NTLBridge (~> 3.1.4)
     - Whiteboard/Object
-  - Whiteboard/Converter (2.16.39):
+  - Whiteboard/Converter (2.16.48):
     - Whiteboard/Object
-  - Whiteboard/Model (2.16.39):
+  - Whiteboard/Model (2.16.48):
     - YYModel
-  - Whiteboard/NativeReplayer (2.16.39):
+  - Whiteboard/NativeReplayer (2.16.48):
     - Whiteboard/Replayer
-  - Whiteboard/Object (2.16.39):
+  - Whiteboard/Object (2.16.48):
     - Whiteboard/Model
-  - Whiteboard/Replayer (2.16.39):
+  - Whiteboard/Replayer (2.16.48):
     - Whiteboard/Base
-  - Whiteboard/Resource (2.16.39)
-  - Whiteboard/Room (2.16.39):
+  - Whiteboard/Resource (2.16.48)
+  - Whiteboard/Room (2.16.48):
     - Whiteboard/Base
-  - Whiteboard/Whiteboard-YYModel (2.16.39):
+  - Whiteboard/Whiteboard-YYModel (2.16.48):
     - Whiteboard/Converter
     - Whiteboard/NativeReplayer
     - Whiteboard/Resource
@@ -185,10 +185,10 @@ SPEC CHECKSUMS:
   SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
   SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef
   TYCyclePagerView: 2b051dade0615c70784aa34f40c646feeddb7344
-  Whiteboard: 4622f3866b7c35a9c757955619ba0a2b26d968f5
+  Whiteboard: 7a09387d227121ad8fb3cbfdc6b66a383c024a0e
   YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30
   ZKCycleScrollView: 4b353d17b7f469b245a1c606d5a977e72b940895
 
-PODFILE CHECKSUM: cee4a3730ba6532d2033844f1fe91321b47ae688
+PODFILE CHECKSUM: dcda1baded1f0037d2b98e9b2ae8166675aa8795
 
 COCOAPODS: 1.11.3

File diff suppressed because it is too large
+ 143 - 143
KulexiuForStudent/Pods/Pods.xcodeproj/project.pbxproj


+ 1 - 1
KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/AFNetworking.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1300"
+   LastUpgradeVersion = "1420"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 1 - 1
KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/Bugly.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1300"
+   LastUpgradeVersion = "1420"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 1 - 1
KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/CHIPageControl.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1300"
+   LastUpgradeVersion = "1420"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 1 - 1
KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/IQKeyboardManager.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1300"
+   LastUpgradeVersion = "1420"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 1 - 1
KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/JCore.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1300"
+   LastUpgradeVersion = "1420"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 1 - 1
KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/JPush.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1300"
+   LastUpgradeVersion = "1420"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 1 - 1
KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/JXCategoryView.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1300"
+   LastUpgradeVersion = "1420"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 1 - 1
KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/JXPagingView.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1300"
+   LastUpgradeVersion = "1420"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 1 - 1
KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/MBProgressHUD.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1300"
+   LastUpgradeVersion = "1420"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 1 - 1
KulexiuForStudent/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/MJExtension.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1300"
+   LastUpgradeVersion = "1420"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

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