fix 修复重新登录没有刷新菜单的问题

This commit is contained in:
2021-04-25 20:57:10 +08:00
parent ccb0078a79
commit a150ef64cf
2 changed files with 4 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
import { api } from '@/common/api'
import { token } from '@/common/token'
import { GLOBAL_INFO_KEY } from '@/common/storage'
import { GLOBAL_INFO_KEY, APP_MENU_KEY } from '@/common/storage'
import { encryptByDES, decryptByDES } from '@/util/des'
import app from '@/main'
@@ -50,6 +50,7 @@ const doLogout = () => {
if (success) {
removeGlobal()
token.value = ''
window.localStorage.removeItem(APP_MENU_KEY)
if (app.$route.path === '/') {
app.$router.replace('/login')
} else {