From 7ffbec5d2f92d4a6d94577f5955a2112f8e7356f Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Fri, 5 Jun 2020 17:52:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/comments/comments.js | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/src/forge/comments/comments.js b/src/forge/comments/comments.js index c87b69f2..2e763e41 100644 --- a/src/forge/comments/comments.js +++ b/src/forge/comments/comments.js @@ -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 (
- {current_user && current_user.login ? ( + {(current_user && current_user.login) ? (
) : ( -
- this.loginModal()}> +
+ + + + {/* this.loginModal()}> 登录 - 并参与到对话中 + 并参与到对话中 */}
)}