1、api替换
This commit is contained in:
parent
96ae486772
commit
0b99562766
@ -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'; // 投诉视频
|
||||
|
||||
|
@ -726,7 +726,7 @@ class _AttentionModuleState extends State<AttentionModule> {
|
||||
Future<void> 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<AttentionModule> {
|
||||
// 点击喜欢视频
|
||||
Future<void> 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'];
|
||||
|
@ -726,7 +726,7 @@ class _RecommendModuleState extends State<RecommendModule> {
|
||||
Future<void> 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<RecommendModule> {
|
||||
// 点击喜欢视频
|
||||
Future<void> 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'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user