feat: 登录页面

This commit is contained in:
2026-06-08 16:09:57 +08:00
parent fb60a6b7ee
commit 391def3c92
15 changed files with 754 additions and 130 deletions

View File

@@ -0,0 +1,37 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
/** 账户信息 */
export interface AccountState {
/** 账户ID */
id: string
/** 用户名 */
username: string
/** 年龄 */
age?: number
/** 性别 */
sex?: string
/** 手机号 */
phone?: string
/** 邮箱 */
email?: string
/** 头像 */
avatar?: string
/** 生日 */
birthday?: string
}
export const useAccountStore = defineStore(
'account',
() => {
const accountInfo = ref<AccountState>()
const token = ref('')
return { accountInfo, token }
},
{
persist: {
pick: ['accountInfo', 'token']
}
}
)