Browse Source

依赖调整

Steven 1 year ago
parent
commit
dca93336c2
41 changed files with 399 additions and 52 deletions
  1. 91 39
      KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj
  2. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyWebView/AccompanyLoadingView.h
  3. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyWebView/AccompanyLoadingView.m
  4. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyWebView/AccompanyLoadingView.xib
  5. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyWebView/KSAccompanyWebViewController.h
  6. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyWebView/KSAccompanyWebViewController.m
  7. 25 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyWebView/KSCloudWebManager.h
  8. 283 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyWebView/KSCloudWebManager.m
  9. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/BaseAlertView.h
  10. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/BaseAlertView.m
  11. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSPublicAlertView.h
  12. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSPublicAlertView.m
  13. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSPublicAlertView.xib
  14. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSTipsAlert.h
  15. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSTipsAlert.m
  16. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSTipsAlert.xib
  17. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSUpdateAlert.h
  18. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSUpdateAlert.m
  19. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSUpdateAlert.xib
  20. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSUpdateManager.h
  21. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSUpdateManager.m
  22. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController/BaseViewController.h
  23. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController/BaseViewController.m
  24. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController/KSBaseTableViewController.h
  25. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController/KSBaseTableViewController.m
  26. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController/KSBaseViewController.h
  27. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController/KSBaseViewController.m
  28. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/NavigationController/CustomNavViewController.h
  29. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/NavigationController/CustomNavViewController.m
  30. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/TabbarController/CustomTabBarController.h
  31. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/TabbarController/CustomTabBarController.m
  32. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/TabbarController/KSTabBarViewController.h
  33. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/TabbarController/KSTabBarViewController.m
  34. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSBaseWKWebViewController.h
  35. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSBaseWKWebViewController.m
  36. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSLocalWebViewController.h
  37. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSLocalWebViewController.m
  38. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSWebLoadRefreshView.h
  39. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSWebLoadRefreshView.m
  40. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSWebLoadRefreshView.xib
  41. 0 13
      KulexiuForStudent/KulexiuForStudent/Common/WebViewBaseConfig.h

+ 91 - 39
KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj

@@ -409,6 +409,7 @@
 		BC3A556D2BAA7B1A002E1616 /* CloudAccompanyLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC3A556A2BAA7B1A002E1616 /* CloudAccompanyLibrary.framework */; };
 		BC3A556E2BAA7B2D002E1616 /* KSTunerLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC3A55682BAA7B19002E1616 /* KSTunerLibrary.framework */; };
 		BC3A556F2BAA7B2D002E1616 /* KSTunerLibrary.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = BC3A55682BAA7B19002E1616 /* KSTunerLibrary.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+		BC3A55822BAA8F34002E1616 /* KSCloudWebManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BC3A55802BAA8F34002E1616 /* KSCloudWebManager.m */; };
 		BC3BF6402B9FE92600831494 /* ShareFunctionView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC3BF63E2B9FE92600831494 /* ShareFunctionView.m */; };
 		BC3BF6412B9FE92600831494 /* ShareFunctionView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC3BF63F2B9FE92600831494 /* ShareFunctionView.xib */; };
 		BC40B9F82811767A00DEC0D1 /* HotInformationHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC40B9F72811767A00DEC0D1 /* HotInformationHeadView.m */; };
