fix: 历史记录相关错误
This commit is contained in:
@ -45,10 +45,14 @@ class ApiInterceptor extends Interceptor {
|
|||||||
void onError(DioException err, ErrorInterceptorHandler handler) async {
|
void onError(DioException err, ErrorInterceptorHandler handler) async {
|
||||||
// 处理网络请求错误
|
// 处理网络请求错误
|
||||||
// handler.next(err);
|
// handler.next(err);
|
||||||
|
String url = err.requestOptions.uri.toString();
|
||||||
|
print('🌹🌹ApiInterceptor: $url');
|
||||||
|
if (!url.contains('heartBeat')) {
|
||||||
SmartDialog.showToast(
|
SmartDialog.showToast(
|
||||||
await dioError(err),
|
await dioError(err),
|
||||||
displayType: SmartToastType.onlyRefresh,
|
displayType: SmartToastType.onlyRefresh,
|
||||||
);
|
);
|
||||||
|
}
|
||||||
super.onError(err, handler);
|
super.onError(err, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,9 +88,11 @@ class HistoryController extends GetxController {
|
|||||||
// 观看历史暂停状态
|
// 观看历史暂停状态
|
||||||
Future historyStatus() async {
|
Future historyStatus() async {
|
||||||
var res = await UserHttp.historyStatus();
|
var res = await UserHttp.historyStatus();
|
||||||
|
if (res.data['code'] == 0) {
|
||||||
pauseStatus.value = res.data['data'];
|
pauseStatus.value = res.data['data'];
|
||||||
localCache.put(LocalCacheKey.historyPause, res.data['data']);
|
localCache.put(LocalCacheKey.historyPause, res.data['data']);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 清空观看历史
|
// 清空观看历史
|
||||||
Future onClearHistory() async {
|
Future onClearHistory() async {
|
||||||
|
Reference in New Issue
Block a user