1.4 KiB
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/indexconsistently - Require
pages/index/index.vueto check whether the current account still needs phone binding every time the page is entered - Redirect to
pages/bind/bindfromindexwhen 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 fromindexinstead 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