feat: 黑名单查看、屏蔽黑名单用户推荐/最热 #22
This commit is contained in:
26
lib/http/black.dart
Normal file
26
lib/http/black.dart
Normal file
@ -0,0 +1,26 @@
|
||||
import 'package:pilipala/http/index.dart';
|
||||
import 'package:pilipala/models/user/black.dart';
|
||||
|
||||
class BlackHttp {
|
||||
static Future blackList({required int pn, int? ps}) async {
|
||||
var res = await Request().get(Api.blackLst, data: {
|
||||
'pn': pn,
|
||||
'ps': ps ?? 50,
|
||||
're_version': 0,
|
||||
'jsonp': 'jsonp',
|
||||
'csrf': await Request.getCsrf(),
|
||||
});
|
||||
if (res.data['code'] == 0) {
|
||||
return {
|
||||
'status': true,
|
||||
'data': BlackListDataModel.fromJson(res.data['data'])
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
'status': false,
|
||||
'data': [],
|
||||
'msg': res.data['message'],
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user