|
|
@ -7,6 +7,7 @@ const useUserStore = defineStore(
|
|
|
|
{
|
|
|
|
{
|
|
|
|
state: () => ({
|
|
|
|
state: () => ({
|
|
|
|
token: getToken(),
|
|
|
|
token: getToken(),
|
|
|
|
|
|
|
|
id: '',
|
|
|
|
name: '',
|
|
|
|
name: '',
|
|
|
|
avatar: '',
|
|
|
|
avatar: '',
|
|
|
|
roles: [],
|
|
|
|
roles: [],
|
|
|
@ -42,8 +43,9 @@ const useUserStore = defineStore(
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.roles = ['ROLE_DEFAULT']
|
|
|
|
this.roles = ['ROLE_DEFAULT']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.id = user.userId
|
|
|
|
this.name = user.userName
|
|
|
|
this.name = user.userName
|
|
|
|
this.avatar = avatar;
|
|
|
|
this.avatar = avatar
|
|
|
|
resolve(res)
|
|
|
|
resolve(res)
|
|
|
|
}).catch(error => {
|
|
|
|
}).catch(error => {
|
|
|
|
reject(error)
|
|
|
|
reject(error)
|
|
|
|