opt: report panel

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-05 16:21:54 +08:00
parent 8236b93717
commit 72dd0b9e81
6 changed files with 151 additions and 109 deletions

View File

@@ -327,32 +327,35 @@ class AuthorPanel extends StatelessWidget {
),
onTap: () {
Get.back();
autoWrapReportDialog(context, ReportOptions.dynamicReport,
(reasonType, reasonDesc, banUid) async {
if (banUid) {
VideoHttp.relationMod(
mid: item.modules.moduleAuthor.mid,
act: 5,
reSrc: 11,
autoWrapReportDialog(
context,
ReportOptions.dynamicReport,
(reasonType, reasonDesc, banUid) async {
if (banUid) {
VideoHttp.relationMod(
mid: item.modules.moduleAuthor.mid,
act: 5,
reSrc: 11,
);
}
final res = await Request().post(
'/x/dynamic/feed/dynamic_report/add',
queryParameters: {
'csrf': await Request.getCsrf(),
},
data: {
"accused_uid": item.modules.moduleAuthor.mid,
"dynamic_id": item.idStr,
"reason_type": reasonType,
"reason_desc": reasonType == 0 ? reasonDesc : null,
},
options: Options(
contentType: Headers.formUrlEncodedContentType,
),
);
}
final res = await Request().post(
'/x/dynamic/feed/dynamic_report/add',
queryParameters: {
'csrf': await Request.getCsrf(),
},
data: {
"accused_uid": item.modules.moduleAuthor.mid,
"dynamic_id": item.idStr,
"reason_type": reasonType,
"reason_desc": reasonType == 0 ? reasonDesc : null,
},
options: Options(
contentType: Headers.formUrlEncodedContentType,
),
);
return res.data as Map;
});
return res.data as Map;
},
);
},
minLeadingWidth: 0,
),