修复部分bug
This commit is contained in:
parent
52bb7ae5f2
commit
c668e5852d
File diff suppressed because one or more lines are too long
2
dist/index.html
vendored
2
dist/index.html
vendored
@ -1 +1 @@
|
|||||||
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>NEU小站课程评分系统 - v1.1</title><script defer="defer" src="/js/chunk-vendors.3aa9144b.js"></script><script defer="defer" src="/js/app.53fb2823.js"></script><link href="/css/chunk-vendors.f2db5e15.css" rel="stylesheet"><link href="/css/app.a99d9c83.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but myproject doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>NEU小站课程评分系统 - v1.1</title><script defer="defer" src="/js/chunk-vendors.3aa9144b.js"></script><script defer="defer" src="/js/app.c13d7f4d.js"></script><link href="/css/chunk-vendors.f2db5e15.css" rel="stylesheet"><link href="/css/app.18f68030.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but myproject doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
2
dist/js/app.53fb2823.js
vendored
2
dist/js/app.53fb2823.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/app.c13d7f4d.js
vendored
Normal file
2
dist/js/app.c13d7f4d.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -420,6 +420,33 @@ filteredComments() {
|
|||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async toggleLike(comment) {
|
||||||
|
const email = this.getUserEmailFromCookie();
|
||||||
|
if (comment.is_liked) {
|
||||||
|
await fetch('https://coursesystem.xn--xhq44jb2fzpc.com/unlike-comment', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
user_email: email,
|
||||||
|
comment_id: comment.comment_id
|
||||||
|
})
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
await fetch('https://coursesystem.xn--xhq44jb2fzpc.com/like-comment', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
user_email: email,
|
||||||
|
comment_id: comment.comment_id
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.fetchComments(); // 重新获取评论
|
||||||
|
},
|
||||||
async submitComment() {
|
async submitComment() {
|
||||||
if (this.nickname.length < 3 || this.commentContent.length < 6) {
|
if (this.nickname.length < 3 || this.commentContent.length < 6) {
|
||||||
alert('您的昵称请至少包含3个字符,评论请至少包含6个字符。');
|
alert('您的昵称请至少包含3个字符,评论请至少包含6个字符。');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user