mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: 历史记录相关错误
This commit is contained in:
@@ -45,11 +45,15 @@ class ApiInterceptor extends Interceptor {
|
||||
void onError(DioException err, ErrorInterceptorHandler handler) async {
|
||||
// 处理网络请求错误
|
||||
// handler.next(err);
|
||||
SmartDialog.showToast(
|
||||
await dioError(err),
|
||||
displayType: SmartToastType.onlyRefresh,
|
||||
displayTime: const Duration(seconds: 1),
|
||||
);
|
||||
String url = err.requestOptions.uri.toString();
|
||||
print('🌹🌹ApiInterceptor: $url');
|
||||
if (!url.contains('heartbeat')) {
|
||||
SmartDialog.showToast(
|
||||
await dioError(err),
|
||||
displayType: SmartToastType.onlyRefresh,
|
||||
displayTime: const Duration(milliseconds: 1500),
|
||||
);
|
||||
}
|
||||
super.onError(err, handler);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user