Full Go backend + Vue 3 frontend, OpenAI-compatible API, multi-provider account pools, billing/admin, Docker one-command deploy with auto HTTPS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
13 lines
483 B
JavaScript
13 lines
483 B
JavaScript
// Credit display helpers. Credits and model prices are stored server-side as
|
|
// integer 积分 (points) — the single unit across the whole app. These helpers
|
|
// only format for display; they do NOT convert units.
|
|
/** Round to an integer 积分 value. */
|
|
export function points(value) {
|
|
return Math.round(Number(value || 0))
|
|
}
|
|
|
|
/** "<n> 积分" label with thousands separators. */
|
|
export function pointsLabel(value) {
|
|
return points(value).toLocaleString('en-US') + ' 积分'
|
|
}
|