feat(player): 点赞与评论改为按集

This commit is contained in:
Zhou Weidong committed 2026-10-21 16:15:29 +08:00
1 parent e6f34977f5
commit 83822a0cbb
25 files changed
+337 -69

No files matched your search

+4 -2
View File
@@ -13,6 +13,7 @@ class CommentApi {
/// 拉取游标分页;`rootId` 用于加载某一楼层的回复。
Future<CommentPage> page({
required String dramaId,
String? episodeId,
String? rootId,
String? cursor,
int size = commentPageSize,
@@ -21,6 +22,7 @@ class CommentApi {
'/app/comments',
query: {
'dramaId': dramaId,
'episodeId': ?episodeId,
'rootId': ?rootId,
'cursor': ?cursor,
'size': '$size',
@@ -31,10 +33,10 @@ class CommentApi {
}
/// 查询单部剧的有效评论总数;后端 Long 兼容数字与字符串。
Future<int> count(String dramaId) async {
Future<int> count(String dramaId, {String? episodeId}) async {
final data = await _client.get(
'/app/comments/count',
query: {'dramaId': dramaId},
query: {'dramaId': dramaId, 'episodeId': ?episodeId},
);
return jsonToInt(data);
}