增加积分系统

This commit is contained in:
WilliamColton
2025-08-07 16:29:14 +08:00
21 changed files with 464 additions and 178 deletions

View File

@@ -375,7 +375,7 @@ export default {
}
}
const postComment = async (text) => {
const postComment = async (text, clear) => {
if (!text.trim()) return
console.debug('Posting comment', {postId, text})
isWaitingPostingComment.value = true
@@ -396,6 +396,7 @@ export default {
const data = await res.json()
console.debug('Post comment response data', data)
await fetchComments()
clear()
const reward = Math.max(0, Number(data?.reward) || 0) // 经验值
const points = Math.max(0, Number(data?.pointReward) || 0) // 积分值