fix: some
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 2m59s

This commit is contained in:
luo
2026-10-13 14:53:19 +08:00
parent 77b0e25011
commit da95a914e3
31 changed files with 1702 additions and 116 deletions

View File

@@ -0,0 +1,36 @@
## ADDED Requirements
### Requirement: Phone guidance SHALL use the current login asset facts
H5 SHALL 保存 `POST /api/c/v1/auth/wechat-login` 的 `asset_phone_bound`、`asset_phone_is_own`、`need_bind_phone`,分别表达资产是否绑号、号码归属和是否提示绑定。状态 SHALL 按当前账号及资产隔离;客户 `bound_phone` 和旧本地缓存 SHALL NOT 替代资产布尔事实。
#### Scenario: Customer has a phone but the asset is unbound
- **WHEN** 客户有手机号,登录返回 `asset_phone_bound=false` 和 `need_bind_phone=true`
- **THEN** H5 SHALL 引导用户给资产绑定号码
- **AND** SHALL NOT 因客户手机号非空或旧缓存 bound=true 跳过提示
#### Scenario: Asset belongs to another phone and guidance is not required
- **WHEN** 登录返回 `asset_phone_bound=true`、`asset_phone_is_own=false`、`need_bind_phone=false`
- **THEN** H5 SHALL 认为资产已有手机号,不要求重新绑定
- **AND** SHALL NOT 推测或显示关联号码
#### Scenario: Account or asset context changes
- **WHEN** 用户退出、切换账号或切换资产
- **THEN** H5 SHALL 清理或更换绑定事实,不能复用上一上下文的布尔值或手机号缓存
### Requirement: Automatic binding guidance SHALL follow need_bind_phone
H5 SHALL 仅按后端 `need_bind_phone` 触发自动绑定提示,SHALL NOT 根据手机号为空或 `asset_phone_is_own=false` 擅自增加自动跳转;缺失字段 SHALL 保持未知而非视为绑定成功。
#### Scenario: Force binding is disabled
- **WHEN** 强制绑定关闭,登录返回 `need_bind_phone=false`
- **THEN** H5 SHALL 正常进入首页,不自动跳转绑定页
#### Scenario: Guidance is required
- **WHEN** 登录返回 `need_bind_phone=true`
- **THEN** H5 SHALL 进入现有强制绑定流程,并按资产事实区分给客户绑号与给资产绑号