docs: 📝 移除多余的注释
This commit is contained in:
@@ -203,18 +203,11 @@ async function handleLoginSubmit() {
|
||||
await userStore.getUserInfo();
|
||||
|
||||
// 4. 登录成功,让路由守卫处理跳转逻辑
|
||||
// 解析目标地址,但不直接跳转
|
||||
const redirect = resolveRedirectTarget(route.query);
|
||||
console.log("🎉 Login successful, target redirect:", redirect);
|
||||
|
||||
// 通过替换当前路由触发路由守卫,让守卫处理后续的路由生成和跳转
|
||||
await router.replace(redirect);
|
||||
|
||||
// 5. 记住我功能已实现,根据用户选择决定token的存储方式:
|
||||
// - 选中"记住我": token存储在localStorage中,浏览器关闭后仍然有效
|
||||
// - 未选中"记住我": token存储在sessionStorage中,浏览器关闭后失效
|
||||
} catch (error) {
|
||||
// 6. 统一错误处理
|
||||
// 5. 统一错误处理
|
||||
getCaptcha(); // 刷新验证码
|
||||
console.error("登录失败:", error);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user