alroyso 1 year ago
parent
commit
56ce18e8ae
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/app/network/dio_client.dart

+ 1 - 1
lib/app/network/dio_client.dart

@@ -113,7 +113,7 @@ class CustomInterceptors extends Interceptor {
       // 无网络连接,设置友好的错误消息
       err.error = AppException(message: "当前网络不可用,请检查您的网络");
       return handler.next(err);
-    } else if (err.error is SocketException || err.type == DioErrorType.connectTimeout || err.type == DioErrorType.sendTimeout || err.type == DioErrorType.receiveTimeout) {
+    } else if (err.error is SocketException || err.type == DioErrorType.other || err.type == DioErrorType.connectTimeout || err.type == DioErrorType.sendTimeout || err.type == DioErrorType.receiveTimeout) {
       LogHelper().d("错误类型:==== ${err.type}");
       if (_retryCount < _backupUrls.length) {
         // 有网络连接但请求失败,尝试使用备用地址