Files
youguang_front/src/stores/modules/user.ts
zhutao 7817c39606 1
2025-10-27 15:42:57 +08:00

31 lines
549 B
TypeScript

import {defineStore} from "pinia";
interface AccessState {
token: string,
userInfo: UserState
}
interface UserState {
nickname: string,
tel: string,
avatar: string,
wx_openid: string
}
//@ts-ignore
export const useUserStore = defineStore("app-access", {
state: (): AccessState => ({
token: '',
userInfo: {
nickname: '', //姓名
avatar: '', //头像
tel: '', //手机号
wx_openid: '',
},
}),
persist: {
enabled: true,
}
})