mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: dynamic panel (#738)
This commit is contained in:
committed by
GitHub
parent
7bb0307e6a
commit
e0fe16fd14
@@ -775,4 +775,6 @@ class Api {
|
||||
'${HttpString.appBaseUrl}/x/v2/search/recommend';
|
||||
|
||||
static const String articleInfo = '/x/article/viewinfo';
|
||||
|
||||
static const String dynamicReport = '/x/dynamic/feed/dynamic_report/add';
|
||||
}
|
||||
|
||||
@@ -666,4 +666,28 @@ class UserHttp {
|
||||
return {'status': false, 'msg': res.data['message']};
|
||||
}
|
||||
}
|
||||
|
||||
static Future<Map> dynamicReport({
|
||||
required dynamic mid,
|
||||
required dynamic dynId,
|
||||
required int reasonType,
|
||||
String? reasonDesc,
|
||||
}) async {
|
||||
final res = await Request().post(
|
||||
Api.dynamicReport,
|
||||
queryParameters: {
|
||||
'csrf': Accounts.main.csrf,
|
||||
},
|
||||
data: {
|
||||
"accused_uid": mid,
|
||||
"dynamic_id": dynId,
|
||||
"reason_type": reasonType,
|
||||
"reason_desc": reasonType == 0 ? reasonDesc : null,
|
||||
},
|
||||
options: Options(
|
||||
contentType: Headers.formUrlEncodedContentType,
|
||||
),
|
||||
);
|
||||
return res.data as Map;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user