mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 00:28:18 +08:00
fix: report
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import 'package:PiliPlus/common/widgets/radio_widget.dart';
|
import 'package:PiliPlus/common/widgets/radio_widget.dart';
|
||||||
import 'package:PiliPlus/utils/extension.dart';
|
import 'package:PiliPlus/utils/extension.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -124,11 +125,12 @@ Future<void> autoWrapReportDialog(
|
|||||||
Get.back();
|
Get.back();
|
||||||
SmartDialog.showToast('举报成功');
|
SmartDialog.showToast('举报成功');
|
||||||
} else {
|
} else {
|
||||||
SmartDialog.showToast(data['message']);
|
SmartDialog.showToast(data['message'].toString());
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
SmartDialog.dismiss();
|
SmartDialog.dismiss();
|
||||||
SmartDialog.showToast('提交失败:$e');
|
SmartDialog.showToast('提交失败:$e');
|
||||||
|
if (kDebugMode) rethrow;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: const Text('确定'),
|
child: const Text('确定'),
|
||||||
|
|||||||
@@ -125,27 +125,18 @@ abstract final class DanmakuHttp {
|
|||||||
data: data,
|
data: data,
|
||||||
options: Options(contentType: Headers.formUrlEncodedContentType),
|
options: Options(contentType: Headers.formUrlEncodedContentType),
|
||||||
);
|
);
|
||||||
if (res.data['code'] == 0) {
|
return res.data as Map<String, dynamic>;
|
||||||
return {
|
|
||||||
'status': true,
|
|
||||||
'data': res.data['data']['block'],
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
return {
|
|
||||||
'status': false,
|
|
||||||
'msg': res.data['message'],
|
|
||||||
};
|
|
||||||
|
|
||||||
/// {
|
/// res.data['data']['block']
|
||||||
/// 0: "举报已提交",
|
/// {
|
||||||
/// "-1": "举报失败,请先激活账号。",
|
/// 0: "举报已提交",
|
||||||
/// "-2": "举报失败,系统拒绝受理您的举报请求。",
|
/// "-1": "举报失败,请先激活账号。",
|
||||||
/// "-3": "举报失败,您已经被禁言。",
|
/// "-2": "举报失败,系统拒绝受理您的举报请求。",
|
||||||
/// "-4": "您的操作过于频繁,请稍后再试。",
|
/// "-3": "举报失败,您已经被禁言。",
|
||||||
/// "-5": "您已经举报过这条弹幕了。",
|
/// "-4": "您的操作过于频繁,请稍后再试。",
|
||||||
/// "-6": "举报失败,系统错误。"
|
/// "-5": "您已经举报过这条弹幕了。",
|
||||||
/// }
|
/// "-6": "举报失败,系统错误。"
|
||||||
}
|
/// }
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<LoadingState<String?>> danmakuRecall({
|
static Future<LoadingState<String?>> danmakuRecall({
|
||||||
|
|||||||
Reference in New Issue
Block a user