Files
device-voice-h5/openspec/changes/update-wallet-display-rules/proposal.md
sexygoat 3f997063f4
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m37s
fix: 优化体验
2026-05-09 16:14:06 +08:00

1.3 KiB

Why

The homepage wallet entry currently displays the raw wallet balance value returned by the backend, which is cent-based. This causes incorrect user-facing values such as showing 100 instead of 1. In addition, the wallet recharge order list always renders the auto purchase row, which can show misleading fallback text when the backend does not provide auto purchase data.

What Changes

  • Convert the homepage wallet entry balance from cents to yuan before rendering the value inside 钱包(...)
  • Keep the homepage wallet entry aligned with user-facing currency expectations instead of exposing the raw cent amount
  • Render the recharge order 自动购包 field only when the recharge order includes auto purchase status data
  • Preserve the current auto purchase status text mapping when the field exists, including existing compatibility values

Capabilities

New Capabilities

  • wallet-display-rules: Define wallet-related UI display rules for homepage balance presentation and recharge order field visibility

Modified Capabilities

Impact

  • Affected code: components/FunctionCard.vue, pages/index/index.vue, pages/my-wallet/my-wallet.vue
  • Affected UI flows: homepage function menu wallet entry, wallet recharge order list
  • No backend API changes
  • No payment flow changes