Compare commits
No commits in common. "9e9528685508ac467ed9fcccb0b649076400b40e" and "85a475b19b06624e262328bd0e82f0360bb00f16" have entirely different histories.
9e95286855
...
85a475b19b
|
|
@ -42,12 +42,6 @@ abstract class RetrofitClient {
|
|||
@Path("roomNum") String roomNum,
|
||||
);
|
||||
|
||||
/// 检验房间是否存在
|
||||
@GET("/room/checkout")
|
||||
Future<BaseStructureResult<bool>> checkout(
|
||||
@Query("roomNum") String roomNum,
|
||||
);
|
||||
|
||||
/// 获取会议室所有用户
|
||||
@GET("/room/user")
|
||||
Future<BaseStructureResult<List<MeetingRoomUser>>> getMeetingRoomAllUser(
|
||||
|
|
|
|||
|
|
@ -87,26 +87,4 @@ class LoginLogic extends GetxController with RequestToolMixin {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// 检验房间
|
||||
Future<void> doHttpCheckMeetingRoom() async {
|
||||
if(state.meetingCodeController.text.isEmpty){
|
||||
ToastUtils.showError("请输入会议号");
|
||||
}else if(state.meetingCodeController.text.length != 8){
|
||||
ToastUtils.showError("请输入正确的会议号");
|
||||
}else if(state.nickNameCodeController.text.isEmpty){
|
||||
ToastUtils.showError("请输入昵称");
|
||||
}else if(state.checkAgreementBool != true){
|
||||
ToastUtils.showError("请阅读并勾选相关协议");
|
||||
}else{
|
||||
BaseStructureResult<bool> res = await getClient().checkout(state.meetingCodeController.text);
|
||||
if (null != res.data) {
|
||||
if(res.data == true){
|
||||
doHttpAnonymousLogin();
|
||||
}else{
|
||||
ToastUtils.showError("房间不存在");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ class _LoginPageState extends State<LoginPage> {
|
|||
if (state.pageState.value == 0) {
|
||||
logic.doHttpLogin();
|
||||
} else {
|
||||
logic.doHttpCheckMeetingRoom();
|
||||
logic.doHttpAnonymousLogin();
|
||||
}
|
||||
},
|
||||
)
|
||||
|
|
|
|||
|
|
@ -55,8 +55,6 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
|||
|
||||
if (isInit == true) {
|
||||
signalRSocket();
|
||||
}else{
|
||||
initRtc();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -99,7 +97,6 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
|||
/// 获取会议室信息
|
||||
void getMeetingRoomInfo(MeetingRoomInfo meetingRoomInfo) async {
|
||||
state.meetingRoomInfo.value = meetingRoomInfo;
|
||||
initRtc();
|
||||
startTime();
|
||||
}
|
||||
|
||||
|
|
@ -640,13 +637,11 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
|||
Future<void> joinMeetingToSocket(bool isAgain) async {
|
||||
await state.hubConnection.value?.invoke("joinChannel",
|
||||
args: [state.roomNumber.value, false, false, false]);
|
||||
mergeFetch(isAgain);
|
||||
/*if(isAgain == false){
|
||||
mergeFetch(isAgain);
|
||||
if(isAgain == false){
|
||||
initRtc(false);
|
||||
}else{
|
||||
mergeFetch(true);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
/// 离开会议室
|
||||
|
|
@ -677,7 +672,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
|||
|
||||
/// ------------------------------------------------------------------------------声网SDK相关
|
||||
/// 初始化声网SDK
|
||||
Future<void> initRtc() async {
|
||||
Future<void> initRtc(bool isAgain) async {
|
||||
// 请求麦克风、摄像头权限
|
||||
PermissionService.requestPermissions();
|
||||
|
||||
|
|
@ -711,6 +706,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
|||
// 成功加入会议室回调
|
||||
onJoinChannelSuccess: (RtcConnection connection, int elapsed) {
|
||||
state.isJoinSuccess.value = true;
|
||||
mergeFetch(isAgain);
|
||||
debugPrint("wgs输出===:RTC-自己加入会议室,ID:${connection.localUid}");
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue