Browse Source

创建群聊修改

Steven 1 year ago
parent
commit
a4dbabe8c7
20 changed files with 442 additions and 68 deletions
  1. 303 3
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj
  2. 29 2
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcshareddata/swiftpm/Package.resolved
  3. 0 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/mine_arrow_down.imageset/Contents.json
  4. 0 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/mine_arrow_down.imageset/arrow_down@2x.png
  5. 0 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/mine_arrow_down.imageset/arrow_down@3x.png
  6. 28 13
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSAccompanyWebViewController.m
  7. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m
  8. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h
  9. 5 5
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m
  10. 18 18
      KulexiuForTeacher/KulexiuForTeacher/Common/Define/KSDomain.h
  11. 36 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/TXCustom/KSTXBaseChatViewController.m
  12. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/TenantGroup/TenantChooseMemberViewController.m
  13. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/TenantGroup/TenantCreateGroupViewController.m
  14. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupSettingViewController.m
  15. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupMemberListCell.m
  16. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicSearchView.xib
  17. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageSort/MusicSortView.xib
  18. 0 1
      KulexiuForTeacher/KulexiuForTeacher/Module/TXClassRoom/View/MemberList/ClassMemberListView.m
  19. 2 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Widget/Model/TuningFunction/Tuner.swift
  20. 2 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Widget/Model/TuningFunction/TunerForkManager.swift

+ 303 - 3
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj

@@ -1210,6 +1210,8 @@
 		BCFE54152817918600AD6786 /* MyIncomeListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCFE54132817918600AD6786 /* MyIncomeListCell.xib */; };
 		BCFE54182817BDFD00AD6786 /* IncomeHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCFE54172817BDFD00AD6786 /* IncomeHeaderView.m */; };
 		BCFE541A2817BE0800AD6786 /* IncomeHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCFE54192817BE0800AD6786 /* IncomeHeaderView.xib */; };
+		BCFEE18A2AD15A27000E888F /* AudioKitEX in Frameworks */ = {isa = PBXBuildFile; productRef = BCFEE1892AD15A27000E888F /* AudioKitEX */; };
+		BCFEE1902AD15BF5000E888F /* SoundpipeAudioKit in Frameworks */ = {isa = PBXBuildFile; productRef = BCFEE18F2AD15BF5000E888F /* SoundpipeAudioKit */; };
 		BCFF4814290172C600E9293A /* AudioKit in Frameworks */ = {isa = PBXBuildFile; productRef = BCFF4813290172C600E9293A /* AudioKit */; };
 /* End PBXBuildFile section */
 
@@ -3284,6 +3286,7 @@
 				2779334327E3147C0010E277 /* OpenGLES.framework in Frameworks */,
 				BC8B6E552856ED0600866917 /* UMCommon.framework in Frameworks */,
 				BC8B6E622856ED0600866917 /* libSocialQQ.a in Frameworks */,
+				BCFEE1902AD15BF5000E888F /* SoundpipeAudioKit in Frameworks */,
 				BC8B6E612856ED0600866917 /* libWeiboSDK.a in Frameworks */,
 				BC8B6E532856ED0600866917 /* UMAPM.framework in Frameworks */,
 				2779333F27E314640010E277 /* CoreVideo.framework in Frameworks */,
@@ -3301,6 +3304,7 @@
 				BC8B6E5E2856ED0600866917 /* libWeChatSDK.a in Frameworks */,
 				2779332D27E313F50010E277 /* SafariServices.framework in Frameworks */,
 				BC8B6E5C2856ED0600866917 /* libSocialOfficialWeChat.a in Frameworks */,
+				BCFEE18A2AD15A27000E888F /* AudioKitEX in Frameworks */,
 				2779332B27E313EB0010E277 /* CoreTelephony.framework in Frameworks */,
 				2779332927E313E40010E277 /* WebKit.framework in Frameworks */,
 				2779332727E313DC0010E277 /* MobileCoreServices.framework in Frameworks */,
@@ -7822,6 +7826,8 @@
 			name = KulexiuForTeacher;
 			packageProductDependencies = (
 				BCFF4813290172C600E9293A /* AudioKit */,
+				BCFEE1892AD15A27000E888F /* AudioKitEX */,
+				BCFEE18F2AD15BF5000E888F /* SoundpipeAudioKit */,
 			);
 			productName = KulexiuForTeacher;
 			productReference = 275E8A6427E18F2300DD3F6E /* KulexiuForTeacher.app */;
