Merge pull request #355 from obrua/patch-1

fix: 🐛 注销用户清空vuex用户信息失效
This commit is contained in:
李杨 2022-02-16 11:11:06 +08:00 committed by GitHub
commit 0082db6a86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -42,9 +42,9 @@ export default {
async function logout () { async function logout () {
// 删除cookie // 删除cookie
util.cookies.remove('token') util.cookies.remove('token')
util.cookies.remove('uuid')
// 清空 vuex 用户信息 // 清空 vuex 用户信息
await dispatch('d2admin/user/set', {}, { root: true }) await dispatch('d2admin/user/set', {}, { root: true })
util.cookies.remove('uuid')
// 跳转路由 // 跳转路由
router.push({ name: 'login' }) router.push({ name: 'login' })
} }