opt: follow dialog

fix: add user tags
This commit is contained in:
bggRGjQaUbCoE
2024-10-08 10:35:55 +08:00
parent 5d0e4ed441
commit e6b71d375f
5 changed files with 313 additions and 109 deletions

View File

@@ -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';

View File

@@ -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 {