Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/UserAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,18 @@ export class PostForm extends Component {
on_submit(event) {
if (event) event.preventDefault();
if (this.state.loading_status === 'loading') return;
if (this.state.text.includes('自杀')) {
const msg = [
'您提到了「自杀」\n',
'需要帮助?',
'北京24小时心理援助热线:010-8295-1332',
'希望24小时热线:400-161-9995',
'你不孤单,我们都在。\n',
'确认将继续发表'
]
const result = confirm(msg.join('\n'))
if (result !== true) return
}
if (this.img_ref.current.files.length) {
this.setState({
loading_status: 'processing',
Expand Down