@@ -1698,6 +1699,8 @@
 		BC3A55682BAA7B19002E1616 /* KSTunerLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = KSTunerLibrary.framework; sourceTree = "<group>"; };
 		BC3A55692BAA7B19002E1616 /* KSToolLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = KSToolLibrary.framework; sourceTree = "<group>"; };
 		BC3A556A2BAA7B1A002E1616 /* CloudAccompanyLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CloudAccompanyLibrary.framework; sourceTree = "<group>"; };
+		BC3A55802BAA8F34002E1616 /* KSCloudWebManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSCloudWebManager.m; sourceTree = "<group>"; };
+		BC3A55812BAA8F34002E1616 /* KSCloudWebManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSCloudWebManager.h; sourceTree = "<group>"; };
 		BC3BF62F2B9EAFC800831494 /* client.p12 */ = {isa = PBXFileReference; lastKnownFileType = file; path = client.p12; sourceTree = "<group>"; };
 		BC3BF63D2B9FE92500831494 /* ShareFunctionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShareFunctionView.h; sourceTree = "<group>"; };
 		BC3BF63E2B9FE92600831494 /* ShareFunctionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShareFunctionView.m; sourceTree = "<group>"; };
@@ -2395,7 +2398,6 @@
 		BCD457AA286469600010B493 /* PublicNoticeView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PublicNoticeView.xib; sourceTree = "<group>"; };
 		BCD457AD28646B580010B493 /* NoticeSourceModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NoticeSourceModel.h; sourceTree = "<group>"; };
 		BCD457AE28646B580010B493 /* NoticeSourceModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NoticeSourceModel.m; sourceTree = "<group>"; };
-		BCD46F882B2802110018EF78 /* WebViewBaseConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebViewBaseConfig.h; sourceTree = "<group>"; };
 		BCD959C728DB071B00B70314 /* MusicTagView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MusicTagView.h; sourceTree = "<group>"; };
 		BCD959C828DB071B00B70314 /* MusicTagView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MusicTagView.m; sourceTree = "<group>"; };
 		BCD959CA28DB0BAB00B70314 /* KSImageShareViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSImageShareViewController.h; sourceTree = "<group>"; };
@@ -3249,7 +3251,6 @@
 				2779350B27E324A40010E277 /* Base */,
 				BCD959CA28DB0BAB00B70314 /* KSImageShareViewController.h */,
 				BCD959CB28DB0BAB00B70314 /* KSImageShareViewController.m */,
-				BCD46F882B2802110018EF78 /* WebViewBaseConfig.h */,
 			);
 			path = Common;
 			sourceTree = "<group>";
