Steven 1 rok pred
rodič
commit
8b866e2742

+ 5 - 5
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj

@@ -5537,8 +5537,8 @@
 			isa = PBXGroup;
 			children = (
 				BC0A22BC284752900065C1AB /* WhiteboardListCell.h */,
-				BC0A22BD284752900065C1AB /* WhiteboardListView.h */,
 				BC0A22BE284752900065C1AB /* WhiteboardListCell.m */,
+				BC0A22BD284752900065C1AB /* WhiteboardListView.h */,
 				BC0A22BF284752900065C1AB /* WhiteboardListView.m */,
 			);
 			path = WhiteboardList;
@@ -9782,7 +9782,7 @@
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = KulexiuForTeacher/KulexiuForTeacher.entitlements;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1.5.6;
+				CURRENT_PROJECT_VERSION = 1.5.7;
 				DEVELOPMENT_TEAM = B2AP53HHTU;
 				ENABLE_BITCODE = NO;
 				ENABLE_MODULE_VERIFIER = YES;
@@ -9828,7 +9828,7 @@
 					"$(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.6;
+				MARKETING_VERSION = 1.5.7;
 				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
 				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17";
 				OTHER_LDFLAGS = (
@@ -9983,7 +9983,7 @@
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = KulexiuForTeacher/KulexiuForTeacher.entitlements;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1.5.6;
+				CURRENT_PROJECT_VERSION = 1.5.7;
 				DEVELOPMENT_TEAM = B2AP53HHTU;
 				ENABLE_BITCODE = NO;
 				ENABLE_MODULE_VERIFIER = YES;
@@ -10029,7 +10029,7 @@
 					"$(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.6;
+				MARKETING_VERSION = 1.5.7;
 				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
 				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17";
 				OTHER_LDFLAGS = (

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

@@ -1721,7 +1721,7 @@
         [self sendPlayerReadyMsg];
     }
 }
