Skip to content

Commit 5f39ef2

Browse files
committed
fix: remove qq info
1 parent a41bedd commit 5f39ef2

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

blog-api/src/main/java/top/naccl/util/comment/CommentUtils.java

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -276,21 +276,8 @@ public void setAdminComment(Comment comment, HttpServletRequest request, User ad
276276
* @param request 用于获取ip
277277
*/
278278
public void setVisitorComment(Comment comment, HttpServletRequest request) {
279-
String nickname = comment.getNickname();
280-
try {
281-
if (QQInfoUtils.isQQNumber(nickname)) {
282-
comment.setQq(nickname);
283-
comment.setNickname(QQInfoUtils.getQQNickname(nickname));
284-
setCommentQQAvatar(comment, nickname);
285-
} else {
286-
comment.setNickname(comment.getNickname().trim());
287-
setCommentRandomAvatar(comment);
288-
}
289-
} catch (Exception e) {
290-
e.printStackTrace();
291-
comment.setNickname(comment.getNickname().trim());
292-
setCommentRandomAvatar(comment);
293-
}
279+
comment.setNickname(comment.getNickname().trim());
280+
setCommentRandomAvatar(comment);
294281

295282
//check website
296283
if (!isValidUrl(comment.getWebsite())) {

blog-view/src/components/comment/CommentForm.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
</div>
4545
</div>
4646
<el-form-item prop="nickname">
47-
<el-popover ref="nicknamePopover" placement="bottom" trigger="focus" content="输入QQ号将自动拉取昵称和头像"></el-popover>
4847
<el-input v-model="commentForm.nickname" placeholder="昵称(必填)" :validate-event="false" v-popover:nicknamePopover>
4948
<i slot="prefix" class="el-input__icon el-icon-user"></i>
5049
</el-input>

0 commit comments

Comments
 (0)