|
|
@ -12,7 +12,9 @@ import 'package:get/get.dart'; |
|
|
|
import 'package:huixiang/data/base_data.dart'; |
|
|
|
import 'package:huixiang/data/base_data.dart'; |
|
|
|
import 'package:huixiang/data/channels.dart'; |
|
|
|
import 'package:huixiang/data/channels.dart'; |
|
|
|
import 'package:huixiang/data/examine_instance.dart'; |
|
|
|
import 'package:huixiang/data/examine_instance.dart'; |
|
|
|
|
|
|
|
import 'package:huixiang/data/login_info.dart'; |
|
|
|
import 'package:huixiang/data/user_entity.dart'; |
|
|
|
import 'package:huixiang/data/user_entity.dart'; |
|
|
|
|
|
|
|
import 'package:huixiang/data/user_info.dart'; |
|
|
|
import 'package:huixiang/generated/l10n.dart'; |
|
|
|
import 'package:huixiang/generated/l10n.dart'; |
|
|
|
import 'package:huixiang/main.dart'; |
|
|
|
import 'package:huixiang/main.dart'; |
|
|
|
import 'package:huixiang/retrofit/retrofit_api.dart'; |
|
|
|
import 'package:huixiang/retrofit/retrofit_api.dart'; |
|
|
@ -212,27 +214,24 @@ class _NewLoginPage extends State<NewLoginPage> { |
|
|
|
SmartDialog.showLoading( |
|
|
|
SmartDialog.showLoading( |
|
|
|
msg: S.of(context).zhengzaijiazai, |
|
|
|
msg: S.of(context).zhengzaijiazai, |
|
|
|
); |
|
|
|
); |
|
|
|
BaseData? value = await apiService?.memberLogin(param).catchError((error) { |
|
|
|
BaseData<LoginInfo>? value = await apiService?.memberLogin(param).catchError((error) { |
|
|
|
return BaseData()..isSuccess = false; |
|
|
|
return BaseData<LoginInfo>()..isSuccess = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
// SmartDialog.showLoading(msg: S.of(context).zhengzaijiazai); |
|
|
|
// SmartDialog.showLoading(msg: S.of(context).zhengzaijiazai); |
|
|
|
if (value?.isSuccess ?? false) { |
|
|
|
if (value?.isSuccess ?? false) { |
|
|
|
var userInfo = value!.data; |
|
|
|
var userInfo = value!.data; |
|
|
|
ExamineInstance.instance.isExamine = userInfo.authInfo?.account == "13800138000"; |
|
|
|
ExamineInstance.instance.isExamine = userInfo?.authInfo?.account == "13800138000"; |
|
|
|
saveUserJson(userInfo.authInfo?.toJson()); |
|
|
|
saveUserJson(userInfo?.authInfo?.toJson()); |
|
|
|
eventBus.fire(EventType(3)); |
|
|
|
eventBus.fire(EventType(3)); |
|
|
|
|
|
|
|
|
|
|
|
Navigator.of(context).pushNamedAndRemoveUntil( |
|
|
|
Navigator.of(context).pushNamedAndRemoveUntil( |
|
|
|
'/router/main_page', (route) => false, |
|
|
|
'/router/main_page', (route) => false, |
|
|
|
arguments: { |
|
|
|
arguments: { |
|
|
|
"invite": invite, |
|
|
|
"invite": invite, |
|
|
|
"interviewCouponList": userInfo.interviewCouponList, |
|
|
|
"interviewCouponList": userInfo?.interviewCouponList, |
|
|
|
"firstLoginCouponList": userInfo.firstLoginCouponList |
|
|
|
"firstLoginCouponList": userInfo?.firstLoginCouponList |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
|
|
|
|
SmartDialog.showToast("${value?.msg}", alignment: Alignment.center); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
SmartDialog.dismiss(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
saveUserJson(userJson) { |
|
|
|
saveUserJson(userJson) { |
|
|
@ -738,7 +737,6 @@ class _NewLoginPage extends State<NewLoginPage> { |
|
|
|
), |
|
|
|
), |
|
|
|
GestureDetector( |
|
|
|
GestureDetector( |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
print("11111"); |
|
|
|
|
|
|
|
// if (widget.arguments != null) { |
|
|
|
// if (widget.arguments != null) { |
|
|
|
// Navigator.of(context).pop(); |
|
|
|
// Navigator.of(context).pop(); |
|
|
|
// } else { |
|
|
|
// } else { |
|
|
|