mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: report
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:PiliPlus/common/widgets/radio_widget.dart';
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -124,11 +125,12 @@ Future<void> autoWrapReportDialog(
|
||||
Get.back();
|
||||
SmartDialog.showToast('举报成功');
|
||||
} else {
|
||||
SmartDialog.showToast(data['message']);
|
||||
SmartDialog.showToast(data['message'].toString());
|
||||
}
|
||||
} catch (e) {
|
||||
SmartDialog.dismiss();
|
||||
SmartDialog.showToast('提交失败:$e');
|
||||
if (kDebugMode) rethrow;
|
||||
}
|
||||
},
|
||||
child: const Text('确定'),
|
||||
|
||||
@@ -125,17 +125,9 @@ abstract final class DanmakuHttp {
|
||||
data: data,
|
||||
options: Options(contentType: Headers.formUrlEncodedContentType),
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return {
|
||||
'status': true,
|
||||
'data': res.data['data']['block'],
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
'status': false,
|
||||
'msg': res.data['message'],
|
||||
};
|
||||
return res.data as Map<String, dynamic>;
|
||||
|
||||
/// res.data['data']['block']
|
||||
/// {
|
||||
/// 0: "举报已提交",
|
||||
/// "-1": "举报失败,请先激活账号。",
|
||||
@@ -146,7 +138,6 @@ abstract final class DanmakuHttp {
|
||||
/// "-6": "举报失败,系统错误。"
|
||||
/// }
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<String?>> danmakuRecall({
|
||||
required int cid,
|
||||
|
||||
Reference in New Issue
Block a user