diff --git a/lib/login/login_page.dart b/lib/login/login_page.dart index 490debd7..dd55456d 100644 --- a/lib/login/login_page.dart +++ b/lib/login/login_page.dart @@ -343,7 +343,8 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { EasyLoading.dismiss(); } else { - // SmartDialog.showToast("${value?.msg ??""}", alignment: Alignment.center); + if(value?.msg !=null) + SmartDialog.showToast("${value?.msg ??""}", alignment: Alignment.center); } }); } diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index cc2cfcbc..623d8cb2 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -102,7 +102,7 @@ abstract class MinApiService { } } else if (map["code"] != 0 && response.request.baseUrl == baseUrl) { ///高德地图的poi服务请求不需要toast - SmartDialog.showToast(map["msg"], alignment: Alignment.center); + // SmartDialog.showToast(map["msg"], alignment: Alignment.center); } debugPrint( "======================= Min_响应数据结束 =======================\n"); diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 252cd821..cdc46026 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -130,7 +130,7 @@ abstract class ApiService { } } else if (map["code"] != 0 && response.request.baseUrl == baseUrl) { ///高德地图的poi服务请求不需要toast - SmartDialog.showToast(map["msg"], alignment: Alignment.center); + // SmartDialog.showToast(map["msg"], alignment: Alignment.center); } debugPrint("======================= 响应数据结束 =======================\n"); }, onError: (DioError e) { diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index ac8c7fa4..f161e0ee 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -92,7 +92,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => LoginInfo.fromJson(json), + (json) => json==""?null :LoginInfo.fromJson(json), ); return value; }