修复部分bug

This commit is contained in:
ember 2025-02-06 21:58:59 +08:00
parent 52bb7ae5f2
commit c668e5852d
5 changed files with 31 additions and 4 deletions

File diff suppressed because one or more lines are too long

2
dist/index.html vendored
View File

@ -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>

File diff suppressed because one or more lines are too long

2
dist/js/app.c13d7f4d.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -420,6 +420,33 @@ filteredComments() {
}, 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() {
if (this.nickname.length < 3 || this.commentContent.length < 6) {
alert('您的昵称请至少包含3个字符评论请至少包含6个字符。');