@@ -3440,6 +3441,12 @@
 		2779350B27E324A40010E277 /* Base */ = {
 			isa = PBXGroup;
 			children = (
+				BC3A55752BAA8479002E1616 /* AlertView */,
+				BC3A55742BAA841A002E1616 /* NavigationController */,
+				BC3A55762BAA84B8002E1616 /* TabbarController */,
+				BC3A55732BAA83E9002E1616 /* BaseViewController */,
+				BC3A55712BAA83BB002E1616 /* AccompanyWebView */,
+				BC3A55702BAA83BB002E1616 /* WebView */,
 				BC9AA0D72ABC434900CD954D /* LoadingManager */,
 				BCB5B2D42ABB1E12005BF25D /* KSEmptyStatusView.h */,
 				BCB5B2D22ABB1E12005BF25D /* KSEmptyStatusView.m */,
@@ -3447,49 +3454,12 @@
 				BC2888532A80F7BF0064B773 /* LoginManger */,
 				BCC5839328A9EC5C00BAB4CF /* CloudLoadingSource */,
 				BC71D27C288807400010F14B /* TabbarAnimation */,
-				BC60E3D0287D592800B05441 /* KSPublicAlertView.h */,
-				BC60E3D1287D592800B05441 /* KSPublicAlertView.m */,
-				BC60E3CF287D592800B05441 /* KSPublicAlertView.xib */,
-				BCB9FA44286EDCD7005D766B /* KSTipsAlert.h */,
-				BCB9FA43286EDCD7005D766B /* KSTipsAlert.m */,
-				BCB9FA45286EDCD7005D766B /* KSTipsAlert.xib */,
-				2723B63B27F159BA00E0B90B /* KSBaseTableViewController.h */,
-				2723B63A27F159BA00E0B90B /* KSBaseTableViewController.m */,
-				275FA1BE27E7351600CFEA2E /* BaseViewController.h */,
-				275FA1CF27E7351800CFEA2E /* BaseViewController.m */,
-				275FA1BC27E7351500CFEA2E /* CustomNavViewController.h */,
-				275FA1C827E7351700CFEA2E /* CustomNavViewController.m */,
-				275FA1C327E7351600CFEA2E /* KSAccompanyWebViewController.h */,
-				275FA1C427E7351600CFEA2E /* KSAccompanyWebViewController.m */,
-				BCC5838E28A9E8A800BAB4CF /* AccompanyLoadingView.h */,
-				BCC5838F28A9E8A800BAB4CF /* AccompanyLoadingView.m */,
-				BCC5839128A9E8AF00BAB4CF /* AccompanyLoadingView.xib */,
-				275FA1C527E7351600CFEA2E /* KSBaseViewController.h */,
-				275FA1D627E7351800CFEA2E /* KSBaseViewController.m */,
-				275FA1D527E7351800CFEA2E /* KSBaseWKWebViewController.h */,
-				275FA1CE27E7351700CFEA2E /* KSBaseWKWebViewController.m */,
-				BC0D95152AC280CA00E54D3F /* KSWebLoadRefreshView.h */,
-				BC0D95172AC280CA00E54D3F /* KSWebLoadRefreshView.m */,
-				BC0D95162AC280CA00E54D3F /* KSWebLoadRefreshView.xib */,
 				BCFE540128152A8500AD6786 /* KSOrderManager.h */,
 				BCFE540228152A8500AD6786 /* KSOrderManager.m */,
-				275FA1C027E7351600CFEA2E /* KSLocalWebViewController.h */,
-				275FA1B927E7351500CFEA2E /* KSLocalWebViewController.m */,
 				275FA1CA27E7351700CFEA2E /* KSNetTypeManager.h */,
 				275FA1C927E7351700CFEA2E /* KSNetTypeManager.m */,
-				BCCC36222AAF3F93000D60CA /* CustomTabBarController.h */,
-				BCCC36232AAF3F93000D60CA /* CustomTabBarController.m */,
-				275FA1D727E7351900CFEA2E /* KSTabBarViewController.h */,
-				275FA1BD27E7351500CFEA2E /* KSTabBarViewController.m */,
-				275FA1CB27E7351700CFEA2E /* KSUpdateAlert.h */,
-				275FA1C627E7351700CFEA2E /* KSUpdateAlert.m */,
-				275FA1D927E7351900CFEA2E /* KSUpdateAlert.xib */,
-				275FA1B227E7351400CFEA2E /* KSUpdateManager.h */,
-				275FA1D027E7351800CFEA2E /* KSUpdateManager.m */,
 				275FA1D427E7351800CFEA2E /* KSNetworkingManager.h */,
 				275FA1AF27E7351400CFEA2E /* KSNetworkingManager.m */,
-				BCB9FA48286EDE19005D766B /* BaseAlertView.h */,
-				BCB9FA49286EDE19005D766B /* BaseAlertView.m */,
 			);
 			path = Base;
 			sourceTree = "<group>";
@@ -4531,6 +4501,87 @@
 			path = ShareLiveView;
 			sourceTree = "<group>";
 		};
