修改评论

This commit is contained in:
sylor_huang@126.com 2020-06-05 17:52:53 +08:00
parent cebc85436e
commit 7ffbec5d2f
1 changed files with 22 additions and 9 deletions

View File

@ -105,11 +105,16 @@ class comments extends Component {
});
};
add_reply = (id) => {
this.setState({
is_reply: true,
success_journal: false,
reply_id: id,
});
if (this.props.checkIfLogin() === false) {
this.props.showLoginDialog();
return;
} else {
this.setState({
is_reply: true,
success_journal: false,
reply_id: id,
});
}
};
cancel_reply = () => {
@ -301,7 +306,7 @@ class comments extends Component {
const new_comment = (is_reply, item_id) => {
return (
<div>
{current_user && current_user.login ? (
{(current_user && current_user.login) ? (
<div>
<div className="grid-item pb10">
<Link
@ -377,10 +382,18 @@ class comments extends Component {
</p>
</div>
) : (
<div className="loginDiv">
<a className="" onClick={() => this.loginModal()}>
<div className="mt15">
<span className="reply-comment-input">
<Button
className="add_reply_button"
onClick={() => this.add_reply("")}
>
<span>我要回复</span>
</Button>
</span>
{/* <a className="" onClick={() => this.loginModal()}>
登录
</a>
</a>并参与到对话中 */}
</div>
)}
</div>