This commit is contained in:
Daniel
2026-04-28 19:16:27 +08:00
parent 6de7e782fc
commit c234fe64d6
13 changed files with 229 additions and 31 deletions

View File

@@ -709,10 +709,10 @@ class UserStore:
cycle_started_at = int(row["cycle_started_at"] or 0) if row else 0
cycle_expires_at = int(row["cycle_expires_at"] or 0) if row else 0
now = int(time.time())
cycle_active = cycle_expires_at > now if cycle_expires_at > 0 else True
# 仅当已开启有效计费周期时,席位额度才可用;新用户未购买时不应显示席位 1500
cycle_active = cycle_started_at > 0 and cycle_expires_at > now
if not cycle_active:
seat_remaining = 0
shared_credits = 0
return {
"vip_enabled": bool(int(row["vip_enabled"] or 0)) if row else False,
"token_balance": shared_credits,