feat(auth): 添加登录页与演示认证逻辑

This commit is contained in:
yelan
2026-08-27 13:22:45 +08:00
parent 4720f7e1a7
commit 779f15d29f
8 changed files with 333 additions and 4 deletions
+10
View File
@@ -2,8 +2,18 @@ import { defineStore } from 'pinia'
export const useAppStore = defineStore('app', {
state: () => ({
isLoggedIn: false,
userName: '张文静',
department: '医务管理 · 主任医师',
environment: '原型演示环境',
}),
actions: {
login(userName: string) {
this.userName = userName || '张文静'
this.isLoggedIn = true
},
logout() {
this.isLoggedIn = false
},
},
})