Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
修复负余额在订阅页面和后台账户管理中错误显示为
0的问题。后端账户余额响应现在保留负数;前端使用独立的余额格式化逻辑展示正负余额,并在后台账户列表中遵循管理员配置的 USD/CNY 展示货币。管理员仍不能主动设置负余额,但可以正常编辑已有负余额用户的其他资料。
同时精简账户页的计费配置请求,避免无关的模型或定价接口失败影响余额币种展示。
Fixes #518
Change type
Affected areas
Verification
cd frontend && pnpm lintcd frontend && pnpm typecheckcd backend && go test ./internal/transport/http/billingpnpm api:checkgit diff --checkpnpm build未运行,本次已完成聚焦静态检查与后端测试。Screenshots, API examples, or logs
负余额现在会按照配置的展示货币正确呈现,例如:
Configuration, migration, and compatibility notes
balanceUSD将负余额错误归零的响应语义。Documentation
Security and privacy
Checklist
.pycfiles,.envfiles, and local storage data are not committed.