登录/加入会议接口调用弹窗优化
This commit is contained in:
parent
1cabad280c
commit
7135b7767e
|
|
@ -46,8 +46,6 @@ class LoginLogic extends GetxController with RequestToolMixin {
|
||||||
}else if(state.checkAgreementBool.value != true){
|
}else if(state.checkAgreementBool.value != true){
|
||||||
ToastUtils.showError("请阅读并勾选相关协议");
|
ToastUtils.showError("请阅读并勾选相关协议");
|
||||||
}else{
|
}else{
|
||||||
try{
|
|
||||||
ToastUtils.showLoading();
|
|
||||||
BaseStructureResult<UserInfoEntity> res = await getClient().login(state.userNameController.text, md5.convert(utf8.encode(state.passwordController.text)).toString());
|
BaseStructureResult<UserInfoEntity> res = await getClient().login(state.userNameController.text, md5.convert(utf8.encode(state.passwordController.text)).toString());
|
||||||
if (null != res.data) {
|
if (null != res.data) {
|
||||||
UserStore.to.setToken(res.data!.token);
|
UserStore.to.setToken(res.data!.token);
|
||||||
|
|
@ -55,9 +53,6 @@ class LoginLogic extends GetxController with RequestToolMixin {
|
||||||
// Get.toNamed(Routes.startPage);
|
// Get.toNamed(Routes.startPage);
|
||||||
Get.offAllNamed(Routes.startPage);
|
Get.offAllNamed(Routes.startPage);
|
||||||
}
|
}
|
||||||
}finally{
|
|
||||||
ToastUtils.dismiss();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -72,8 +67,6 @@ class LoginLogic extends GetxController with RequestToolMixin {
|
||||||
}else if(state.checkAgreementBool != true){
|
}else if(state.checkAgreementBool != true){
|
||||||
ToastUtils.showError("请阅读并勾选相关协议");
|
ToastUtils.showError("请阅读并勾选相关协议");
|
||||||
}else{
|
}else{
|
||||||
try{
|
|
||||||
ToastUtils.showLoading();
|
|
||||||
BaseStructureResult<UserInfoEntity> res = await getClient().anonLogin(await DeviceInfo.getDeviceId(),state.nickNameCodeController.text, state.meetingCodeController.text);
|
BaseStructureResult<UserInfoEntity> res = await getClient().anonLogin(await DeviceInfo.getDeviceId(),state.nickNameCodeController.text, state.meetingCodeController.text);
|
||||||
if (null != res.data) {
|
if (null != res.data) {
|
||||||
UserStore.to.setToken(res.data!.token);
|
UserStore.to.setToken(res.data!.token);
|
||||||
|
|
@ -81,9 +74,6 @@ class LoginLogic extends GetxController with RequestToolMixin {
|
||||||
// Get.toNamed(Routes.meetingMainPage, arguments: {"roomNumber": state.meetingCodeController.text});
|
// Get.toNamed(Routes.meetingMainPage, arguments: {"roomNumber": state.meetingCodeController.text});
|
||||||
Get.offAllNamed(Routes.startPage, arguments: {"roomNumber": state.meetingCodeController.text});
|
Get.offAllNamed(Routes.startPage, arguments: {"roomNumber": state.meetingCodeController.text});
|
||||||
}
|
}
|
||||||
}finally{
|
|
||||||
ToastUtils.dismiss();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ class UserPageState extends State<UserPage> {
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text(
|
child: Text(
|
||||||
UserStore.to.userInfoEntity.value!.userName.length >= 3
|
UserStore.to.userInfoEntity.value!.userName.length >= 3
|
||||||
? UserStore.to.userInfoEntity.value!.userName.substring(1,UserStore.to.userInfoEntity.value!.userName.length)
|
? UserStore.to.userInfoEntity.value!.userName.substring(UserStore.to.userInfoEntity.value!.userName.length - 2,UserStore.to.userInfoEntity.value!.userName.length)
|
||||||
: UserStore.to.userInfoEntity.value!.userName,
|
: UserStore.to.userInfoEntity.value!.userName,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 30.sp,
|
fontSize: 30.sp,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue