From 0b99562766ce56b97e9dd9758410b31f435cfba7 Mon Sep 17 00:00:00 2001 From: cuiyouliang <799699717@qq.com> Date: Fri, 29 Aug 2025 16:57:04 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81api=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/api/video_api.dart | 2 +- lib/pages/video/module/attention.dart | 4 ++-- lib/pages/video/module/recommend.dart | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/api/video_api.dart b/lib/api/video_api.dart index 50ea08c..ab1831b 100644 --- a/lib/api/video_api.dart +++ b/lib/api/video_api.dart @@ -8,7 +8,7 @@ class VideoApi { // post static const String myPublicList = '/app/vlog/myPublicList'; // 我发布的视频 static const String myLikedList = '/app/vlog/myLikedList'; // 我点赞的视频 - static const String videoCommentList = '/comment/list'; // 视频评论列表 + static const String videoCommentList = '/app/comment/list'; // 视频评论列表 static const String doVideoComment = '/app/comment/publish'; // 发布评论 static const String reportVideoApi = '/app/feedback/add'; // 投诉视频 diff --git a/lib/pages/video/module/attention.dart b/lib/pages/video/module/attention.dart index 4417eb2..ac48c8f 100644 --- a/lib/pages/video/module/attention.dart +++ b/lib/pages/video/module/attention.dart @@ -726,7 +726,7 @@ class _AttentionModuleState extends State { Future doUnLikeVideo(item) async { logger.d('点击了点赞按钮$item'); try { - final res = await Http.post(VideoApi.unlike, data: {'vlogId': item['id']}); + final res = await Http.post(VideoApi.unlike, data: {'id': item['id']}); final resCode = res['code']; if (resCode == 200) { item['doILikeThisVlog'] = !item['doILikeThisVlog']; @@ -739,7 +739,7 @@ class _AttentionModuleState extends State { // 点击喜欢视频 Future doLikeVideo(item) async { try { - final res = await Http.post(VideoApi.like, data: {'vlogId': item['id']}); + final res = await Http.post(VideoApi.like, data: {'id': item['id']}); final resCode = res['code']; if (resCode == 200) { item['doILikeThisVlog'] = !item['doILikeThisVlog']; diff --git a/lib/pages/video/module/recommend.dart b/lib/pages/video/module/recommend.dart index 782d63d..1f20b69 100644 --- a/lib/pages/video/module/recommend.dart +++ b/lib/pages/video/module/recommend.dart @@ -726,7 +726,7 @@ class _RecommendModuleState extends State { Future doUnLikeVideo(item) async { logger.d('点击了点赞按钮$item'); try { - final res = await Http.post(VideoApi.unlike, data: {'vlogId': item['id']}); + final res = await Http.post(VideoApi.unlike, data: {'id': item['id']}); final resCode = res['code']; if (resCode == 200) { item['doILikeThisVlog'] = !item['doILikeThisVlog']; @@ -739,7 +739,7 @@ class _RecommendModuleState extends State { // 点击喜欢视频 Future doLikeVideo(item) async { try { - final res = await Http.post(VideoApi.like, data: {'vlogId': item['id']}); + final res = await Http.post(VideoApi.like, data: {'id': item['id']}); final resCode = res['code']; if (resCode == 200) { item['doILikeThisVlog'] = !item['doILikeThisVlog'];