mod: 点赞接口登录拦截

This commit is contained in:
guozhigq
2024-02-03 00:53:18 +08:00
parent 18bb58d293
commit 6a844da259

View File

@ -210,6 +210,10 @@ class VideoIntroController extends GetxController {
// (取消)点赞
Future actionLikeVideo() async {
if (userInfo == null) {
SmartDialog.showToast('账号未登录');
return;
}
var result = await VideoHttp.likeVideo(bvid: bvid, type: !hasLike.value);
if (result['status']) {
// hasLike.value = result["data"] == 1 ? true : false;