@@ -7898,6 +7904,8 @@
 			mainGroup = 275E8A5B27E18F2300DD3F6E;
 			packageReferences = (
 				BCFF4812290172C600E9293A /* XCRemoteSwiftPackageReference "AudioKit" */,
+				BCFEE1882AD15A27000E888F /* XCRemoteSwiftPackageReference "AudioKitEX" */,
+				BCFEE18E2AD15BF5000E888F /* XCRemoteSwiftPackageReference "SoundpipeAudioKit" */,
 			);
 			productRefGroup = 275E8A6527E18F2300DD3F6E /* Products */;
 			projectDirPath = "";
@@ -9392,9 +9400,142 @@
 					"$(PROJECT_DIR)/KulexiuForTeacher/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.4/SocialLibraries/QQ",
 					"$(PROJECT_DIR)/KulexiuForTeacher/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.4/UMSocialSDKPlugin",
 				);
-				MARKETING_VERSION = 1.5.1;
+				MARKETING_VERSION = 1.5.2;
 				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
 				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17";
+				OTHER_LDFLAGS = (
+					"$(inherited)",
+					"-ObjC",
+					"-l\"AFNetworking\"",
+					"-l\"IQKeyboardManager\"",
+					"-l\"JXCategoryView\"",
+					"-l\"JXPagingView\"",
+					"-l\"MBProgressHUD\"",
+					"-l\"MJExtension\"",
+					"-l\"MJRefresh\"",
+					"-l\"Masonry\"",
+					"-l\"NTLBridge\"",
+					"-l\"QCloudCOSXML\"",
+					"-l\"QCloudCore\"",
+					"-l\"RSKImageCropper\"",
+					"-l\"Reachability\"",
+					"-l\"ReactiveObjC\"",
+					"-l\"SDWebImage\"",
+					"-l\"SSZipArchive\"",
+					"-l\"SocketRocket\"",
+					"-l\"TIMCommon\"",
+					"-l\"TUIChat\"",
+					"-l\"TUIConversation\"",
+					"-l\"TUICore\"",
+					"-l\"TUIGroup\"",
+					"-l\"TUISearch\"",
+					"-l\"TYCyclePagerView\"",
+					"-l\"TZImagePickerController\"",
+					"-l\"Whiteboard\"",
+					"-l\"YYModel\"",
+					"-l\"c++\"",
+					"-l\"iOS-KS3SDK\"",
+					"-l\"iconv\"",
+					"-l\"icucore\"",
+					"-l\"jcore-noidfa-ios-2.7.1\"",
+					"-l\"jpush-ios-4.3.0\"",
+					"-l\"lottie-ios\"",
+					"-l\"opencore-amrnb\"",
+					"-l\"opencore-amrwb\"",
+					"-l\"resolv\"",
+					"-l\"sqlite3\"",
+					"-l\"stdc++\"",
+					"-l\"z\"",
+					"-framework",
+					"\"AVFoundation\"",
+					"-framework",
+					"\"Accelerate\"",
+					"-framework",
+					"\"AlipaySDK\"",
+					"-framework",
+					"\"AssetsLibrary\"",
+					"-framework",
+					"\"AudioToolbox\"",
+					"-framework",
+					"\"Bugly\"",
+					"-framework",
+					"\"CFNetwork\"",
+					"-framework",
+					"\"CoreFoundation\"",
+					"-framework",
+					"\"CoreGraphics\"",
+					"-framework",
+					"\"CoreMedia\"",
+					"-framework",
+					"\"CoreMotion\"",
+					"-framework",
+					"\"CoreServices\"",
+					"-framework",
+					"\"CoreTelephony\"",
+					"-framework",
+					"\"CoreText\"",
+					"-framework",
+					"\"Foundation\"",
+					"-framework",
+					"\"GLKit\"",
+					"-framework",
+					"\"ImSDK_Plus\"",
+					"-framework",
+					"\"ImageIO\"",
+					"-framework",
+					"\"MetalKit\"",
+					"-framework",
+					"\"Photos\"",
+					"-framework",
+					"\"PhotosUI\"",
+					"-framework",
+					"\"QuartzCore\"",
+					"-framework",
+					"\"ReplayKit\"",
+					"-framework",
+					"\"RongChatRoom\"",
+					"-framework",
+					"\"RongCustomerService\"",
+					"-framework",
+					"\"RongDiscussion\"",
+					"-framework",
+					"\"RongFaceBeautifier\"",
+					"-framework",
+					"\"RongIMKit\"",
+					"-framework",
+					"\"RongIMLib\"",
+					"-framework",
+					"\"RongIMLibCore\"",
+					"-framework",
+					"\"RongPublicService\"",
+					"-framework",
+					"\"RongRTCLib\"",
+					"-framework",
+					"\"RongRTCPlayer\"",
+					"-framework",
+					"\"RongSight\"",
+					"-framework",
+					"\"Security\"",
+					"-framework",
+					"\"StoreKit\"",
+					"-framework",
+					"\"SystemConfiguration\"",
+					"-framework",
+					"\"TXFFmpeg\"",
+					"-framework",
+					"\"TXLiteAVSDK_Professional\"",
+					"-framework",
+					"\"TXSoundTouch\"",
+					"-framework",
+					"\"UIKit\"",
+					"-framework",
+					"\"VideoToolbox\"",
+					"-framework",
+					"\"WebKit\"",
+					"-weak_framework",
+					"\"UserNotifications\"",
+					"-ld_classic",
+				);
 				PRODUCT_BUNDLE_IDENTIFIER = com.Colexiu.KulexiuForTeacher;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_EMIT_LOC_STRINGS = YES;
