Files
device-voice-h5/openspec/changes/update-index-phone-bind-gate/proposal.md
sexygoat 3f997063f4
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m37s
fix: 优化体验
2026-05-09 16:14:06 +08:00

1.4 KiB

Why

The current login flow decides whether to send the user to the bind-phone page based on loginData.need_bind_phone. This makes the phone-binding gate happen only at login time, which is fragile because the actual requirement belongs to entering the homepage, not only to completing login. As a result, the app can enter an inconsistent state when the user reaches index through other paths or when the latest bind requirement should be re-evaluated on homepage entry.

What Changes

  • Move the mandatory phone-binding gate out of pages/login/login.vue
  • Make login success redirect to pages/index/index consistently
  • Require pages/index/index.vue to check whether the current account still needs phone binding every time the page is entered
  • Redirect to pages/bind/bind from index when binding is required, instead of deciding that only during login
  • Keep the bind-phone page as the place where the user completes the required binding flow

Capabilities

New Capabilities

  • index-phone-bind-gate: Define homepage-entry binding rules so phone binding is enforced from index instead of only from login

Modified Capabilities

Impact

  • Affected code: pages/login/login.vue, pages/index/index.vue, pages/bind/bind.vue
  • Affected flow: post-login routing, homepage entry, mandatory bind-phone redirect
  • No backend API changes
  • No login credential or bind-phone API contract changes