chore: update project files

This commit is contained in:
AIGC Developer
2025-11-13 17:01:39 +08:00
parent 83bf064bb2
commit 2961d2b0d0
344 changed files with 11549 additions and 15941 deletions

View File

@@ -25,6 +25,14 @@ export const useUserStore = defineStore('user', () => {
const isAdmin = computed(() => user.value?.role === 'ROLE_ADMIN')
const username = computed(() => user.value?.username || '')
// 可用积分(总积分 - 冻结积分)
const availablePoints = computed(() => {
if (!user.value) return 0
const total = user.value.points || 0
const frozen = user.value.frozenPoints || 0
return Math.max(0, total - frozen)
})
// 登录
const loginUser = async (credentials) => {
try {
@@ -147,6 +155,7 @@ export const useUserStore = defineStore('user', () => {
isAuthenticated,
isAdmin,
username,
availablePoints,
// 方法
loginUser,
registerUser,