@@ -9460,9 +9601,142 @@
 					"$(PROJECT_DIR)/KulexiuForTeacher/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.4/SocialLibraries/QQ",
 					"$(PROJECT_DIR)/KulexiuForTeacher/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.4/UMSocialSDKPlugin",
 				);
-				MARKETING_VERSION = 1.5.1;
+				MARKETING_VERSION = 1.5.2;
 				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
 				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17";
+				OTHER_LDFLAGS = (
+					"$(inherited)",
+					"-ObjC",
+					"-l\"AFNetworking\"",
+					"-l\"IQKeyboardManager\"",
+					"-l\"JXCategoryView\"",
+					"-l\"JXPagingView\"",
+					"-l\"MBProgressHUD\"",
+					"-l\"MJExtension\"",
+					"-l\"MJRefresh\"",
+					"-l\"Masonry\"",
+					"-l\"NTLBridge\"",
+					"-l\"QCloudCOSXML\"",
+					"-l\"QCloudCore\"",
+					"-l\"RSKImageCropper\"",
+					"-l\"Reachability\"",
+					"-l\"ReactiveObjC\"",
+					"-l\"SDWebImage\"",
+					"-l\"SSZipArchive\"",
+					"-l\"SocketRocket\"",
+					"-l\"TIMCommon\"",
+					"-l\"TUIChat\"",
+					"-l\"TUIConversation\"",
+					"-l\"TUICore\"",
+					"-l\"TUIGroup\"",
+					"-l\"TUISearch\"",
+					"-l\"TYCyclePagerView\"",
+					"-l\"TZImagePickerController\"",
+					"-l\"Whiteboard\"",
+					"-l\"YYModel\"",
+					"-l\"c++\"",
+					"-l\"iOS-KS3SDK\"",
+					"-l\"iconv\"",
+					"-l\"icucore\"",
+					"-l\"jcore-noidfa-ios-2.7.1\"",
+					"-l\"jpush-ios-4.3.0\"",
+					"-l\"lottie-ios\"",
+					"-l\"opencore-amrnb\"",
+					"-l\"opencore-amrwb\"",
+					"-l\"resolv\"",
+					"-l\"sqlite3\"",
+					"-l\"stdc++\"",
+					"-l\"z\"",
+					"-framework",
+					"\"AVFoundation\"",
+					"-framework",
+					"\"Accelerate\"",
+					"-framework",
+					"\"AlipaySDK\"",
+					"-framework",
+					"\"AssetsLibrary\"",
+					"-framework",
+					"\"AudioToolbox\"",
+					"-framework",
+					"\"Bugly\"",
+					"-framework",
+					"\"CFNetwork\"",
+					"-framework",
+					"\"CoreFoundation\"",
+					"-framework",
+					"\"CoreGraphics\"",
+					"-framework",
+					"\"CoreMedia\"",
+					"-framework",
+					"\"CoreMotion\"",
+					"-framework",
+					"\"CoreServices\"",
+					"-framework",
+					"\"CoreTelephony\"",
+					"-framework",
+					"\"CoreText\"",
+					"-framework",
+					"\"Foundation\"",
+					"-framework",
+					"\"GLKit\"",
+					"-framework",
+					"\"ImSDK_Plus\"",
+					"-framework",
+					"\"ImageIO\"",
+					"-framework",
+					"\"MetalKit\"",
+					"-framework",
+					"\"Photos\"",
+					"-framework",
+					"\"PhotosUI\"",
+					"-framework",
+					"\"QuartzCore\"",
+					"-framework",
+					"\"ReplayKit\"",
+					"-framework",
+					"\"RongChatRoom\"",
+					"-framework",
+					"\"RongCustomerService\"",
+					"-framework",
+					"\"RongDiscussion\"",
+					"-framework",
+					"\"RongFaceBeautifier\"",
+					"-framework",
+					"\"RongIMKit\"",
+					"-framework",
+					"\"RongIMLib\"",
+					"-framework",
+					"\"RongIMLibCore\"",
+					"-framework",
+					"\"RongPublicService\"",
+					"-framework",
+					"\"RongRTCLib\"",
+					"-framework",
+					"\"RongRTCPlayer\"",
+					"-framework",
+					"\"RongSight\"",
+					"-framework",
+					"\"Security\"",
+					"-framework",
+					"\"StoreKit\"",
+					"-framework",
+					"\"SystemConfiguration\"",
+					"-framework",
+					"\"TXFFmpeg\"",
+					"-framework",
+					"\"TXLiteAVSDK_Professional\"",
+					"-framework",
+					"\"TXSoundTouch\"",
+					"-framework",
+					"\"UIKit\"",
+					"-framework",
+					"\"VideoToolbox\"",
+					"-framework",
+					"\"WebKit\"",
+					"-weak_framework",
+					"\"UserNotifications\"",
+					"-ld_classic",
+				);
 				PRODUCT_BUNDLE_IDENTIFIER = com.Colexiu.KulexiuForTeacher;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_EMIT_LOC_STRINGS = YES;
