mod: dynamic panel (#738)

This commit is contained in:
My-Responsitories
2025-04-23 16:01:09 +08:00
committed by GitHub
parent 7bb0307e6a
commit e0fe16fd14
6 changed files with 286 additions and 276 deletions

View File

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

View File

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