WU1 §3.5 步骤④前端落地:Login.vue 在 sms/invite 之外加第三个「用户名密码」
Tab,内含登录/注册子模式段控——用户名、密码两输入框,前端做与后端一致的
用户名正则 ^[a-zA-Z0-9]{4,30}$ + 密码 6-32 位预校验(仅提示,信任边界在后端);
复用既有隐私政策勾选、?redirect= 回跳、setLogin 落持久化、user_login 遥测
双带四段,登录成功路径与短信路一致(同拿 LoginResp)。
passport.ts 加 PasswordRegisterReq/PasswordLoginReq 入参接口与 passwordRegister/
passwordLogin 两函数(贴 VO 契约、走同一 request 信封解包),PlayerMeResp 补
username;Profile.vue fallbackMe 同步补 username 空串兜底。entry.zh/en 补 Tab
标题、用户名/密码占位、子模式与提交按钮多态文案、两条本地预校验提示。
自证:npm run build(vue-tsc -b && vite build)退出 0。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Vue 3 + TypeScript + Vite
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.
Learn more about the recommended Project Setup and IDE Support in the Vue Docs TypeScript Guide.