Sfoglia il codice sorgente

白板域名更换

Steven 9 mesi fa
parent
commit
70d9c088cf

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/Model/VideoCourseModel.h

@@ -30,6 +30,8 @@
 @property (nonatomic, assign) double topFlag;
 @property (nonatomic, strong) NSString *updateTime;
 @property (nonatomic, strong) NSString *lessonSubjectName;
+@property (nonatomic, strong) NSString *payType;
+
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;
 - (NSDictionary *)dictionaryRepresentation;

+ 8 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/Model/VideoCourseModel.m

@@ -27,6 +27,7 @@ NSString *const kVideoCourseModelLessonTag = @"lessonTag";
 NSString *const kVideoCourseModelTopFlag = @"topFlag";
 NSString *const kVideoCourseModelUpdateTime = @"updateTime";
 NSString *const kVideoCourseModelLessonSubjectName = @"lessonSubjectName";
+NSString *const kVideoCourseModelPayType = @"payType";
 
 @interface VideoCourseModel ()
 
@@ -55,6 +56,7 @@ NSString *const kVideoCourseModelLessonSubjectName = @"lessonSubjectName";
 @synthesize topFlag = _topFlag;
 @synthesize updateTime = _updateTime;
 @synthesize lessonSubjectName = _lessonSubjectName;
+@synthesize payType = _payType;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 {
@@ -87,6 +89,7 @@ NSString *const kVideoCourseModelLessonSubjectName = @"lessonSubjectName";
             self.topFlag = [[self objectOrNilForKey:kVideoCourseModelTopFlag fromDictionary:dict] doubleValue];
             self.updateTime = [self objectOrNilForKey:kVideoCourseModelUpdateTime fromDictionary:dict];
         self.lessonSubjectName = [self objectOrNilForKey:kVideoCourseModelLessonSubjectName fromDictionary:dict];
+        self.payType = [self objectOrNilForKey:kVideoCourseModelPayType fromDictionary:dict];
     }
     
     return self;
@@ -115,6 +118,7 @@ NSString *const kVideoCourseModelLessonSubjectName = @"lessonSubjectName";
     [mutableDict setValue:[NSNumber numberWithDouble:self.topFlag] forKey:kVideoCourseModelTopFlag];
     [mutableDict setValue:self.updateTime forKey:kVideoCourseModelUpdateTime];
     [mutableDict setValue:self.lessonSubjectName forKey:kVideoCourseModelLessonSubjectName];
+    [mutableDict setValue:self.payType forKey:kVideoCourseModelPayType];
     return [NSDictionary dictionaryWithDictionary:mutableDict];
 }
 
@@ -160,6 +164,8 @@ NSString *const kVideoCourseModelLessonSubjectName = @"lessonSubjectName";
     self.topFlag = [aDecoder decodeDoubleForKey:kVideoCourseModelTopFlag];
     self.updateTime = [aDecoder decodeObjectForKey:kVideoCourseModelUpdateTime];
     self.lessonSubjectName = [aDecoder decodeObjectForKey:kVideoCourseModelLessonSubjectName];
+    self.payType = [aDecoder decodeObjectForKey:kVideoCourseModelPayType];
+    
     return self;
 }
 
@@ -185,6 +191,7 @@ NSString *const kVideoCourseModelLessonSubjectName = @"lessonSubjectName";
     [aCoder encodeDouble:_topFlag forKey:kVideoCourseModelTopFlag];
     [aCoder encodeObject:_updateTime forKey:kVideoCourseModelUpdateTime];
     [aCoder encodeObject:_lessonSubjectName forKey:kVideoCourseModelLessonSubjectName];
+    [aCoder encodeObject:_payType forKey:kVideoCourseModelPayType];
 }
 
 - (id)copyWithZone:(NSZone *)zone
@@ -212,6 +219,7 @@ NSString *const kVideoCourseModelLessonSubjectName = @"lessonSubjectName";
         copy.topFlag = self.topFlag;
         copy.updateTime = [self.updateTime copyWithZone:zone];
         copy.lessonSubjectName = [self.lessonSubjectName copyWithZone:zone];
+        copy.payType = [self.payType copyWithZone:zone];
     }
     
     return copy;

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/TXClassRoom/View/NewWhiteboard/KSNewWhiteBoard.h

@@ -42,6 +42,7 @@ NS_ASSUME_NONNULL_BEGIN
 - (void)showLoading;
 
 - (void)removeLoadig;
+
 @end
 
 NS_ASSUME_NONNULL_END

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

@@ -25,6 +25,11 @@
 
 #define touchPy 10
 
