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,15 @@
## MODIFIED Requirements
### Requirement: Bind completion SHALL remain compatible with homepage entry
The system SHALL keep ordinary bind-phone completion compatible with homepage entry while allowing mandatory bind-phone completion from the login gate to return to the login page for a manual re-login.
#### Scenario: User completes ordinary binding and returns to index
- **WHEN** the user completes phone binding successfully after entering the bind page from a later homepage action
- **THEN** the system SHALL return the user to `pages/index/index`
- **AND** entering `index` afterward SHALL no longer redirect if the account is now bound
#### Scenario: User completes mandatory binding and returns to login
- **WHEN** the user completes phone binding successfully after entering the bind page from the mandatory login gate
- **THEN** the system SHALL return the user to `pages/login/login`
- **AND** the system SHALL preserve the previously entered identifier for the login input
- **AND** the user SHALL manually trigger the next login attempt before the homepage-entry gate is evaluated again

View File

@@ -0,0 +1,37 @@
## ADDED Requirements
### Requirement: Mandatory bind completion SHALL return the user to login for manual re-login
The system SHALL return the user to `pages/login/login` after successful phone binding when the bind page was entered from the mandatory login gate, and SHALL require an explicit user-driven re-login before continuing.
#### Scenario: Mandatory bind succeeds and requires manual re-login
- **WHEN** the user enters `pages/bind/bind` from the mandatory bind-phone gate
- **AND** the user completes phone binding successfully
- **THEN** the system SHALL route the user to `pages/login/login` instead of routing directly to `pages/index/index`
- **AND** the system SHALL show a prompt that binding succeeded and re-login is required
- **AND** the system SHALL wait for the user to explicitly trigger login again
### Requirement: Login input SHALL preserve the prior identifier without auto-submitting
The system SHALL preserve the identifier that the user previously entered before the mandatory bind flow and SHALL restore it into the login input without automatically starting login.
#### Scenario: Login page restores identifier after mandatory bind success
- **WHEN** the user is returned to `pages/login/login` after successful mandatory phone binding
- **THEN** the login input SHALL remain populated with the identifier that was entered before the bind flow
- **AND** the system SHALL NOT auto-submit login or auto-trigger the OAuth flow only because the identifier was restored
- **AND** the user SHALL manually tap the login action to continue
### Requirement: Mandatory post-bind return SHALL avoid automatic recheck dependencies
The system SHALL avoid depending on an automatic post-bind wechat-login recheck for the mandatory bind-success continuation flow.
#### Scenario: Mandatory bind success does not auto-call wechat-login
- **WHEN** the user completes phone binding successfully from the mandatory login gate
- **THEN** the system SHALL NOT automatically call `POST /api/c/v1/auth/wechat-login` as the immediate continuation step
- **AND** the post-bind continuation SHALL depend on the user re-entering the login flow manually
### Requirement: Non-mandatory bind completion SHALL keep existing behavior
The system SHALL keep the existing non-mandatory bind completion behavior when the bind page was entered from a later homepage action rather than from the mandatory login gate.
#### Scenario: Ordinary bind completion remains unchanged
- **WHEN** the user enters `pages/bind/bind` from a later homepage action rather than the mandatory login gate
- **AND** the user completes phone binding successfully
- **THEN** the system SHALL keep the current non-mandatory bind completion behavior
- **AND** the system SHALL NOT force the user back to `pages/login/login` for that ordinary bind flow