mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: request onerror
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -44,12 +44,13 @@ class ApiInterceptor extends Interceptor {
|
||||
// handler.next(err);
|
||||
String url = err.requestOptions.uri.toString();
|
||||
debugPrint('🌹🌹ApiInterceptor: $url');
|
||||
// 屏蔽弹幕、心跳、人数请求的错误提示
|
||||
if (!url.contains('heartbeat') &&
|
||||
!url.contains('seg.so') &&
|
||||
!url.contains('online/total') &&
|
||||
!url.contains('github') &&
|
||||
(!url.contains('skipSegments') && err.requestOptions.method != 'GET')) {
|
||||
if (url.contains('heartbeat') ||
|
||||
url.contains('seg.so') ||
|
||||
url.contains('online/total') ||
|
||||
url.contains('github') ||
|
||||
(url.contains('skipSegments') && err.requestOptions.method == 'GET')) {
|
||||
// skip
|
||||
} else {
|
||||
SmartDialog.showToast(
|
||||
await dioError(err) + url,
|
||||
displayType: SmartToastType.onlyRefresh,
|
||||
|
||||
Reference in New Issue
Block a user