1
This commit is contained in:
30
src/stores/modules/user.ts
Normal file
30
src/stores/modules/user.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
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,
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user