🐛 更新头像与昵称后刷新界面,头像缓存问题修复
This commit is contained in:
parent
3aa18391a2
commit
b4498c2550
@ -18,6 +18,11 @@ export const mutations = {
|
|||||||
},
|
},
|
||||||
setUser (state, data) {
|
setUser (state, data) {
|
||||||
state.userInfo = data
|
state.userInfo = data
|
||||||
|
let user = {
|
||||||
|
nickname: data.nickname,
|
||||||
|
avatarURL: data.avatarUrl
|
||||||
|
}
|
||||||
|
localStorage.setItem('user', JSON.stringify(user))
|
||||||
},
|
},
|
||||||
setActiveMenu (state, activeMenu) {
|
setActiveMenu (state, activeMenu) {
|
||||||
state.activeMenu = activeMenu
|
state.activeMenu = activeMenu
|
||||||
|
Loading…
Reference in New Issue
Block a user