fix(profile): 修复我的收藏与观看历史列表不显示

This commit is contained in:
Zhou Weidong authored and trae-solo-agent committed 2026-10-22 13:09:55 +08:00
1 parent f2ae0c70b6
commit a48433f01d
6 files changed
+202 -12

No files matched your search

+2 -4
View File
@@ -29,10 +29,8 @@ class LibraryApi {
'/app/favorites',
query: {'pageIndex': '$pageIndex', 'pageSize': '$pageSize'},
);
if (data is Map<String, dynamic>) {
return PageResult.fromJson(data, Drama.fromCardJson);
}
return const PageResult();
// 线上可能仍返回 List;分页壳与纯数组都要能渲染。
return PageResult.parse(data, Drama.fromCardJson);
}
Future<void> removeFavorite(String dramaId) async {
+2 -4
View File
@@ -49,10 +49,8 @@ class WatchApi {
'/app/watch/recent',
query: {'pageIndex': '$pageIndex', 'pageSize': '$pageSize'},
);
if (data is Map<String, dynamic>) {
return PageResult.fromJson(data, WatchProgress.fromJson);
}
return const PageResult();
// 线上可能仍返回 List;分页壳与纯数组都要能渲染。
return PageResult.parse(data, WatchProgress.fromJson);
}
/// 删除某部剧的观看记录(记录页清单条用)。