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_NETWORK = "NETWORK_ERROR";
|
||||||
const ERROR_TYPE_PERMISSION = "PERMISSION_ERROR";
|
const ERROR_TYPE_PERMISSION = "PERMISSION_ERROR";
|
||||||
const ERROR_TYPE_TIME = "TIME_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) {
|
String errorType(String error) {
|
||||||
|
@ -21,8 +21,8 @@ String errorType(String error) {
|
||||||
if (error.contains("time is not synchronize")) {
|
if (error.contains("time is not synchronize")) {
|
||||||
return ERROR_TYPE_TIME;
|
return ERROR_TYPE_TIME;
|
||||||
}
|
}
|
||||||
if (error.contains("under view")) {
|
if (error.contains("under review")) {
|
||||||
return ERROR_TYPE_UNDER_VIEW;
|
return ERROR_TYPE_UNDER_REVIEW;
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ class ContentError extends StatelessWidget {
|
||||||
case ERROR_TYPE_TIME:
|
case ERROR_TYPE_TIME:
|
||||||
message = "请检查设备时间";
|
message = "请检查设备时间";
|
||||||
break;
|
break;
|
||||||
case ERROR_TYPE_UNDER_VIEW:
|
case ERROR_TYPE_UNDER_REVIEW:
|
||||||
message = "资源未审核或不可用";
|
message = "资源未审核或不可用";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue