소스 검색

修改白板域名

Steven 1 년 전
부모
커밋
9cf178cf50

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

@@ -8789,7 +8789,7 @@
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = KulexiuForStudent/KulexiuForStudent.entitlements;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1.5.6;
+				CURRENT_PROJECT_VERSION = 1.5.7.1;
 				DEVELOPMENT_TEAM = B2AP53HHTU;
 				ENABLE_BITCODE = NO;
 				ENABLE_MODULE_VERIFIER = YES;
@@ -8845,7 +8845,7 @@
 					"$(PROJECT_DIR)/KulexiuForStudent/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.5/SocialLibraries/Sina/SinaSDK",
 					"$(PROJECT_DIR)/KulexiuForStudent/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.5/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 = (
@@ -8975,7 +8975,7 @@
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = KulexiuForStudent/KulexiuForStudent.entitlements;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1.5.6;
+				CURRENT_PROJECT_VERSION = 1.5.7.1;
 				DEVELOPMENT_TEAM = B2AP53HHTU;
 				ENABLE_BITCODE = NO;
 				ENABLE_MODULE_VERIFIER = YES;
@@ -9031,7 +9031,7 @@
 					"$(PROJECT_DIR)/KulexiuForStudent/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.5/SocialLibraries/Sina/SinaSDK",
 					"$(PROJECT_DIR)/KulexiuForStudent/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.5/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 = (

+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Classroom/whiteboard_refresh.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "whiteboard_refresh@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "whiteboard_refresh@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Classroom/whiteboard_refresh.imageset/whiteboard_refresh@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Classroom/whiteboard_refresh.imageset/whiteboard_refresh@3x.png


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

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

+ 26 - 20
KulexiuForStudent/KulexiuForStudent/Common/Define/KSDomain.h

@@ -28,20 +28,22 @@
 //#define SUBMIT_UUID (NO)
 //#define CONFIG_TXSDKAPPID (1400805079)
 //#define TXOfflinePushCertificateIDForAPNS (39557)
+//#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/student")
-#define TENANT_WEBHOST (@"https://test.colexiu.com/tenant")
-#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 (39557)
+//#define hostURL (@"https://test.colexiu.com")
+//#define SEALCLASSHOST (@"https://test.colexiu.com/api-classroom")
+//#define WEBHOST (@"https://test.colexiu.com/student")
+//#define TENANT_WEBHOST (@"https://test.colexiu.com/tenant")
+//#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 (39557)
+//#define WhiteBoardHostURL (@"https://test.dayaedu.com")
 
 // 预生产
 //#define hostURL (@"https://ponline.colexiu.com")
@@ -54,19 +56,23 @@
 //#define SUBMIT_UUID (YES)
 //#define CONFIG_TXSDKAPPID (1400799837)
 //#define TXOfflinePushCertificateIDForAPNS (39560)
+//#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/student")
-//#define TENANT_WEBHOST (@"https://online.colexiu.com//tenant")
-//#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 (39560)
+#define hostURL (@"https://online.colexiu.com")
+#define SEALCLASSHOST (@"https://online.colexiu.com/api-classroom")
+#define WEBHOST (@"https://online.colexiu.com/student")
+#define TENANT_WEBHOST (@"https://online.colexiu.com//tenant")
+#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 (39560)
+#define WhiteBoardHostURL (@"https://online.dayaedu.com")
+
 
 //#endif
 

+ 9 - 7
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/Controller/TenantDarkViewController.m

@@ -184,13 +184,7 @@
                 [sourceArray addObject:model];
                 [aniArray addObject:@"subject_Ani.json"];
             }
