2.5 KiB
2.5 KiB
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_statuswith a value of0or'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