1、api替换

This commit is contained in:
cuiyouliang 2025-08-29 16:57:04 +08:00
parent 96ae486772
commit 0b99562766
3 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ class VideoApi {
// post // post
static const String myPublicList = '/app/vlog/myPublicList'; // static const String myPublicList = '/app/vlog/myPublicList'; //
static const String myLikedList = '/app/vlog/myLikedList'; // 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 doVideoComment = '/app/comment/publish'; //
static const String reportVideoApi = '/app/feedback/add'; // static const String reportVideoApi = '/app/feedback/add'; //

View File

@ -726,7 +726,7 @@ class _AttentionModuleState extends State<AttentionModule> {
Future<void> doUnLikeVideo(item) async { Future<void> doUnLikeVideo(item) async {
logger.d('点击了点赞按钮$item'); logger.d('点击了点赞按钮$item');
try { 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']; final resCode = res['code'];
if (resCode == 200) { if (resCode == 200) {
item['doILikeThisVlog'] = !item['doILikeThisVlog']; item['doILikeThisVlog'] = !item['doILikeThisVlog'];
@ -739,7 +739,7 @@ class _AttentionModuleState extends State<AttentionModule> {
// //
Future<void> doLikeVideo(item) async { Future<void> doLikeVideo(item) async {
try { 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']; final resCode = res['code'];
if (resCode == 200) { if (resCode == 200) {
item['doILikeThisVlog'] = !item['doILikeThisVlog']; item['doILikeThisVlog'] = !item['doILikeThisVlog'];

View File

@ -726,7 +726,7 @@ class _RecommendModuleState extends State<RecommendModule> {
Future<void> doUnLikeVideo(item) async { Future<void> doUnLikeVideo(item) async {
logger.d('点击了点赞按钮$item'); logger.d('点击了点赞按钮$item');
try { 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']; final resCode = res['code'];
if (resCode == 200) { if (resCode == 200) {
item['doILikeThisVlog'] = !item['doILikeThisVlog']; item['doILikeThisVlog'] = !item['doILikeThisVlog'];
@ -739,7 +739,7 @@ class _RecommendModuleState extends State<RecommendModule> {
// //
Future<void> doLikeVideo(item) async { Future<void> doLikeVideo(item) async {
try { 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']; final resCode = res['code'];
if (resCode == 200) { if (resCode == 200) {
item['doILikeThisVlog'] = !item['doILikeThisVlog']; item['doILikeThisVlog'] = !item['doILikeThisVlog'];