-
+/*
 - (void)playerDidError:(kSNewPlayer *)player {
     [self stopRecordService];
     [self stopMp3Player]; // 停止播放
@@ -1731,7 +1731,7 @@
     };
     [self postMessage:postParm];
 }
-
+*/
 - (NSMutableArray *)delayArray {
     if (!_delayArray) {
         _delayArray = [NSMutableArray array];

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

@@ -22,17 +22,19 @@
 //#define SUBMIT_UUID (NO)
 //#define CONFIG_TXSDKAPPID (1400805079)
 //#define TXOfflinePushCertificateIDForAPNS (39559)
+//#define WhiteBoardHostURL (@"https://test.dayaedu.com")
 
 // 测试环境
-#define hostURL (@"https://test.colexiu.com")
-#define SEALCLASSHOST (@"https://test.colexiu.com/api-classroom")
-#define WEBHOST (@"https://test.colexiu.com/teacher")
-#define SOCKET_URL (@"wss://test.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")
+//#define SEALCLASSHOST (@"https://test.colexiu.com/api-classroom")
+//#define WEBHOST (@"https://test.colexiu.com/teacher")
+//#define SOCKET_URL (@"wss://test.colexiu.com/audioAnalysis")
+//#define JSPUSH_ENVIRONMENT (NO)
+//#define RCIM_KEY (@"0vnjpoad0jbdz")
+//#define SUBMIT_UUID (NO)
+//#define CONFIG_TXSDKAPPID (1400805079)
+//#define TXOfflinePushCertificateIDForAPNS (39559)
+//#define WhiteBoardHostURL (@"https://test.dayaedu.com")
 
 // 预生产
 //#define hostURL (@"https://ponline.colexiu.com")
@@ -44,18 +46,20 @@
 //#define SUBMIT_UUID (YES)
 //#define CONFIG_TXSDKAPPID (1400799837)
 //#define TXOfflinePushCertificateIDForAPNS (39561)
+//#define WhiteBoardHostURL (@"https://online.dayaedu.com")
 
 //#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)
+#define WhiteBoardHostURL (@"https://online.dayaedu.com")
 
 //#endif
 

+ 7 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/TXClassRoom/View/NewWhiteboard/KSNewWhiteBoard.m

@@ -29,6 +29,7 @@
 
 #import "CoursewareAlertView.h"
 #import "CourseWarePreviewView.h"
+#import "WebViewBaseConfig.h"
 #define touchPy 10
 
 @interface KSNewWhiteBoard ()<WKUIDelegate,WKNavigationDelegate,WKScriptMessageHandler,UIImagePickerControllerDelegate,UINavigationControllerDelegate,TZImagePickerControllerDelegate,UIAlertViewDelegate,UIGestureRecognizerDelegate,RSKImageCropViewControllerDelegate>
@@ -111,7 +112,7 @@
 
 - (void)configUserAgent:(WKWebViewConfiguration *)config {
     NSString *oldUserAgent = config.applicationNameForUserAgent;
-    NSString *newAgent = [NSString stringWithFormat:@"%@ %@ %@",oldUserAgent,@"COLEXIUAPPI",@"COLEXIUTEACHER"];
+    NSString *newAgent = [NSString stringWithFormat:@"%@ %@ %@",oldUserAgent,AGENT_NAME,AGENT_DOMAIN];
     config.applicationNameForUserAgent = newAgent;
 }
 
@@ -146,7 +147,7 @@
     WeakWebViewScriptMessageDelegate *weakScriptMessageDelegate = [[WeakWebViewScriptMessageDelegate alloc] initWithDelegate:self];
     //这个类主要用来做native与JavaScript的交互管理
     WKUserContentController * wkUController = [[WKUserContentController alloc] init];
-    [wkUController addScriptMessageHandler:weakScriptMessageDelegate name:@"COLEXIU"];
+    [wkUController addScriptMessageHandler:weakScriptMessageDelegate name:SCRIPT_NAME];
     config.userContentController = wkUController;
     WKPreferences *preferences = [WKPreferences new];
     // 是否支出javaScript
@@ -258,7 +259,7 @@
 #pragma mark - WKScriptMessageHandler
 - (void)userContentController:(WKUserContentController *)userContentController
       didReceiveScriptMessage:(WKScriptMessage *)message {
-    if ([message.name isEqualToString:@"COLEXIU"]) {
+    if ([message.name isEqualToString:SCRIPT_NAME]) {
         NSDictionary *parm = [self convertJsonStringToNSDictionary:message.body];
         // 回到主线程
         dispatch_async(dispatch_get_main_queue(), ^{
@@ -335,7 +336,7 @@
 - (void)dealloc {
     NSLog(@"-white board-");
     
-    [[_myWebView configuration].userContentController removeScriptMessageHandlerForName:@"DAYA"];
+    [[_myWebView configuration].userContentController removeScriptMessageHandlerForName:SCRIPT_NAME];
     [_myWebView loadHTMLString:@"" baseURL:nil];
     [_myWebView removeFromSuperview];
     _myWebView = nil;
@@ -457,7 +458,7 @@
     NSData *imgData = [UIImage compressImage:image maxLength:5];
     
     NSString *fileName = @"whiteboardImage";
-    [[KSUploadManager shareInstance] configBucketName:@"daya"];
+    [[KSUploadManager shareInstance] configBucketName:@"klx"];
     [[KSUploadManager shareInstance] uploadImage:imgData fileName:fileName successCallback:^(NSMutableArray * _Nonnull fileUrlArray) {
         NSString *imageUrl = [fileUrlArray lastObject];
         [self insertImageWithUrl:imageUrl size:image.size];
@@ -735,7 +736,7 @@
 - (void)leaveRoom {
     [self removeTouchWindow];
     [self removeLoadig];
-    [[_myWebView configuration].userContentController removeScriptMessageHandlerForName:@"DAYA"];
+    [[_myWebView configuration].userContentController removeScriptMessageHandlerForName:SCRIPT_NAME];
     [_myWebView loadHTMLString:@"" baseURL:nil];
     [_myWebView removeFromSuperview];
     

+ 4 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/TXClassRoom/View/NewWhiteboard/KSWhiteboardControl.m

@@ -175,14 +175,16 @@
 }
 
 - (void)getwhiteConfig {
-    
+    [self.customWebView showLoading];
+
     [WhiteUtils getRoomTokenWithRoomId:self.roomId completionHandler:^(NSString * _Nullable uuid, NSString * _Nullable roomToken, NSString * _Nonnull randomRoom, NSString * _Nullable randomNumeric, NSError * _Nullable error) {
         if (!error) {
             if (![NSString isEmptyString:randomNumeric] && ![NSString isEmptyString:randomRoom]) {
-                NSString *url = [NSString stringWithFormat:@"%@%@?roomId=%@&userId=%@&clientType=TEACHER#room=%@,%@", hostURL, @"/whiteboard/",self.roomId,UserDefault(UIDKey),randomRoom,randomNumeric];
+                NSString *url = [NSString stringWithFormat:@"%@%@?roomId=%@&userId=%@&clientType=TEACHER#room=%@,%@", WhiteBoardHostURL, @"/whiteboard/",self.roomId,UserDefault(UIDKey),randomRoom,randomNumeric];
                 self.customWebView.url = url;
             }
         }
+        [self.customWebView removeLoadig];
     }];
 
 }

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/TXClassRoom/View/NewWhiteboard/KSWhiteboardRefreshView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_0" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -24,8 +24,8 @@
                         <constraint firstAttribute="width" constant="17" id="UTl-KM-cUc"/>
                     </constraints>
                 </imageView>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="刷新一下" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bnH-VI-Gct">
-                    <rect key="frame" x="22.000000000000004" y="15" width="61.333333333333343" height="14.333333333333336"/>
+                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="刷新一下" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bnH-VI-Gct">
+                    <rect key="frame" x="22.000000000000004" y="15" width="49.333333333333343" height="14.333333333333336"/>
                     <fontDescription key="fontDescription" type="system" pointSize="12"/>
                     <color key="textColor" red="1" green="0.50196078431372548" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                     <nil key="highlightedColor"/>