Skip to content

Commit

Permalink
fix: 🐛 注销用户清空vuex用户信息失效
Browse files Browse the repository at this point in the history
注销用户清空vuex用户信息,需要在uuid删除之前,不然无法删除
  • Loading branch information
obrua authored Jan 4, 2022
1 parent 44b17dc commit a7784d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/store/modules/d2admin/modules/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ export default {
async function logout () {
// 删除cookie
util.cookies.remove('token')
util.cookies.remove('uuid')
// 清空 vuex 用户信息
await dispatch('d2admin/user/set', {}, { root: true })
util.cookies.remove('uuid')
// 跳转路由
router.push({ name: 'login' })
}
Expand Down

0 comments on commit a7784d4

Please sign in to comment.