fix: 优化体验
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m37s

This commit is contained in:
sexygoat
2026-05-09 16:14:06 +08:00
parent c798cdba7f
commit 3f997063f4
27 changed files with 1191 additions and 62 deletions

View File

@@ -0,0 +1,42 @@
## ADDED Requirements
### Requirement: Homepage wallet entry SHALL display wallet balance in yuan
The system SHALL convert the backend wallet balance value from cents to yuan before rendering the balance inside the homepage wallet entry label.
#### Scenario: Cent-based balance is converted for homepage display
- **WHEN** the homepage wallet entry receives a wallet balance value of `100`
- **THEN** the system SHALL display the wallet entry label as `钱包 (1)` instead of showing the raw cent value
#### Scenario: Non-round cent amount is converted for homepage display
- **WHEN** the homepage wallet entry receives a cent-based wallet balance that is not a whole yuan amount
- **THEN** the system SHALL display the converted yuan value
- **AND** the system SHALL NOT display the raw cent integer
#### Scenario: Zero balance is displayed consistently
- **WHEN** the homepage wallet entry receives a wallet balance value of `0`
- **THEN** the system SHALL display `钱包 (0)`
### Requirement: Recharge order auto purchase row SHALL render only when data exists
The system SHALL render the `自动购包` row in the wallet recharge order list only when the recharge order includes auto purchase status data.
#### Scenario: Auto purchase data exists on a recharge order
- **WHEN** a recharge order includes `auto_purchase_status`
- **THEN** the system SHALL render the `自动购包` row
- **AND** the system SHALL display the status text mapped from that value
#### Scenario: Compatible disabled value still counts as existing data
- **WHEN** a recharge order includes `auto_purchase_status` with a value of `0` or `'0'`
- **THEN** the system SHALL render the `自动购包` row
- **AND** the system SHALL display the compatible disabled status text
#### Scenario: Auto purchase data is absent on a recharge order
- **WHEN** a recharge order does not include `auto_purchase_status`
- **THEN** the system SHALL NOT render the `自动购包` row
### Requirement: Wallet display rules SHALL NOT change API contracts or payment behavior
The system SHALL preserve the existing backend data contract, recharge order retrieval flow, payment actions, and wallet detail page amount handling while applying these display rules.
#### Scenario: Display-only adjustment does not alter business flow
- **WHEN** the homepage wallet balance or recharge order list is rendered with the new display rules
- **THEN** the system SHALL only change user-facing presentation
- **AND** the system SHALL NOT change payment processing or backend request behavior