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