-            // 合奏
-            if (ensembleCount > 0) {
-                TenantAlbumModel *model = [[TenantAlbumModel alloc] init];
-                model.subjectType = @"ENSEMBLE";
-                [sourceArray addObject:model];
-                [aniArray addObject:@"mutiMusic_Ani.json"];
-            }
+            
             // 独奏
             if (musicCount > 0) {
                 TenantAlbumModel *model = [[TenantAlbumModel alloc] init];
@@ -198,6 +192,14 @@
                 [sourceArray addObject:model];
                 [aniArray addObject:@"singleMusic_Ani.json"];
             }
+            
+            // 合奏
+            if (ensembleCount > 0) {
+                TenantAlbumModel *model = [[TenantAlbumModel alloc] init];
+                model.subjectType = @"ENSEMBLE";
+                [sourceArray addObject:model];
+                [aniArray addObject:@"mutiMusic_Ani.json"];
+            }
             self.sourceArray = [NSMutableArray arrayWithArray:sourceArray];
             self.animationNameArray = [NSMutableArray arrayWithArray:aniArray];
         }

+ 12 - 6
KulexiuForStudent/KulexiuForStudent/Module/TXClassRoom/View/NewWhiteboard/KSNewWhiteBoard.m

@@ -21,6 +21,7 @@
 #import "UIImage+Color.h"
 
 #import "WhiteUtils.h"
+#import "WebViewBaseConfig.h"
 
 #define touchPy 10
 
@@ -81,7 +82,7 @@
 
 - (void)configUserAgent:(WKWebViewConfiguration *)config {
     NSString *oldUserAgent = config.applicationNameForUserAgent;
-    NSString *newAgent = [NSString stringWithFormat:@"%@ %@",oldUserAgent,@"DAYAAPPI"];
+    NSString *newAgent = [NSString stringWithFormat:@"%@ %@ %@",oldUserAgent,AGENT_NAME,AGENT_DOMAIN];
     config.applicationNameForUserAgent = newAgent;
 }
 
@@ -98,6 +99,11 @@
         _myWebView.scrollView.bounces = NO;
         _myWebView.UIDelegate = self;
         _myWebView.navigationDelegate = self;
+#ifdef DEBUG
+            if (@available(iOS 16.4, *)) {
+                _myWebView.inspectable = YES;
+            }
+#endif
     }
     return _myWebView;
 }
@@ -121,7 +127,7 @@
     WeakWebViewScriptMessageDelegate *weakScriptMessageDelegate = [[WeakWebViewScriptMessageDelegate alloc] initWithDelegate:self];
     //这个类主要用来做native与JavaScript的交互管理
     WKUserContentController * wkUController = [[WKUserContentController alloc] init];
-    [wkUController addScriptMessageHandler:weakScriptMessageDelegate name:@"DAYA"];
+    [wkUController addScriptMessageHandler:weakScriptMessageDelegate name:SCRIPT_NAME];
     config.userContentController = wkUController;
     
     WKPreferences *preferences = [WKPreferences new];
