Browse Source

Merge remote-tracking branch 'origin/dev' into remove_uniapp

ff_new
fmk 3 years ago
parent
commit
8d407f9a7f
  1. 7
      lib/login/login_page.dart

7
lib/login/login_page.dart

@ -68,8 +68,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
sharedPreferences.getString("token") != null &&
sharedPreferences.getString("token") != "") {
Navigator.of(context).popAndPushNamed('/router/main_page');
} else {
initController();
} else {initController();
client = ApiService(Dio(), context: context);
isShowLogin = true;
@ -301,8 +300,8 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
print(error);
SmartDialog.showToast("$error", alignment: Alignment.center);
});
EasyLoading.show(status: S.of(context).zhengzaijiazai);
Future.delayed(Duration(seconds:2), () {
EasyLoading.dismiss();
if (value !=null && value.isSuccess) {
saveUserJson(value.data);
eventBus.fire(EventType(3));
@ -311,6 +310,8 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
'/router/main_page',
(route) => false,
);
EasyLoading.dismiss();
} else {
SmartDialog.showToast("${value.msg}", alignment: Alignment.center);
}

Loading…
Cancel
Save