From cd10de8e8985e21864247b48f4c4b6f9f80641de Mon Sep 17 00:00:00 2001 From: niuhuan Date: Wed, 27 Oct 2021 16:29:19 +0800 Subject: [PATCH] fix error type --- lib/basic/enum/ErrorTypes.dart | 6 +++--- lib/screens/components/ContentError.dart | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/basic/enum/ErrorTypes.dart b/lib/basic/enum/ErrorTypes.dart index 3b43a3a..07055ac 100644 --- a/lib/basic/enum/ErrorTypes.dart +++ b/lib/basic/enum/ErrorTypes.dart @@ -1,7 +1,7 @@ const ERROR_TYPE_NETWORK = "NETWORK_ERROR"; const ERROR_TYPE_PERMISSION = "PERMISSION_ERROR"; const ERROR_TYPE_TIME = "TIME_ERROR"; -const ERROR_TYPE_UNDER_VIEW = "UNDER_VIEW_ERROR"; +const ERROR_TYPE_UNDER_REVIEW = "UNDER_VIEW_ERROR"; // 错误的类型, 方便照展示和谐的提示 String errorType(String error) { @@ -21,8 +21,8 @@ String errorType(String error) { if (error.contains("time is not synchronize")) { return ERROR_TYPE_TIME; } - if (error.contains("under view")) { - return ERROR_TYPE_UNDER_VIEW; + if (error.contains("under review")) { + return ERROR_TYPE_UNDER_REVIEW; } return ""; } diff --git a/lib/screens/components/ContentError.dart b/lib/screens/components/ContentError.dart index be5e6be..c5ec2b5 100644 --- a/lib/screens/components/ContentError.dart +++ b/lib/screens/components/ContentError.dart @@ -30,7 +30,7 @@ class ContentError extends StatelessWidget { case ERROR_TYPE_TIME: message = "请检查设备时间"; break; - case ERROR_TYPE_UNDER_VIEW: + case ERROR_TYPE_UNDER_REVIEW: message = "资源未审核或不可用"; break; default: