mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: follow dialog
fix: add user tags
This commit is contained in:
@@ -390,6 +390,10 @@ class Api {
|
||||
// 0 添加至默认分组 否则使用,分割tagid
|
||||
static const String addUsers = '/x/relation/tags/addUsers';
|
||||
|
||||
static const String addSpecial = '/x/relation/tag/special/add';
|
||||
|
||||
static const String delSpecial = '/x/relation/tag/special/del';
|
||||
|
||||
// 获取指定分组下的up
|
||||
static const String followUpGroup = '/x/relation/tag';
|
||||
|
||||
|
||||
@@ -210,15 +210,44 @@ class MemberHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future specialAction({
|
||||
int? fid,
|
||||
bool isAdd = true,
|
||||
}) async {
|
||||
var res = await Request().post(
|
||||
isAdd ? Api.addSpecial : Api.delSpecial,
|
||||
data: {
|
||||
'fid': fid,
|
||||
'csrf': await Request.getCsrf(),
|
||||
},
|
||||
options: Options(
|
||||
contentType: Headers.formUrlEncodedContentType,
|
||||
),
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return {'status': true};
|
||||
} else {
|
||||
return {
|
||||
'status': false,
|
||||
'msg': res.data['message'],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// 设置分组
|
||||
static Future addUsers(int? fids, String? tagids) async {
|
||||
var res = await Request().post(Api.addUsers, queryParameters: {
|
||||
'fids': fids,
|
||||
'tagids': tagids ?? '0',
|
||||
'csrf': await Request.getCsrf(),
|
||||
}, data: {
|
||||
'cross_domain': true
|
||||
});
|
||||
var res = await Request().post(
|
||||
Api.addUsers,
|
||||
data: {
|
||||
'fids': fids,
|
||||
'tagids': tagids ?? '0',
|
||||
'csrf': await Request.getCsrf(),
|
||||
// 'cross_domain': true
|
||||
},
|
||||
options: Options(
|
||||
contentType: Headers.formUrlEncodedContentType,
|
||||
),
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return {'status': true, 'data': [], 'msg': '操作成功'};
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user