Bläddra i källkod

网络教室同步数据

Steven 2 år sedan
förälder
incheckning
e368a4781a

+ 7 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m

@@ -1555,6 +1555,7 @@
     NSString *url = [NSString stringWithFormat:@"%@%@", SEALCLASSHOST, @"/room/join"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:roomId forKey:@"roomId"];
+    [parm setValue:@"STUDENT" forKey:@"clientType"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 // /room/joinRoomFailure
@@ -1569,6 +1570,7 @@
     NSString *url = [NSString stringWithFormat:@"%@%@", SEALCLASSHOST, @"/room/joinRoomFailure"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:roomId forKey:@"roomId"];
+    [parm setValue:@"STUDENT" forKey:@"clientType"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 
@@ -1584,6 +1586,7 @@
     NSString *url = [NSString stringWithFormat:@"%@%@", SEALCLASSHOST, @"/room/leave"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:roomId forKey:@"roomId"];
+    [parm setValue:@"STUDENT" forKey:@"clientType"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 
@@ -1601,6 +1604,7 @@
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:roomId forKey:@"roomId"];
     [parm setValue:deviceType forKey:@"deviceType"];
+    [parm setValue:@"STUDENT" forKey:@"clientType"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 
@@ -1618,6 +1622,7 @@
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:roomId forKey:@"roomId"];
     [parm setValue:deviceType forKey:@"deviceType"];
+    [parm setValue:@"STUDENT" forKey:@"clientType"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 
@@ -1637,6 +1642,7 @@
     [parm setValue:roomId forKey:@"roomId"];
     [parm setValue:status forKey:@"status"];
     [parm setValue:accompanimentId forKey:@"accompanimentId"];
+    [parm setValue:@"STUDENT" forKey:@"clientType"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 
@@ -1656,6 +1662,7 @@
     [parm setValue:roomId forKey:@"roomId"];
     [parm setValue:deviceType forKey:@"deviceType"];
     [parm setValue:@(enable) forKey:@"enable"];
+    [parm setValue:@"STUDENT" forKey:@"clientType"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Model/RoomMember.m

@@ -13,7 +13,7 @@
 + (instancetype)memberFromJson:(NSDictionary *)dic {
     RoomMember *member = [[RoomMember alloc] init];
     member.headUrl = [dic stringValueForKey:@"avatar"];
-    member.userId = [dic stringValueForKey:@"userId"];
+    member.userId = [dic stringValueForKey:@"imUserId"];
     member.name = [dic stringValueForKey:@"username"];
     member.joinTime = [dic longlongValueForKey:@"joinTime"];
     member.role = [dic integerValueForKey:@"role"];