fix: 🐛 注销用户清空vuex用户信息失效

注销用户清空vuex用户信息,需要在uuid删除之前,不然无法删除
This commit is contained in:
obrua 2022-01-04 14:30:46 +08:00 committed by GitHub
parent 44b17dc698
commit a7784d4a32
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' })
} }