+		BC3A55702BAA83BB002E1616 /* WebView */ = {
+			isa = PBXGroup;
+			children = (
+				275FA1C027E7351600CFEA2E /* KSLocalWebViewController.h */,
+				275FA1B927E7351500CFEA2E /* KSLocalWebViewController.m */,
+				275FA1D527E7351800CFEA2E /* KSBaseWKWebViewController.h */,
+				275FA1CE27E7351700CFEA2E /* KSBaseWKWebViewController.m */,
+				BC0D95152AC280CA00E54D3F /* KSWebLoadRefreshView.h */,
+				BC0D95172AC280CA00E54D3F /* KSWebLoadRefreshView.m */,
+				BC0D95162AC280CA00E54D3F /* KSWebLoadRefreshView.xib */,
+			);
+			path = WebView;
+			sourceTree = "<group>";
+		};
+		BC3A55712BAA83BB002E1616 /* AccompanyWebView */ = {
+			isa = PBXGroup;
+			children = (
+				275FA1C327E7351600CFEA2E /* KSAccompanyWebViewController.h */,
+				275FA1C427E7351600CFEA2E /* KSAccompanyWebViewController.m */,
+				BCC5838E28A9E8A800BAB4CF /* AccompanyLoadingView.h */,
+				BCC5838F28A9E8A800BAB4CF /* AccompanyLoadingView.m */,
+				BCC5839128A9E8AF00BAB4CF /* AccompanyLoadingView.xib */,
+				BC3A55812BAA8F34002E1616 /* KSCloudWebManager.h */,
+				BC3A55802BAA8F34002E1616 /* KSCloudWebManager.m */,
+			);
+			path = AccompanyWebView;
+			sourceTree = "<group>";
+		};
+		BC3A55732BAA83E9002E1616 /* BaseViewController */ = {
+			isa = PBXGroup;
+			children = (
+				275FA1C527E7351600CFEA2E /* KSBaseViewController.h */,
+				275FA1D627E7351800CFEA2E /* KSBaseViewController.m */,
+				2723B63B27F159BA00E0B90B /* KSBaseTableViewController.h */,
+				2723B63A27F159BA00E0B90B /* KSBaseTableViewController.m */,
+				275FA1BE27E7351600CFEA2E /* BaseViewController.h */,
+				275FA1CF27E7351800CFEA2E /* BaseViewController.m */,
+			);
+			path = BaseViewController;
+			sourceTree = "<group>";
+		};
+		BC3A55742BAA841A002E1616 /* NavigationController */ = {
+			isa = PBXGroup;
+			children = (
+				275FA1BC27E7351500CFEA2E /* CustomNavViewController.h */,
+				275FA1C827E7351700CFEA2E /* CustomNavViewController.m */,
+			);
+			path = NavigationController;
+			sourceTree = "<group>";
+		};
+		BC3A55752BAA8479002E1616 /* AlertView */ = {
+			isa = PBXGroup;
+			children = (
+				BC60E3D0287D592800B05441 /* KSPublicAlertView.h */,
+				BC60E3D1287D592800B05441 /* KSPublicAlertView.m */,
+				BC60E3CF287D592800B05441 /* KSPublicAlertView.xib */,
+				BCB9FA44286EDCD7005D766B /* KSTipsAlert.h */,
+				BCB9FA43286EDCD7005D766B /* KSTipsAlert.m */,
+				BCB9FA45286EDCD7005D766B /* KSTipsAlert.xib */,
+				275FA1CB27E7351700CFEA2E /* KSUpdateAlert.h */,
+				275FA1C627E7351700CFEA2E /* KSUpdateAlert.m */,
+				275FA1D927E7351900CFEA2E /* KSUpdateAlert.xib */,
+				275FA1B227E7351400CFEA2E /* KSUpdateManager.h */,
+				275FA1D027E7351800CFEA2E /* KSUpdateManager.m */,
+				BCB9FA48286EDE19005D766B /* BaseAlertView.h */,
+				BCB9FA49286EDE19005D766B /* BaseAlertView.m */,
+			);
+			path = AlertView;
+			sourceTree = "<group>";
+		};
+		BC3A55762BAA84B8002E1616 /* TabbarController */ = {
+			isa = PBXGroup;
+			children = (
+				BCCC36222AAF3F93000D60CA /* CustomTabBarController.h */,
+				BCCC36232AAF3F93000D60CA /* CustomTabBarController.m */,
+				275FA1D727E7351900CFEA2E /* KSTabBarViewController.h */,
+				275FA1BD27E7351500CFEA2E /* KSTabBarViewController.m */,
+			);
+			path = TabbarController;
+			sourceTree = "<group>";
+		};
 		BC3BF6252B9EAF4B00831494 /* ToolKit */ = {
 			isa = PBXGroup;
 			children = (
@@ -7058,6 +7109,7 @@
 				2723B68227F15D3D00E0B90B /* ModifyPhoneChangeController.m in Sources */,
 				BC5367C2283F6D4D008428E8 /* HomeLiveCourseView.m in Sources */,
 				BCC0F6E12A8CE24400C4EFA4 /* KSWhiteboardView.m in Sources */,
+				BC3A55822BAA8F34002E1616 /* KSCloudWebManager.m in Sources */,
 				BC106C432A9339FB000759A9 /* LiveAlertView.m in Sources */,
 				BC40BA1F2812552300DEC0D1 /* KSHomeButton.m in Sources */,
 				BC1191FF280ED64E00A716F7 /* MyCourseViewController.m in Sources */,

+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyLoadingView.h → KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyWebView/AccompanyLoadingView.h


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyLoadingView.m → KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyWebView/AccompanyLoadingView.m


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyLoadingView.xib → KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyWebView/AccompanyLoadingView.xib


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSAccompanyWebViewController.h → KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyWebView/KSAccompanyWebViewController.h


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSAccompanyWebViewController.m → KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyWebView/KSAccompanyWebViewController.m


+ 25 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyWebView/KSCloudWebManager.h

@@ -0,0 +1,25 @@
+//
+//  KSCloudWebManager.h
+//  KulexiuSchoolStudent
+//
+//  Created by 王智 on 2024/1/19.
+//
+
+#import <Foundation/Foundation.h>
+#import "CustomNavViewController.h"
+
+#define CLOUDWEB_MANAGER ([KSCloudWebManager shareInstance])
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSCloudWebManager : NSObject
+
++ (instancetype)shareInstance;
+
+- (void)configCloudWebSource;
+
+- (void)showWebView:(NSDictionary *)parm fromController:(CustomNavViewController *)navCtrl;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 283 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyWebView/KSCloudWebManager.m

@@ -0,0 +1,283 @@
+//
+//  KSCloudWebManager.m
+//  KulexiuSchoolStudent
+//
+//  Created by 王智 on 2024/1/19.
+//
+
+#import "KSCloudWebManager.h"
+#import <CloudAccompanyLibrary/CloudWebConfig.h>
+#import <CloudAccompanyLibrary/KSCloudWebViewController.h>
+#import <KSToolLibrary/RecordCheckManager.h>
+#import "KSPremissionAlert.h"
+#import "KSBaseWKWebViewController.h"
+#import "KSMediaMergeView.h"
+#import <KSToolLibrary/UIDevice+TFDevice.h>
+#import "AppDelegate+AppService.h"
+#import "AccompanyLoadingView.h"
+#import "KSWebLoadRefreshView.h"
+
+@interface KSCloudWebManager ()<KSCloudWebViewControllerDelegate>
+
+@property (nonatomic, strong) AccompanyLoadingView *customLoading;
+
+@property (nonatomic, strong) KSWebLoadRefreshView *errorView;
+
+@end
+
+@implementation KSCloudWebManager
+
++ (instancetype)shareInstance {
+    
+    static KSCloudWebManager *manager = nil;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        manager = [[KSCloudWebManager alloc] init];
+    });
+    return manager;
+}
+
+
+- (void)configCloudWebSource {
+    CLOUD_CONFIG.scrpit_name = SCRIPT_NAME;
+    CLOUD_CONFIG.agent_name = AGENT_NAME;
+    CLOUD_CONFIG.agent_domain = AGENT_DOMAIN;
+    CLOUD_CONFIG.token_type = UserDefault(Token_type);
+    CLOUD_CONFIG.current_token = UserDefault(TokenKey);
+    CLOUD_CONFIG.user_ID = UserDefault(UIDKey);
+    CLOUD_CONFIG.socket_host = SOCKET_URL;
+    CLOUD_CONFIG.authFilePath = CERT_PATH;
+    CLOUD_CONFIG.need_auth = SSL_AUTH;
+    CLOUD_CONFIG.themeColor = CLIENT_THEMECOLOR;
+    CLOUD_CONFIG.soundFilePath = [[NSBundle mainBundle] pathForResource:@"synthgms" ofType:@"sf2"];
+}
+
+- (void)showWebView:(NSDictionary *)parm fromController:(CustomNavViewController *)navCtrl {
+    PREMISSIONTYPE micEnable = [RecordCheckManager checkMicPermissionAvaiable];
+    PREMISSIONTYPE cameraEnable = [RecordCheckManager checkCameraPremissionAvaiable];
+    if (micEnable == PREMISSIONTYPE_YES && cameraEnable == PREMISSIONTYPE_YES) { //
+        KSCloudWebViewController *ctrl = [[KSCloudWebViewController alloc] init];
+        ctrl.webViewDelegate = self;
+        ctrl.url = [parm ks_stringValueForKey:@"url"];
+        ctrl.parmDic = parm;
+        NSInteger orientation = [parm ks_integerValueForKey:@"orientation"];
+        BOOL isLandScape = orientation == 0 ? YES : NO;
+        ctrl.ks_landScape = isLandScape;
+        [navCtrl pushViewController:ctrl 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:[NSObject getKeyWindow] cancel:^{
+        
+    } confirm:^{
+        [self openSettingView];
+    }];
+    
+}
+
+- (void)openSettingView {
+    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
+}
+
+// 回调权限
+- (void)NotiferShowPremissAlert:(NSString *)message {
+    [KSPremissionAlert shareInstanceDisplayImage:CHECKDEVICETYPE_BOTH message:message showInView:[NSObject getKeyWindow] cancel:^{
+        
+    } confirm:^{
+        [self openSettingView];
+    }];
+}
+
+// 下载
+- (void)notiferDownloadFileUrl:(NSString *)url success:(void (^)(NSURL * _Nonnull, NSString * _Nonnull))success faliure:(void (^)(void))faliure {
+    [KSNetworkingManager downloadFileRequestWithFileUrl:url progress:^(int64_t bytesRead, int64_t totalBytes) {
+        
+    } success:^(NSURL * _Nonnull fileUrl) {
+        if (success) {
+            success(fileUrl,url);
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        if (faliure) {
+            faliure();
+        }
+    }];
+}
+
+// 上传
+- (void)uploadFile:(NSString *)uploadFileUrl success:(void (^)(NSString * _Nonnull))success faliure:(void (^)(NSString * _Nonnull))faliure {
+    [LOADING_MANAGER showCustomLoading:@"上传中..."];
+    NSData *fileData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:uploadFileUrl]];
+    NSString *suffix = [NSString stringWithFormat:@".%@",[uploadFileUrl pathExtension]];
+    [UPLOAD_MANAGER configWithfilePath:@"/user/"];
+    [UPLOAD_MANAGER videoUpload:fileData fileName:@"video" fileSuffix:suffix progress:^(int64_t bytesWritten, int64_t totalBytes) {
+        // 显示进度
+        int progress = (int)(bytesWritten / totalBytes * 100);
+        __block NSString *tipsMessage = [NSString stringWithFormat:@"上传中 %d%%",progress];
+        dispatch_main_async_safe(^{
+            [LOADING_MANAGER.loadingView setDisplayText:tipsMessage];
+        });
+    } successCallback:^(NSMutableArray * _Nonnull fileUrlArray) {
+        [LOADING_MANAGER removeCustomLoading];
+        NSString *fileUrl = [fileUrlArray lastObject];
+        success(fileUrl);
+        
+    } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
+        [LOADING_MANAGER removeCustomLoading];
+        faliure(descMessaeg);
+    }];
+}
+#pragma mark ------- KSCloudWebViewControllerDelegate
+
+- (void)openWebViewWithParm:(NSDictionary *)parm inNavController:(UINavigationController *)navController {
+    KSBaseWKWebViewController *detailCtrl = [[KSBaseWKWebViewController alloc] init];
+    detailCtrl.url = [parm ks_stringValueForKey:@"url"];
+    detailCtrl.parmDic = parm;
+    NSInteger orientation = [parm ks_integerValueForKey:@"orientation"];
+    BOOL isLandScape = orientation == 0 ? YES : NO;
+    detailCtrl.ks_landScape = isLandScape;
+
+//    if ([parm ks_boolValueForKey:@"showLoadingAnim"]) {
+//        [detailCtrl showCoursewareLoading];
+//    }
+    [navController pushViewController:detailCtrl animated:YES];
+}
+
+- (void)showMergeViewWithParm:(NSDictionary *)parm displayInView:(UIView *)displayView callBackController:(KSCloudWebViewController *)controller {
+    KSMediaMergeView *mergeView = [[KSMediaMergeView alloc] init];
+    [displayView addSubview:mergeView];
+    [mergeView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.bottom.mas_equalTo(displayView);
+    }];
+    mergeView.recordId = [parm ks_stringValueForKey:@"recordId"];
+    mergeView.songName = [parm ks_stringValueForKey:@"title"];
+    mergeView.coverImage = [parm ks_stringValueForKey:@"coverImg"];
+    MJWeakSelf;
+    NSInteger defaultDelay = [parm ks_integerValueForKey:@"defaultDelay"];
+    NSURL *videoUrl = [parm valueForKey:@"videoUrl"];
+    NSURL *bgAudioUrl = [parm valueForKey:@"bgAudioUrl"];
+    NSURL *recordUrl = [parm valueForKey:@"recordUrl"];
+    NSString *accompanyUrl = [parm ks_stringValueForKey:@"remoteBgUrl"];
+    
+    [mergeView configWithVideoUrl:videoUrl bgAudioUrl:bgAudioUrl remoteBgUrl:accompanyUrl  recordUrl:recordUrl offsetTime:defaultDelay mergeCallback:^{
+        [weakSelf callBackMergeSuccess:controller];
+    }];
+}
+
+- (void)callBackMergeSuccess:(KSCloudWebViewController *)controller {
+    
+    [controller musicPublishCallBack];
+}
+
+- (void)changeCurrentPageLandScape:(BOOL)landScape changeController:(KSCloudWebViewController *)controller {
+    if (landScape) {
+        // 切换到横屏
+        if (IS_IPAD) {
+            controller.zh_statusBarHidden = YES;
+        }
+        AppDelegate* delegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
+        delegate.allowAutoRotate = YES;
+        [UIDevice switchNewOrientation:UIInterfaceOrientationLandscapeRight inController:controller];
+    }
+    else {
+        if (IS_IPAD) {
+            controller.zh_statusBarHidden = NO;
+        }
+        AppDelegate* delegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
+        delegate.allowAutoRotate = NO;
+        [UIDevice switchNewOrientation:UIInterfaceOrientationPortrait inController:controller];
+    }
+}
+
+- (void)notiferShowAICustomLoadingDisplayInView:(UIView *)view callBackController:(KSCloudWebViewController *)controller {
+    MJWeakSelf;
+    [self.customLoading loadingCallback:^{
+        [weakSelf notiferBack:controller];
+    }];
+    if ([view.subviews containsObject:self.customLoading]) {
+        return;
+    }
+    [view addSubview:self.customLoading];
+    [self.customLoading mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.top.right.bottom.mas_equalTo(view);
+    }];
+    [view bringSubviewToFront:self.customLoading];
+    [self.customLoading showLoading];
+}
+
+
+- (void)notiferRemoveAICustomLoading {
+    [self.customLoading stopLoading];
+    _customLoading = nil;
+}
+
+#pragma mark ---- error View
+- (void)notiferShowErrorViewDisplayInView:(UIView *)view callBackController:(KSCloudWebViewController *)controller {
+    MJWeakSelf;
+    [_errorView failViewActionCallback:^(BOOL isBack) {
+        [weakSelf hideErrorViewInView:view];
+        if (isBack) {
+            [weakSelf notiferBack:controller];
+        }
+        else {
+            [weakSelf notiferRefresh:controller];
+        }
+    }];
+}
+
+
+- (void)notiferRemoveErrorInView:(UIView *)view {
+    [self hideErrorViewInView:view];
+}
+
+- (void)hideErrorViewInView:(UIView *)view {
+    
+    if ([view.subviews containsObject:self.errorView]) {
+        [self.errorView removeFromSuperview];
+    }
+    _errorView = nil;
+}
+
+- (void)notiferRefresh:(KSCloudWebViewController *)controller {
+    [controller loadRequest];
+}
+
+#pragma mark ----- 小酷AI loading
+- (AccompanyLoadingView *)customLoading {
+    if (!_customLoading) {
+        _customLoading = [AccompanyLoadingView shareInstance];
+    }
+    return _customLoading;
+}
+
+- (void)notiferBack:(KSCloudWebViewController *)controller {
+    if (_customLoading) {
+        [self notiferRemoveAICustomLoading];
+    }
+    if (_errorView) {
+        [_errorView removeFromSuperview];
+        _errorView = nil;
+    }
+    [controller backAction];
+}
+
+#pragma mark --- web error
+- (KSWebLoadRefreshView *)errorView {
+    if (!_errorView) {
+        _errorView = [KSWebLoadRefreshView shareInstance];
+    }
+    return _errorView;
+}
+
+@end

