fix: 退出登录后在受保护页面跳转到配方查询页面 #14
Reference in New Issue
Block a user
Delete Branch "fix/logout-redirect-protected-pages"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
关联 Issue #13
修改内容
router/index.js:为需要登录才能访问的路由添加meta: { requiresAuth: true }标记:/manage配方管理/inventory库存/projects商业核算/mydiary我的/audit操作日志/bugs问题追踪/users用户管理UserMenu.vue:handleLogout()改为根据当前路由判断:🚀 Preview: https://pr-14.oil.oci.euphon.net
DB is a copy of production.
在 router/index.js 中为需要登录才能访问的路由(manage、inventory、 projects、mydiary、audit、bugs、users)添加 meta.requiresAuth 标记。 在 UserMenu.vue 的 handleLogout() 中检查当前路由是否需要登录, 如果是则 router.push('/') 跳回配方查询页,否则原地 reload。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>603e81853dtob764ff7ea3🚀 Preview: https://pr-14.oil.oci.euphon.net
DB is a copy of production.
🗑️ Preview torn down.