@@ -9586,17 +9860,43 @@
 /* End XCConfigurationList section */
 
 /* Begin XCRemoteSwiftPackageReference section */
+		BCFEE1882AD15A27000E888F /* XCRemoteSwiftPackageReference "AudioKitEX" */ = {
+			isa = XCRemoteSwiftPackageReference;
+			repositoryURL = "https://github.com/AudioKit/AudioKitEX.git";
+			requirement = {
+				kind = exactVersion;
+				version = 5.4.1;
+			};
+		};
+		BCFEE18E2AD15BF5000E888F /* XCRemoteSwiftPackageReference "SoundpipeAudioKit" */ = {
+			isa = XCRemoteSwiftPackageReference;
+			repositoryURL = "https://github.com/AudioKit/SoundpipeAudioKit.git";
+			requirement = {
+				kind = exactVersion;
+				version = 5.4.1;
+			};
+		};
 		BCFF4812290172C600E9293A /* XCRemoteSwiftPackageReference "AudioKit" */ = {
 			isa = XCRemoteSwiftPackageReference;
 			repositoryURL = "https://github.com/AudioKit/AudioKit.git";
 			requirement = {
 				kind = exactVersion;
-				version = 5.0.0;
+				version = 5.4.4;
 			};
 		};
 /* End XCRemoteSwiftPackageReference section */
 
 /* Begin XCSwiftPackageProductDependency section */
+		BCFEE1892AD15A27000E888F /* AudioKitEX */ = {
+			isa = XCSwiftPackageProductDependency;
+			package = BCFEE1882AD15A27000E888F /* XCRemoteSwiftPackageReference "AudioKitEX" */;
+			productName = AudioKitEX;
+		};
+		BCFEE18F2AD15BF5000E888F /* SoundpipeAudioKit */ = {
+			isa = XCSwiftPackageProductDependency;
+			package = BCFEE18E2AD15BF5000E888F /* XCRemoteSwiftPackageReference "SoundpipeAudioKit" */;
+			productName = SoundpipeAudioKit;
+		};
 		BCFF4813290172C600E9293A /* AudioKit */ = {
 			isa = XCSwiftPackageProductDependency;
 			package = BCFF4812290172C600E9293A /* XCRemoteSwiftPackageReference "AudioKit" */;

+ 29 - 2
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcshareddata/swiftpm/Package.resolved

@@ -5,8 +5,35 @@
       "kind" : "remoteSourceControl",
       "location" : "https://github.com/AudioKit/AudioKit.git",
       "state" : {
-        "revision" : "36ea09c87bf703291a60e694742d56ff221c56ae",
-        "version" : "5.0.0"
+        "revision" : "576528c7618838ed3bdb967b4e176841994aa01d",
+        "version" : "5.4.4"
+      }
+    },
+    {
+      "identity" : "audiokitex",
+      "kind" : "remoteSourceControl",
+      "location" : "https://github.com/AudioKit/AudioKitEX.git",
+      "state" : {
+        "revision" : "ab5b5623e70b2f3c578a5e64ce23d3aea709bb41",
+        "version" : "5.4.1"
+      }
+    },
+    {
+      "identity" : "kissfft",
+      "kind" : "remoteSourceControl",
+      "location" : "https://github.com/AudioKit/KissFFT",
+      "state" : {
+        "revision" : "dd0636e151724b8ba2e0908eba4d99a6ff24d00c",
+        "version" : "1.0.0"
+      }
+    },
+    {
+      "identity" : "soundpipeaudiokit",
+      "kind" : "remoteSourceControl",
+      "location" : "https://github.com/AudioKit/SoundpipeAudioKit.git",
+      "state" : {
+        "revision" : "3be2802b20088de37f34f993966d918b65401a60",
+        "version" : "5.4.1"
       }
     }
   ],

