修复提交博客评论未进行人机验证检验的bug
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
import { API } from "../Plugs/API/API";
|
import { API } from "../Plugs/API/API";
|
||||||
import ServerStdResponse from "../ServerStdResponse";
|
import ServerStdResponse from "../ServerStdResponse";
|
||||||
import MySQLConnection from '../Plugs/MySQLConnection'
|
import MySQLConnection from '../Plugs/MySQLConnection'
|
||||||
import MountUserAgent from "../Plugs/Middleware/mountUserAgent";
|
import MountUserAgent from "../Plugs/Middleware/MountUserAgent";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import MountIP from "../Plugs/Middleware/mountIP";
|
import MountIP from "../Plugs/Middleware/MountIP";
|
||||||
|
import CheckCaptchaPassed from "../Plugs/Middleware/CheckCaptchaPassed";
|
||||||
|
|
||||||
// 提交博客评论
|
// 提交博客评论
|
||||||
class BlogComment extends API {
|
class BlogComment extends API {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('POST', '/blogComment', MountUserAgent, MountIP);
|
super('POST', '/blogComment', CheckCaptchaPassed, MountUserAgent, MountIP);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async onRequset(data: any, res: any) {
|
public async onRequset(data: any, res: any) {
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ const submitComment = async () => {
|
|||||||
ElMessage.info('正在提交,请稍后')
|
ElMessage.info('正在提交,请稍后')
|
||||||
try {
|
try {
|
||||||
let commentRes = await request.post('blogComment', {
|
let commentRes = await request.post('blogComment', {
|
||||||
|
session: localStorage.getItem('captcha-session'),
|
||||||
bloguuid: bloguuid,
|
bloguuid: bloguuid,
|
||||||
content: inputComment.value.trim(),
|
content: inputComment.value.trim(),
|
||||||
name: inputCommentName.trim() == '' ? '匿名' : inputCommentName.trim()
|
name: inputCommentName.trim() == '' ? '匿名' : inputCommentName.trim()
|
||||||
|
|||||||
Reference in New Issue
Block a user