feat: 接入真实平台登录态

- login/session: 对接后端登录、鉴权恢复和首次改密
- api/store: 恢复 BPMN XML 真实接口并携带 Bearer token
- layout/settings: 展示真实角色、审计 JSON 和通知平台配置文档
This commit is contained in:
湛兮
2026-06-12 00:38:31 +08:00
parent a37f641c6c
commit 366f1d667e
13 changed files with 467 additions and 46 deletions
+4 -3
View File
@@ -60,10 +60,11 @@ const router = createRouter({
routes,
})
router.beforeEach((to) => {
router.beforeEach(async (to) => {
const session = useSessionStore()
const authenticated = await session.bootstrap()
if (!to.meta.public && !session.isAuthenticated) {
if (!to.meta.public && (!authenticated || session.mustChangePassword)) {
return {
name: 'login',
query: {
@@ -72,7 +73,7 @@ router.beforeEach((to) => {
}
}
if (to.name === 'login' && session.isAuthenticated) {
if (to.name === 'login' && authenticated && !session.mustChangePassword) {
return {
name: 'overview',
}