+#define WHITE_SCRIPT_NAME (@"DAYA")
+#define WHITE_AGENT_NAME (@"DAYAAPPI")
+#define WHITE_AGENT_DOMAIN (@"DAYAAPPSTUDENT")
+
+
 @interface KSNewWhiteBoard ()<WKUIDelegate,WKNavigationDelegate,WKScriptMessageHandler,UIImagePickerControllerDelegate,UINavigationControllerDelegate,TZImagePickerControllerDelegate,UIAlertViewDelegate,UIGestureRecognizerDelegate>
 {
     BOOL _isSelectOriginalPhoto;
@@ -80,7 +85,7 @@
 
 - (void)configUserAgent:(WKWebViewConfiguration *)config {
     NSString *oldUserAgent = config.applicationNameForUserAgent;
-    NSString *newAgent = [NSString stringWithFormat:@"%@ %@ %@",oldUserAgent,AGENT_NAME,AGENT_DOMAIN];
+    NSString *newAgent = [NSString stringWithFormat:@"%@ %@ %@",oldUserAgent,WHITE_AGENT_NAME,WHITE_AGENT_DOMAIN];
     config.applicationNameForUserAgent = newAgent;
 }
 
@@ -125,7 +130,7 @@
     WeakWebViewScriptMessageDelegate *weakScriptMessageDelegate = [[WeakWebViewScriptMessageDelegate alloc] initWithDelegate:self];
     //这个类主要用来做native与JavaScript的交互管理
     WKUserContentController * wkUController = [[WKUserContentController alloc] init];
-    [wkUController addScriptMessageHandler:weakScriptMessageDelegate name:SCRIPT_NAME];
+    [wkUController addScriptMessageHandler:weakScriptMessageDelegate name:WHITE_SCRIPT_NAME];
     config.userContentController = wkUController;
     
     WKPreferences *preferences = [WKPreferences new];
@@ -146,7 +151,6 @@
     return sharedPool;
 }
 
-
 // 调用js方法
 - (void)postMessageJS:(NSDictionary *)jsDict {
     dispatch_async(dispatch_get_main_queue(), ^{
@@ -274,7 +278,7 @@
 #pragma mark - WKScriptMessageHandler
 - (void)userContentController:(WKUserContentController *)userContentController
       didReceiveScriptMessage:(WKScriptMessage *)message {
-    if ([message.name isEqualToString:SCRIPT_NAME]) {
+    if ([message.name isEqualToString:WHITE_SCRIPT_NAME]) {
         NSDictionary *parm = [self convertJsonStringToNSDictionary:message.body];
         // 回到主线程
         dispatch_async(dispatch_get_main_queue(), ^{
@@ -321,7 +325,7 @@
 
 - (void)dealloc {
     NSLog(@"-white board-");
-    [[_myWebView configuration].userContentController removeScriptMessageHandlerForName:SCRIPT_NAME];
+    [[_myWebView configuration].userContentController removeScriptMessageHandlerForName:WHITE_SCRIPT_NAME];
     [_myWebView loadHTMLString:@"" baseURL:nil];
     [_myWebView removeFromSuperview];
     _myWebView = nil;
@@ -637,7 +641,7 @@
 - (void)leaveRoom {
     self.isJoinRoom = NO;
     [self removeLoadig];
-    [[_myWebView configuration].userContentController removeScriptMessageHandlerForName:SCRIPT_NAME];
+    [[_myWebView configuration].userContentController removeScriptMessageHandlerForName:WHITE_SCRIPT_NAME];
     [_myWebView loadHTMLString:@"" baseURL:nil];
     [_myWebView removeFromSuperview];
     

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/configuration/Config-debug.xcconfig

@@ -11,7 +11,7 @@
 REQUEST_DOMAIN = @"test.colexiu.com"
 ACCOMPANY_DOMAIN = @"test.colexiu.com"
 SOCKET_DOMAIN = @"test.colexiu.com/audioAnalysis"
-WHITE_BOARD = @"test.dayaedu.com"
+WHITE_BOARD = @"test.gym.lexiaoya.cn"
 
 JSPUSH_ENVIRONMENT = NO
 SUBMIT_UUID = NO

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/configuration/Config-dev.xcconfig

@@ -11,7 +11,7 @@
 REQUEST_DOMAIN = @"dev.colexiu.com"
 ACCOMPANY_DOMAIN = @"dev.colexiu.com"
 SOCKET_DOMAIN = @"dev.colexiu.com/audioAnalysis"
-WHITE_BOARD = @"test.dayaedu.com"
+WHITE_BOARD = @"dev.gym.lexiaoya.cn"
 
 JSPUSH_ENVIRONMENT = NO
 SUBMIT_UUID = NO

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/configuration/Config-release.xcconfig

@@ -11,7 +11,7 @@
 REQUEST_DOMAIN = @"online.colexiu.com"
 ACCOMPANY_DOMAIN = @"online.colexiu.com"
 SOCKET_DOMAIN = @"online.colexiu.com/audioAnalysis"
-WHITE_BOARD = @"online.dayaedu.com"
+WHITE_BOARD = @"gym.lexiaoya.cn"
 
 JSPUSH_ENVIRONMENT = YES
 SUBMIT_UUID = YES

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/configuration/Config-test.xcconfig

@@ -11,7 +11,7 @@
 REQUEST_DOMAIN = @"test.colexiu.com"
 ACCOMPANY_DOMAIN = @"test.colexiu.com"
 SOCKET_DOMAIN = @"test.colexiu.com/audioAnalysis"
-WHITE_BOARD = @"test.dayaedu.com"
+WHITE_BOARD = @"test.gym.lexiaoya.cn"
 
 JSPUSH_ENVIRONMENT = NO
 SUBMIT_UUID = NO