fix error type
This commit is contained in:
parent
3b5c358559
commit
cd10de8e89
|
@ -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 "";
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue