feat(auth): 添加登录页与演示认证逻辑
This commit is contained in:
@@ -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
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user