@@ -234,7 +240,7 @@
 #pragma mark - WKScriptMessageHandler
 - (void)userContentController:(WKUserContentController *)userContentController
       didReceiveScriptMessage:(WKScriptMessage *)message {
-    if ([message.name isEqualToString:@"DAYA"]) {
+    if ([message.name isEqualToString:SCRIPT_NAME]) {
         NSDictionary *parm = [self convertJsonStringToNSDictionary:message.body];
         // 回到主线程
         dispatch_async(dispatch_get_main_queue(), ^{
@@ -281,7 +287,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;
@@ -377,7 +383,7 @@
     NSData *imgData = [UIImage compressImage:image maxLength:5];
     
     NSString *fileName = @"whiteboardImage";
-    [UPLOAD_MANAGER configBucketName:@"daya"];
+    [UPLOAD_MANAGER configBucketName:@"klx"];
     [UPLOAD_MANAGER uploadImage:imgData fileName:fileName successCallback:^(NSMutableArray * _Nonnull fileUrlArray) {
         NSString *imageUrl = [fileUrlArray lastObject];
         [self insertImageWithUrl:imageUrl size:image.size];
@@ -597,7 +603,7 @@
 - (void)leaveRoom {
     self.isJoinRoom = NO;
     [self removeLoadig];
-    [[_myWebView configuration].userContentController removeScriptMessageHandlerForName:@"DAYA"];
+    [[_myWebView configuration].userContentController removeScriptMessageHandlerForName:SCRIPT_NAME];
     [_myWebView loadHTMLString:@"" baseURL:nil];
     [_myWebView removeFromSuperview];
     

+ 2 - 3
KulexiuForStudent/KulexiuForStudent/Module/TXClassRoom/View/NewWhiteboard/KSWhiteboardControl.m

@@ -154,14 +154,13 @@
 - (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) {
-        [self.customWebView removeLoadig];
         if (!error) {
             if (![NSString isEmptyString:randomNumeric] && ![NSString isEmptyString:randomRoom]) {
-                NSString *url = [NSString stringWithFormat:@"%@%@?roomId=%@&userId=%@&clientType=STUDENT&role=viewer#room=%@,%@", hostURL, @"/whiteboard/",self.roomId,UserDefault(UIDKey),randomRoom,randomNumeric];
+                NSString *url = [NSString stringWithFormat:@"%@%@?roomId=%@&userId=%@&clientType=STUDENT&role=viewer#room=%@,%@", WhiteBoardHostURL, @"/whiteboard/",self.roomId,UserDefault(UIDKey),randomRoom,randomNumeric];
                 self.customWebView.url = url;
             }
-            
         }
+        [self.customWebView removeLoadig];
     }];
     
 }

+ 9 - 11
KulexiuForStudent/KulexiuForStudent/Module/TXClassRoom/View/NewWhiteboard/KSWhiteboardRefreshView.xib

@@ -1,46 +1,44 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="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="21207"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="KSWhiteboardRefreshView">
-            <rect key="frame" x="0.0" y="0.0" width="81" height="21"/>
+            <rect key="frame" x="0.0" y="0.0" width="120" height="44"/>
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="whiteboard_refresh" translatesAutoresizingMaskIntoConstraints="NO" id="CpM-gB-e6j">
-                    <rect key="frame" x="2" y="2" width="17" height="17"/>
+                    <rect key="frame" x="2" y="13.666666666666664" width="17" height="17"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="17" id="Ekx-WQ-juE"/>
                         <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="3.333333333333333" 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"/>
                 </label>
                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="48M-dC-Wk0">
-                    <rect key="frame" x="0.0" y="0.0" width="81" height="21"/>
+                    <rect key="frame" x="0.0" y="0.0" width="120" height="44"/>
                     <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                     <connections>
                         <action selector="refreshView:" destination="iN0-l3-epB" eventType="touchUpInside" id="ufF-R4-DJO"/>
                     </connections>
                 </button>
             </subviews>
-            <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
             <color key="backgroundColor" red="1" green="0.92549019607843142" blue="0.81176470588235294" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
             <constraints>
-                <constraint firstItem="CpM-gB-e6j" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="2" id="6mf-8o-7pd"/>
-                <constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="48M-dC-Wk0" secondAttribute="bottom" id="HRN-dd-cMr"/>
+                <constraint firstItem="CpM-gB-e6j" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="2" id="6mf-8o-7pd"/>
                 <constraint firstItem="CpM-gB-e6j" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="Jga-yo-HeY"/>
+                <constraint firstAttribute="bottom" secondItem="48M-dC-Wk0" secondAttribute="bottom" id="Vid-ZT-i1v"/>
                 <constraint firstItem="bnH-VI-Gct" firstAttribute="leading" secondItem="CpM-gB-e6j" secondAttribute="trailing" constant="3" id="jzC-tx-Ra4"/>
                 <constraint firstItem="48M-dC-Wk0" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="nXU-Hc-Mf4"/>
                 <constraint firstItem="48M-dC-Wk0" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="thV-OA-DID"/>