+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/BaseAlertView.h → KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/BaseAlertView.h


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/BaseAlertView.m → KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/BaseAlertView.m


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSPublicAlertView.h → KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSPublicAlertView.h


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSPublicAlertView.m → KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSPublicAlertView.m


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSPublicAlertView.xib → KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSPublicAlertView.xib


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSTipsAlert.h → KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSTipsAlert.h


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSTipsAlert.m → KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSTipsAlert.m


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSTipsAlert.xib → KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSTipsAlert.xib


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSUpdateAlert.h → KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSUpdateAlert.h


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSUpdateAlert.m → KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSUpdateAlert.m


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSUpdateAlert.xib → KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSUpdateAlert.xib


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSUpdateManager.h → KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSUpdateManager.h


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSUpdateManager.m → KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSUpdateManager.m


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController.h → KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController/BaseViewController.h


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController.m → KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController/BaseViewController.m


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseTableViewController.h → KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController/KSBaseTableViewController.h


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseTableViewController.m → KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController/KSBaseTableViewController.m


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseViewController.h → KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController/KSBaseViewController.h


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseViewController.m → KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController/KSBaseViewController.m


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/CustomNavViewController.h → KulexiuForStudent/KulexiuForStudent/Common/Base/NavigationController/CustomNavViewController.h


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/CustomNavViewController.m → KulexiuForStudent/KulexiuForStudent/Common/Base/NavigationController/CustomNavViewController.m


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/CustomTabBarController.h → KulexiuForStudent/KulexiuForStudent/Common/Base/TabbarController/CustomTabBarController.h


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/CustomTabBarController.m → KulexiuForStudent/KulexiuForStudent/Common/Base/TabbarController/CustomTabBarController.m


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSTabBarViewController.h → KulexiuForStudent/KulexiuForStudent/Common/Base/TabbarController/KSTabBarViewController.h


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSTabBarViewController.m → KulexiuForStudent/KulexiuForStudent/Common/Base/TabbarController/KSTabBarViewController.m


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.h → KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSBaseWKWebViewController.h


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m → KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSBaseWKWebViewController.m


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSLocalWebViewController.h → KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSLocalWebViewController.h


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSLocalWebViewController.m → KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSLocalWebViewController.m


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSWebLoadRefreshView.h → KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSWebLoadRefreshView.h


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSWebLoadRefreshView.m → KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSWebLoadRefreshView.m


+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSWebLoadRefreshView.xib → KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSWebLoadRefreshView.xib


+ 0 - 13
KulexiuForStudent/KulexiuForStudent/Common/WebViewBaseConfig.h

@@ -1,13 +0,0 @@
-//
-//  WebViewBaseConfig.h
-//  KulexiuForStudent
-//
-//  Created by 王智 on 2023/12/12.
-//
-
-#ifndef WebViewBaseConfig_h
-#define WebViewBaseConfig_h
-
-
-
-#endif /* WebViewBaseConfig_h */