From c4502ae140d0e679e434466b1d79c1d09bbb54af Mon Sep 17 00:00:00 2001 From: "1147192855@qq.com" <1147192855@qq.com> Date: Wed, 3 Apr 2024 11:04:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=99=BB=E5=BD=95=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common/request/rest_dio.dart | 3 +-- lib/page/login_page/login_logic.dart | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/common/request/rest_dio.dart b/lib/common/request/rest_dio.dart index 5c816e3..4216de1 100644 --- a/lib/common/request/rest_dio.dart +++ b/lib/common/request/rest_dio.dart @@ -152,8 +152,7 @@ class TheError extends Interceptor { var errorMap = response.data; // var runtimeType = errorMap.runtimeType; - // print(runtimeType); - if ((errorMap is Map || errorMap is Object) && errorMap['error'] != null) { + if (errorMap is Map && errorMap['error'] != null) { message = errorMap['error']?['message'] ?? '请求错误,请重试'; } else { if (statusCode != null) { diff --git a/lib/page/login_page/login_logic.dart b/lib/page/login_page/login_logic.dart index 77f0264..f40cab3 100644 --- a/lib/page/login_page/login_logic.dart +++ b/lib/page/login_page/login_logic.dart @@ -104,6 +104,7 @@ class LoginLogic extends GetxController with RequestToolMixin { // FastData.getInstance().cleanShared(); // return toMsg(msg ?? '登录失败,请重试'); } finally { + state.canLogin.value = true; // EasyLoading.dismiss(); } }