Files
device-voice-h5/openspec/changes/update-july-h5-c-iteration/specs/asset-realname-flow/spec.md
luo f9d8a107a4
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m14s
fix: 认证策略是先充值后实名, 首页入口
2026-08-05 10:51:23 +08:00

31 lines
1.9 KiB
Markdown

## ADDED Requirements
### Requirement: Real-name behavior SHALL use the effective backend asset policy
The H5/C client SHALL use `GET /api/c/v1/asset/info?identifier=...` as the source of truth for real-name behavior. It SHALL consume `effective_realname_policy`, `realname_required`, and `real_name_status` and SHALL NOT infer policy or final device real-name status from asset type, card type, device type, or frontend-only rules.
#### Scenario: Asset does not require real name
- **WHEN** asset information returns `effective_realname_policy = none` or `realname_required = false`
- **THEN** the client SHALL show the asset as not requiring real-name completion
- **AND** the client SHALL not block the normal order flow for real-name completion
#### Scenario: Real name is required before ordering
- **WHEN** asset information returns `effective_realname_policy = before_order`, `realname_required = true`, and `real_name_status` as not completed
- **THEN** the client SHALL show the real-name requirement
- **AND** the client SHALL prevent package order submission until the existing real-name flow completes
#### Scenario: Real name is required after ordering
- **WHEN** asset information returns `effective_realname_policy = after_order`
- **THEN** the client SHALL allow the policy-defined post-order flow to proceed without applying a before-order block
- **AND** the client SHALL display the returned real-name status
- **AND** selecting the homepage real-name entry SHALL show a confirmation prompt and allow the user to navigate to package ordering instead of entering real-name authentication directly
#### Scenario: Device status is resolved from server output
- **WHEN** a device has cards with different local-looking real-name states but the asset info response returns the effective device `real_name_status`
- **THEN** the client SHALL display and use that returned effective status
- **AND** the client SHALL not replace it with a card/device inference