Files
luo 47a2d88c9d
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m41s
复机实名校验提示适配
2026-07-21 14:30:30 +08:00

3.5 KiB

ADDED Requirements

Requirement: Asset Start Response Contract

The asset start API contract SHALL use POST /api/admin/assets/{identifier}/start and support a successful response containing the latest status, status_name, real_name_status, and real_name_status_name values.

Scenario: Read successful asset start result

  • WHEN 用户对资产提交复机且后端成功处理请求
  • THEN 前端类型 MUST support statusstatus_namereal_name_statusreal_name_status_name
  • AND 前端 MUST use the existing asset start endpoint

Requirement: Asset Start Submission and Refresh

The asset information page SHALL retain the existing asset start entry and confirmation dialog. It MUST prevent duplicate submissions while the asset start request is pending and refresh the asset detail after a successful start.

Scenario: Keep existing asset start confirmation

  • GIVEN 用户正在查看处于停机状态的资产信息页
  • WHEN 用户发起复机操作
  • THEN 页面 MUST display the existing start confirmation dialog
  • AND 页面 MUST NOT add a separate asset start entry

Scenario: Prevent duplicate asset start submissions

  • GIVEN 用户已确认复机操作
  • WHEN 复机请求仍在提交中
  • THEN 复机按钮 MUST be disabled
  • AND 系统 MUST NOT send another asset start request for that interaction

Scenario: Refresh asset detail after a successful start

  • WHEN 复机接口成功返回
  • THEN 页面 MUST reload the current asset detail
  • AND 页面 MUST render the refreshed asset status and real-name status data

Requirement: Backend-Controlled Asset Start Realname Validation

The asset information page SHALL rely exclusively on the backend asset start result to decide whether an asset is allowed to start. The frontend MUST NOT read or use card_category to infer real-name requirements or to permit an asset start.

Scenario: Allow start based on backend result

  • GIVEN 用户对行业卡资产发起复机
  • WHEN 后端允许复机
  • THEN 页面 MUST treat the operation as successful regardless of the asset card_category
  • AND 页面 MUST reload the asset detail

Scenario: Block start based on backend realname validation

  • GIVEN 用户对行业卡资产发起复机
  • WHEN 后端因实名规则拒绝复机并返回中文业务原因
  • THEN 页面 MUST keep the asset start operation unsuccessful
  • AND 页面 MUST NOT use card_category to override or bypass the backend decision

Requirement: Asset Start Business Failure Feedback

When the asset start API rejects an operation for real-name validation or another business rule, the asset information page SHALL show the backend-provided Chinese business reason in the current asset start operation context.

Scenario: Show backend realname rejection reason

  • GIVEN 用户已在资产信息页确认复机
  • WHEN 后端返回实名校验失败及中文业务原因
  • THEN 页面 MUST display that backend Chinese business reason directly in the asset start operation context
  • AND 页面 MUST NOT replace it with a generic frontend failure message

Scenario: Show other backend business rejection reason

  • GIVEN 用户已在资产信息页确认复机
  • WHEN 后端返回非实名相关的业务拦截及中文业务原因
  • THEN 页面 MUST display that backend Chinese business reason directly in the asset start operation context
  • AND 页面 MUST NOT only log the failure to the browser console