feat: 按照黑名单对搜索结果进行屏蔽

This commit is contained in:
guozhigq
2023-09-27 23:24:55 +08:00
parent 6b3773a074
commit 9a0c9f4021
4 changed files with 67 additions and 2 deletions

View File

@ -95,4 +95,43 @@ class MemberController extends GetxController {
},
);
}
// 拉黑用户
Future blockUser(int mid) async {
if (userInfoCache.get('userInfoCache') == null) {
SmartDialog.showToast('账号未登录');
return;
}
SmartDialog.show(
useSystem: true,
animationType: SmartAnimationType.centerFade_otherSlide,
builder: (BuildContext context) {
return AlertDialog(
title: const Text('提示'),
content: const Text('确定拉黑UP主?'),
actions: [
TextButton(
onPressed: () => SmartDialog.dismiss(),
child: Text(
'点错了',
style: TextStyle(color: Theme.of(context).colorScheme.outline),
),
),
TextButton(
onPressed: () async {
var res = await VideoHttp.relationMod(
mid: mid,
act: 5,
reSrc: 11,
);
SmartDialog.dismiss();
if (res['status']) {}
},
child: const Text('确认'),
)
],
);
},
);
}
}