From 4fd5ecda7e3f994763b865081065621cd8fb2814 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Thu, 11 Nov 2021 15:57:14 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=99=BB=E9=99=86=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/login/login_page.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/login/login_page.dart b/lib/login/login_page.dart index 280d79fb..d4c9503a 100644 --- a/lib/login/login_page.dart +++ b/lib/login/login_page.dart @@ -68,8 +68,7 @@ class _MyLoginPageState extends State 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 with TickerProviderStateMixin { print(error); SmartDialog.showToast("$error", alignment: Alignment.center); }); - Future.delayed(Duration(seconds: 2), () { - EasyLoading.dismiss(); + EasyLoading.show(status: S.of(context).zhengzaijiazai); + Future.delayed(Duration(seconds:2), () { if (value !=null && value.isSuccess) { saveUserJson(value.data); eventBus.fire(EventType(3)); @@ -311,6 +310,8 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { '/router/main_page', (route) => false, ); + EasyLoading.dismiss(); + } else { SmartDialog.showToast("${value.msg}", alignment: Alignment.center); }