|
|
|
@ -8,7 +8,8 @@ const user = {
|
|
|
|
|
name: '',
|
|
|
|
|
avatar: '',
|
|
|
|
|
roles: [],
|
|
|
|
|
permissions: []
|
|
|
|
|
permissions: [],
|
|
|
|
|
useer: ""
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
mutations: {
|
|
|
|
@ -21,6 +22,9 @@ const user = {
|
|
|
|
|
SET_NAME: (state, name) => {
|
|
|
|
|
state.name = name
|
|
|
|
|
},
|
|
|
|
|
SET_NAMEUSE: (state, name) => {
|
|
|
|
|
state.useer = name
|
|
|
|
|
},
|
|
|
|
|
SET_AVATAR: (state, avatar) => {
|
|
|
|
|
state.avatar = avatar
|
|
|
|
|
},
|
|
|
|
@ -64,6 +68,7 @@ const user = {
|
|
|
|
|
}
|
|
|
|
|
commit('SET_ID', user.userId)
|
|
|
|
|
commit('SET_NAME', user.userName)
|
|
|
|
|
commit('SET_NAMEUSE', user)
|
|
|
|
|
commit('SET_AVATAR', avatar)
|
|
|
|
|
resolve(res)
|
|
|
|
|
}).catch(error => {
|
|
|
|
|