举报时手动选择是否隐藏

This commit is contained in:
2022-07-21 14:06:18 +08:00
parent efa94e45f9
commit d842a5205b
3 changed files with 11 additions and 6 deletions

View File

@@ -550,8 +550,9 @@ class FlowSidebar extends PureComponent {
report(event, text = '') {
console.log(text);
let reason = prompt(`举报 #${this.state.info.pid} 的理由:`, text);
let should_hide = confirm('是否认为此洞应该被删除或隐藏?');
if (reason !== null) {
API.report(this.state.info.pid, reason, this.props.token)
API.report(this.state.info.pid, reason, should_hide, this.props.token)
.then((json) => {
alert('举报成功');
})