update 菜单完善

This commit is contained in:
2021-04-29 16:07:01 +08:00
parent 88b7b3d4d2
commit 8da9283a69
12 changed files with 107 additions and 45 deletions

View File

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

View File

@@ -1,11 +1,11 @@
const SESSION_KEY = '__SESSION'
const SETTING_KEY = '__SETTINGS'
const GLOBAL_INFO_KEY = '__GLOBAL_INFO'
const APP_MENU_KEY = '__APP_MENU'
const ACTIVE_APP_KEY = '__ACTIVE_APP'
export {
SESSION_KEY,
SETTING_KEY,
GLOBAL_INFO_KEY,
APP_MENU_KEY
ACTIVE_APP_KEY
}