+ 0 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/arrow_down.imageset/Contents.json → KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/mine_arrow_down.imageset/Contents.json


+ 0 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/arrow_down.imageset/arrow_down@2x.png → KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/mine_arrow_down.imageset/arrow_down@2x.png


+ 0 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/arrow_down.imageset/arrow_down@3x.png → KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/mine_arrow_down.imageset/arrow_down@3x.png


+ 28 - 13
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSAccompanyWebViewController.m

@@ -17,6 +17,7 @@
 #import "MidiPlayerEngine.h"
 
 #import "AccompanyLoadingView.h"
+#import "KSPremissionAlert.h"
 
 #define KSMidiSongFileKey (@"KSDownloadMidiSong")
 #import "KulexiuForTeacher-swift.h"
@@ -215,12 +216,8 @@
         WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init];
         config.selectionGranularity = WKSelectionGranularityDynamic;
         config.allowsInlineMediaPlayback = YES;
-        if (@available(iOS 10.0, *)) {
-            config.mediaTypesRequiringUserActionForPlayback = NO;
-        } else {
-            // Fallback on earlier versions
-            config.requiresUserActionForMediaPlayback = NO;
-        }
+        config.mediaTypesRequiringUserActionForPlayback = NO;
+        
         config.processPool = [KSBaseWKWebViewController singleWkProcessPool];
         config.websiteDataStore = [WKWebsiteDataStore defaultDataStore];
         [self configUserAgent:config];
@@ -393,12 +390,18 @@
                  [self sendDataToSocketService:sendData];
             }
             else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"openCamera"]) { // 开启摄像头
-                 PREMISSIONTYPE canOpenCamera = [RecordCheckManager checkCameraPremissionAvaiable:YES showInView:self.view];
-                 if (canOpenCamera == PREMISSIONTYPE_YES) {
-                      self.isCameraOpen = YES;
-                      [self.videoRecordManager configSessiondisplayInView:self.viewContainer];
-                      [self postMessage:parm];
-                 }
+                PREMISSIONTYPE canOpenCamera = [RecordCheckManager checkCameraPremissionAvaiable:NO showInView:nil];
+                PREMISSIONTYPE albumEnable =  [RecordCheckManager checkPhotoLibraryPremissionAvaiable:NO showInView:nil];
+                
+                if (canOpenCamera == PREMISSIONTYPE_YES) {
+                    self.isCameraOpen = YES;
+                    [self.videoRecordManager configSessiondisplayInView:self.viewContainer];
+                    [self postMessage:parm];
+                }
+                if (albumEnable == PREMISSIONTYPE_NO) {
+                    [self showAlertWithMessage:@"请开启相册访问权限" type:CHECKDEVICETYPE_CAMREA];
+                    
+                }
             }
             else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"closeCamera"]) { // 关闭摄像头
                 self.isCameraOpen = NO;
@@ -410,7 +413,6 @@
             else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"startCapture"]) { // 开始录制
                 // 需要合成音频
                 [self.videoRecordManager setIgnoreAudio:YES];
-                [RecordCheckManager checkPhotoLibraryPremissionAvaiable:YES showInView:self.view];
                 self.videoRecordManager.audioUrl = self.AQManager.audioUrl;
                 [self.videoRecordManager startRecord];
                 [self postMessage:parm];
@@ -713,6 +715,19 @@
     }
 }
 
+- (void)showAlertWithMessage:(NSString *)message type:(CHECKDEVICETYPE)deviceType {
+    [KSPremissionAlert shareInstanceDisplayImage:deviceType message:message showInView:self.view cancel:^{
+        
+    } confirm:^{
+        [self openSettingView];
+    }];
+    
+}
+
+- (void)openSettingView {
+    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
+
+}
 - (void)downloadUrl:(NSString *)url success:(void(^)(void))success faliure:(void(^)(void))faliure {
 //    [LOADING_MANAGER showHUD];
     [KSNetworkingManager downloadFileRequestWithFileUrl:url progress:^(int64_t bytesRead, int64_t totalBytes) {

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

@@ -30,8 +30,8 @@
 #import "MusicRoomViewController.h"
 #import "KSEnterLiveroomManager.h"
 #import "KSWebLoadRefreshView.h"
-
 #import "UserInfoManager.h"
+
 typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     CHOOSETYPE_XML,
     CHOOSETYPE_MIDI,

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

@@ -392,7 +392,7 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param faliure 失败
 + (void)imGroupQueryPage:(NSString *)post search:(NSString *)search success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
-// /api-teacher/imGroup/create
+// /api-teacher/imGroup/create/v2
 
 /// 创建粉丝群
 /// @param post post
@@ -402,7 +402,7 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param faliure 失败
 + (void)imGroupCreate:(NSString *)post name:(NSString *)name introduce:(NSString *)introduce success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
-// /api-teacher/imGroup/create
+// /api-teacher/imGroup/create/v2
 /// 创建粉丝群、机构群
 /// @param post post
 /// @param name 群名称

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

@@ -882,7 +882,7 @@
 /// @param faliure 失败
 + (void)imGroupCreate:(NSString *)post name:(NSString *)name introduce:(NSString *)introduce success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
     [self configRequestMethodJSON];
-    NSString *url = [NSString stringWithFormat:@"%@%@",hostURL, @"/api-teacher/imGroup/create"];
+    NSString *url = [NSString stringWithFormat:@"%@%@",hostURL, @"/api-teacher/imGroup/create/v2"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:name forKey:@"name"];
     [parm setValue:introduce forKey:@"introduce"];
@@ -915,12 +915,12 @@
 + (void)tenantImGroupCreateRequest:(NSString *)post name:(NSString *)name introduce:(NSString *)introduce studentIdArray:(NSMutableArray *)studentIdArray type:(NSString *)type success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
     
     [self configRequestMethodJSON];
-    NSString *url = [NSString stringWithFormat:@"%@%@",hostURL, @"/api-teacher/imGroup/create"];
+    NSString *url = [NSString stringWithFormat:@"%@%@",hostURL, @"/api-teacher/imGroup/create/v2"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:name forKey:@"name"];
     [parm setValue:introduce forKey:@"introduce"];
     [parm setValue:type forKey:@"type"];
-    [parm setValue:studentIdArray forKey:@"studentIdList"];
+    [parm setValue:studentIdArray forKey:@"imUserIdList"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 
@@ -934,10 +934,10 @@
 /// @param faliure 失败
 + (void)tenantImGroupAddMemberRequest:(NSString *)post groupId:(NSString *)groupId studentIdArray:(NSMutableArray *)studentIdArray success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
     [self configRequestMethodJSON];
-    NSString *url = [NSString stringWithFormat:@"%@%@",hostURL, @"/api-teacher/imGroup/addGroupMember"];
+    NSString *url = [NSString stringWithFormat:@"%@%@",hostURL, @"/api-teacher/imGroup/addGroupMember/v2"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:groupId forKey:@"groupId"];
-    [parm setValue:studentIdArray forKey:@"studentIdList"];
+    [parm setValue:studentIdArray forKey:@"imUserIdList"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 

+ 18 - 18
KulexiuForTeacher/KulexiuForTeacher/Common/Define/KSDomain.h

@@ -12,15 +12,15 @@
 
 //#ifdef DEBUG
 // 测试环境
-//#define hostURL (@"https://dev.colexiu.com")
-//#define SEALCLASSHOST (@"https://dev.colexiu.com/api-classroom")
-//#define WEBHOST (@"https://dev.colexiu.com/teacher")
-//#define SOCKET_URL (@"wss://dev.colexiu.com/audioAnalysis")
-//#define JSPUSH_ENVIRONMENT (NO)
-//#define RCIM_KEY (@"0vnjpoad0jbdz")
-//#define SUBMIT_UUID (NO)
-//#define CONFIG_TXSDKAPPID (1400805079)
-//#define TXOfflinePushCertificateIDForAPNS (39559)
+#define hostURL (@"https://dev.colexiu.com")
+#define SEALCLASSHOST (@"https://dev.colexiu.com/api-classroom")
+#define WEBHOST (@"https://dev.colexiu.com/teacher")
+#define SOCKET_URL (@"wss://dev.colexiu.com/audioAnalysis")
+#define JSPUSH_ENVIRONMENT (NO)
+#define RCIM_KEY (@"0vnjpoad0jbdz")
+#define SUBMIT_UUID (NO)
+#define CONFIG_TXSDKAPPID (1400805079)
+#define TXOfflinePushCertificateIDForAPNS (39559)
 
 // 开发环境
 //#define hostURL (@"https://test.colexiu.com")
@@ -46,15 +46,15 @@
 
 //#else
 
-#define hostURL (@"https://online.colexiu.com")
-#define SEALCLASSHOST (@"https://online.colexiu.com/api-classroom")
-#define WEBHOST (@"https://online.colexiu.com/teacher")
-#define SOCKET_URL (@"wss://online.colexiu.com/audioAnalysis")
-#define JSPUSH_ENVIRONMENT (YES)
-#define RCIM_KEY (@"e5t4ouvpe42pa")
-#define SUBMIT_UUID (YES)
-#define CONFIG_TXSDKAPPID (1400799837)
-#define TXOfflinePushCertificateIDForAPNS (39561)
+//#define hostURL (@"https://online.colexiu.com")
+//#define SEALCLASSHOST (@"https://online.colexiu.com/api-classroom")
+//#define WEBHOST (@"https://online.colexiu.com/teacher")
+//#define SOCKET_URL (@"wss://online.colexiu.com/audioAnalysis")
+//#define JSPUSH_ENVIRONMENT (YES)
+//#define RCIM_KEY (@"e5t4ouvpe42pa")
+//#define SUBMIT_UUID (YES)
+//#define CONFIG_TXSDKAPPID (1400799837)
+//#define TXOfflinePushCertificateIDForAPNS (39561)
 
 //#endif
 

+ 36 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/TXCustom/KSTXBaseChatViewController.m

@@ -45,6 +45,10 @@
 
 #import "KSAccompanyWebViewController.h"
 #import "KSEnterLiveroomManager.h"
+
+#import "RecordCheckManager.h"
+#import "KSPremissionAlert.h"
+
 static UIView *gCustomTopView;
 
 @interface KSTXBaseChatViewController ()
@@ -181,14 +185,41 @@ static UIView *gCustomTopView;
     }];
 }
 
-//- (void)
+
 - (void)showMusic:(NSString *)songId {
-    KSAccompanyWebViewController *detailCtrl = [[KSAccompanyWebViewController alloc] init];
-    detailCtrl.url = [NSString stringWithFormat:@"%@/accompany?id=%@",hostURL, songId];
-    detailCtrl.parmDic = @{@"isOpenLight" : @(YES), @"orientation" : @(0),@"isHideTitle" : @(YES)};
-    [self.navigationController pushViewController:detailCtrl animated:YES];
+    PREMISSIONTYPE micEnable = [RecordCheckManager checkPermissionShowAlert:NO showInView:nil];
+    PREMISSIONTYPE cameraEnable = [RecordCheckManager checkCameraPremissionAvaiable:NO showInView:nil];
+    if (micEnable == PREMISSIONTYPE_YES && cameraEnable == PREMISSIONTYPE_YES) {
+        KSAccompanyWebViewController *detailCtrl = [[KSAccompanyWebViewController alloc] init];
+        detailCtrl.url = [NSString stringWithFormat:@"%@/accompany?id=%@",hostURL, songId];
+        detailCtrl.parmDic = @{@"isOpenLight" : @(YES), @"orientation" : @(0),@"isHideTitle" : @(YES)};
+        [self.navigationController pushViewController:detailCtrl animated:YES];
+    }
+    else {
+        if (micEnable == PREMISSIONTYPE_NO && cameraEnable == PREMISSIONTYPE_NO) { // 如果麦克风权限和摄像头权限都没有
+            [self showAlertWithMessage:@"请开启相机和麦克风访问权限" type:CHECKDEVICETYPE_BOTH];
+        }
+        else if (micEnable == PREMISSIONTYPE_NO) { // 如果没有麦克风权限
+            [self showAlertWithMessage:@"请开启麦克风访问权限" type:CHECKDEVICETYPE_MIC];
+        }
+        else if (cameraEnable == PREMISSIONTYPE_NO) { // 如果没有摄像头权限
+            [self showAlertWithMessage:@"请开启相机访问权限" type:CHECKDEVICETYPE_CAMREA];
+        }
+    }
 }
 
+- (void)showAlertWithMessage:(NSString *)message type:(CHECKDEVICETYPE)deviceType {
+    [KSPremissionAlert shareInstanceDisplayImage:deviceType message:message showInView:self.view cancel:^{
+        
+    } confirm:^{
+        [self openSettingView];
+    }];
+    
+}
+
+- (void)openSettingView {
+    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
+}
 
 
 /*

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/TenantGroup/TenantChooseMemberViewController.m

@@ -63,8 +63,8 @@
 }
 
 - (BOOL)isContainUser:(NSString *)memberId {
-    for (NSString *userId in self.groupMemberIdArray) {
-        if ([memberId isEqualToString:userId]) {
+    for (NSString *imUserId in self.groupMemberIdArray) {
+        if ([memberId isEqualToString:imUserId]) {
             return YES;
         }
     }
@@ -73,7 +73,7 @@
 
 - (BOOL)getStuChooseStatus:(NSString *)userId {
     for (TenantStuModel *chooseModel in self.preChooseMember) {
-        if ([userId isEqualToString:chooseModel.userId]) {
+        if ([userId isEqualToString:chooseModel.imUserId]) {
             return YES;
         }
     }
@@ -93,7 +93,7 @@
     self.dataArray = [NSMutableArray array];
     self.chooseArray = [NSMutableArray array];
     for (TenantStuModel *model in stuArray) {
-        BOOL isChoose = [self getStuChooseStatus:model.userId];
+        BOOL isChoose = [self getStuChooseStatus:model.imUserId];
         if (isChoose) {
             model.isChoose = YES;
             [self.chooseArray addObject:model];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/TenantGroup/TenantCreateGroupViewController.m

@@ -82,7 +82,7 @@
     NSString *type = self.isFansGroup ? @"FAN" : @"ORG";
     NSMutableArray *studentIds = [NSMutableArray array];
     for (TenantStuModel *model in self.memberArray) {
-        [studentIds addObject:model.userId];
+        [studentIds addObject:model.imUserId];
     }
     [LOADING_MANAGER showHUD];
     [KSNetworkingManager tenantImGroupCreateRequest:KS_POST name:name introduce:desc studentIdArray:studentIds type:type success:^(NSDictionary * _Nonnull dic) {

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

@@ -243,7 +243,7 @@
     }
     NSMutableArray *stuIdArray = [NSMutableArray array];
     for (TenantStuModel *model in array) {
-        [stuIdArray addObject:model.userId];
+        [stuIdArray addObject:model.imUserId];
     }
     [LOADING_MANAGER showHUD];
     [KSNetworkingManager tenantImGroupAddMemberRequest:KS_POST groupId:self.groupId studentIdArray:stuIdArray success:^(NSDictionary * _Nonnull dic) {

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupMemberListCell.m

@@ -51,8 +51,8 @@
         else {
             self.memberName.text = model.nickname;
         }
-        NSString *userId = model.userId;
-        if ([userId isEqualToString:UserDefault(UIDKey)]) {
+        NSString *imUserId = model.imUserId;
+        if ([imUserId isEqualToString:UserDefault(IM_USERID)]) {
             self.chatButton.hidden = YES;
             self.chatButton.userInteractionEnabled = NO;
         }

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicSearchView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -65,7 +65,7 @@
                                     <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                                     <nil key="highlightedColor"/>
                                 </label>
-                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="arrow_down" translatesAutoresizingMaskIntoConstraints="NO" id="bvu-ci-chR">
+                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mine_arrow_down" translatesAutoresizingMaskIntoConstraints="NO" id="bvu-ci-chR">
                                     <rect key="frame" x="67" y="11.5" width="7" height="5"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="5" id="7da-ak-o9k"/>
@@ -212,8 +212,8 @@
         </view>
     </objects>
     <resources>
-        <image name="arrow_down" width="7" height="5"/>
         <image name="minePage_next" width="5" height="7"/>
+        <image name="mine_arrow_down" width="7" height="5"/>
         <image name="search_green" width="15" height="16"/>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageSort/MusicSortView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -65,7 +65,7 @@
                                     <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                                     <nil key="highlightedColor"/>
                                 </label>
-                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="arrow_down" translatesAutoresizingMaskIntoConstraints="NO" id="uGk-aV-eyB">
+                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mine_arrow_down" translatesAutoresizingMaskIntoConstraints="NO" id="uGk-aV-eyB">
                                     <rect key="frame" x="67" y="11.5" width="7" height="5"/>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="7" id="K4X-qU-aSK"/>
@@ -207,8 +207,8 @@
         </view>
     </objects>
     <resources>
-        <image name="arrow_down" width="7" height="5"/>
         <image name="minePage_next" width="5" height="7"/>
+        <image name="mine_arrow_down" width="7" height="5"/>
         <image name="search_green" width="15" height="16"/>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>

+ 0 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/TXClassRoom/View/MemberList/ClassMemberListView.m

@@ -38,7 +38,6 @@
 
 @property (nonatomic, assign) BOOL cancelMuteFlag; // ture 可以取消 false 不能取消
 
-@property (nonatomic, assign) NSInteger absentCount;
 @end
 
 @implementation ClassMemberListView

+ 2 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Widget/Model/TuningFunction/Tuner.swift

@@ -7,7 +7,8 @@
 
 import Foundation
 import AudioKit
-
+import AudioKitEX
+import SoundpipeAudioKit
 
 private let flats = ["C", "D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"]
 private let sharps = ["C", "C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"]

+ 2 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Widget/Model/TuningFunction/TunerForkManager.swift

@@ -7,6 +7,7 @@
 
 import Foundation
 import AudioKit
+import SoundpipeAudioKit
 
 @objc public class TunerForkManager : NSObject {
     
@@ -26,7 +27,7 @@ import AudioKit
         } catch {
             print("Couldn't start AudioEngine.")
         }
-        if osc.isPlaying {
+        if osc.isStarted {
             osc.stop()
         }
         osc.frequency = frequence