diff --git a/src/layout/components/HeaderSys/index.vue b/src/layout/components/HeaderSys/index.vue index a06cbff..eab0e69 100644 --- a/src/layout/components/HeaderSys/index.vue +++ b/src/layout/components/HeaderSys/index.vue @@ -84,8 +84,8 @@ function getSelfMenu(item) { console.log(item, 'itemitem'); activeIndex.value = item.name; - localStorage.setItem('routerPartXG', item.name); - localStorage.setItem('fromDoorXG', 'chengguanweiScreen'); + localStorage.setItem('routerPartKFC', item.name); + localStorage.setItem('fromDoorKFC', 'chengguanweiScreen'); bus.emit('selfMenuXG', item); } @@ -124,14 +124,14 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } function goOneMap() { router.push({ path: '/chengguanweiScreen' }); - localStorage.setItem('routerPartXG', 'Project'); //默认加载项目首页 + localStorage.setItem('routerPartKFC', 'Project'); //默认加载项目首页 } // 消息弹框 @@ -152,7 +152,7 @@ menuList.value = menuList.value.filter(item => item.name != 'System'); //不显示系统管理 menuList.value = menuList.value.filter(item => item.name != 'SponeScreen'); //不显示一张图 menuList1.value = menuList.value; - activeIndex.value = localStorage.getItem('routerPartXG'); //默认选中 + activeIndex.value = localStorage.getItem('routerPartKFC'); //默认选中 bus.on('closeUserCenter', e => { dialogShow.value = false; }); diff --git a/src/layout/components/HeaderSys/index.vue b/src/layout/components/HeaderSys/index.vue index a06cbff..eab0e69 100644 --- a/src/layout/components/HeaderSys/index.vue +++ b/src/layout/components/HeaderSys/index.vue @@ -84,8 +84,8 @@ function getSelfMenu(item) { console.log(item, 'itemitem'); activeIndex.value = item.name; - localStorage.setItem('routerPartXG', item.name); - localStorage.setItem('fromDoorXG', 'chengguanweiScreen'); + localStorage.setItem('routerPartKFC', item.name); + localStorage.setItem('fromDoorKFC', 'chengguanweiScreen'); bus.emit('selfMenuXG', item); } @@ -124,14 +124,14 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } function goOneMap() { router.push({ path: '/chengguanweiScreen' }); - localStorage.setItem('routerPartXG', 'Project'); //默认加载项目首页 + localStorage.setItem('routerPartKFC', 'Project'); //默认加载项目首页 } // 消息弹框 @@ -152,7 +152,7 @@ menuList.value = menuList.value.filter(item => item.name != 'System'); //不显示系统管理 menuList.value = menuList.value.filter(item => item.name != 'SponeScreen'); //不显示一张图 menuList1.value = menuList.value; - activeIndex.value = localStorage.getItem('routerPartXG'); //默认选中 + activeIndex.value = localStorage.getItem('routerPartKFC'); //默认选中 bus.on('closeUserCenter', e => { dialogShow.value = false; }); diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 3910848..17a10dd 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -88,7 +88,7 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } diff --git a/src/layout/components/HeaderSys/index.vue b/src/layout/components/HeaderSys/index.vue index a06cbff..eab0e69 100644 --- a/src/layout/components/HeaderSys/index.vue +++ b/src/layout/components/HeaderSys/index.vue @@ -84,8 +84,8 @@ function getSelfMenu(item) { console.log(item, 'itemitem'); activeIndex.value = item.name; - localStorage.setItem('routerPartXG', item.name); - localStorage.setItem('fromDoorXG', 'chengguanweiScreen'); + localStorage.setItem('routerPartKFC', item.name); + localStorage.setItem('fromDoorKFC', 'chengguanweiScreen'); bus.emit('selfMenuXG', item); } @@ -124,14 +124,14 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } function goOneMap() { router.push({ path: '/chengguanweiScreen' }); - localStorage.setItem('routerPartXG', 'Project'); //默认加载项目首页 + localStorage.setItem('routerPartKFC', 'Project'); //默认加载项目首页 } // 消息弹框 @@ -152,7 +152,7 @@ menuList.value = menuList.value.filter(item => item.name != 'System'); //不显示系统管理 menuList.value = menuList.value.filter(item => item.name != 'SponeScreen'); //不显示一张图 menuList1.value = menuList.value; - activeIndex.value = localStorage.getItem('routerPartXG'); //默认选中 + activeIndex.value = localStorage.getItem('routerPartKFC'); //默认选中 bus.on('closeUserCenter', e => { dialogShow.value = false; }); diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 3910848..17a10dd 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -88,7 +88,7 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index f63caad..ba8f4a1 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -58,7 +58,7 @@ // 菜单切换设置 function setMenuData() { - let key = localStorage.getItem('routerPartXG'); + let key = localStorage.getItem('routerPartKFC'); let routeArr = JSON.parse(JSON.stringify(permissionStore.sidebarRouters)); routeArr = routeArr.filter(item => item.path != '/index'); let paths = ''; @@ -69,7 +69,7 @@ } }); // 默认打开子系统的第一个页面 - if (localStorage.getItem('fromDoorXG') == 'chengguanweiScreen') { + if (localStorage.getItem('fromDoorKFC') == 'chengguanweiScreen') { console.log(newArr, 'newArr'); if (newArr.length == 0) { proxy.$modal.msgError('暂无权限查看该系统'); diff --git a/src/layout/components/HeaderSys/index.vue b/src/layout/components/HeaderSys/index.vue index a06cbff..eab0e69 100644 --- a/src/layout/components/HeaderSys/index.vue +++ b/src/layout/components/HeaderSys/index.vue @@ -84,8 +84,8 @@ function getSelfMenu(item) { console.log(item, 'itemitem'); activeIndex.value = item.name; - localStorage.setItem('routerPartXG', item.name); - localStorage.setItem('fromDoorXG', 'chengguanweiScreen'); + localStorage.setItem('routerPartKFC', item.name); + localStorage.setItem('fromDoorKFC', 'chengguanweiScreen'); bus.emit('selfMenuXG', item); } @@ -124,14 +124,14 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } function goOneMap() { router.push({ path: '/chengguanweiScreen' }); - localStorage.setItem('routerPartXG', 'Project'); //默认加载项目首页 + localStorage.setItem('routerPartKFC', 'Project'); //默认加载项目首页 } // 消息弹框 @@ -152,7 +152,7 @@ menuList.value = menuList.value.filter(item => item.name != 'System'); //不显示系统管理 menuList.value = menuList.value.filter(item => item.name != 'SponeScreen'); //不显示一张图 menuList1.value = menuList.value; - activeIndex.value = localStorage.getItem('routerPartXG'); //默认选中 + activeIndex.value = localStorage.getItem('routerPartKFC'); //默认选中 bus.on('closeUserCenter', e => { dialogShow.value = false; }); diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 3910848..17a10dd 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -88,7 +88,7 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index f63caad..ba8f4a1 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -58,7 +58,7 @@ // 菜单切换设置 function setMenuData() { - let key = localStorage.getItem('routerPartXG'); + let key = localStorage.getItem('routerPartKFC'); let routeArr = JSON.parse(JSON.stringify(permissionStore.sidebarRouters)); routeArr = routeArr.filter(item => item.path != '/index'); let paths = ''; @@ -69,7 +69,7 @@ } }); // 默认打开子系统的第一个页面 - if (localStorage.getItem('fromDoorXG') == 'chengguanweiScreen') { + if (localStorage.getItem('fromDoorKFC') == 'chengguanweiScreen') { console.log(newArr, 'newArr'); if (newArr.length == 0) { proxy.$modal.msgError('暂无权限查看该系统'); diff --git a/src/layout/index.vue b/src/layout/index.vue index 5ce324d..bdbdfad 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -89,7 +89,7 @@ // 默认收起菜单 function xgMenuSet() { - let key = localStorage.getItem('routerPartXG'); + let key = localStorage.getItem('routerPartKFC'); if (key == 'SponeScreen' || key == 'FloodSys' || key == 'Project' || key == 'DataAnalysis') { useAppStore().closeSideBar({ withoutAnimation: true }); } else { diff --git a/src/layout/components/HeaderSys/index.vue b/src/layout/components/HeaderSys/index.vue index a06cbff..eab0e69 100644 --- a/src/layout/components/HeaderSys/index.vue +++ b/src/layout/components/HeaderSys/index.vue @@ -84,8 +84,8 @@ function getSelfMenu(item) { console.log(item, 'itemitem'); activeIndex.value = item.name; - localStorage.setItem('routerPartXG', item.name); - localStorage.setItem('fromDoorXG', 'chengguanweiScreen'); + localStorage.setItem('routerPartKFC', item.name); + localStorage.setItem('fromDoorKFC', 'chengguanweiScreen'); bus.emit('selfMenuXG', item); } @@ -124,14 +124,14 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } function goOneMap() { router.push({ path: '/chengguanweiScreen' }); - localStorage.setItem('routerPartXG', 'Project'); //默认加载项目首页 + localStorage.setItem('routerPartKFC', 'Project'); //默认加载项目首页 } // 消息弹框 @@ -152,7 +152,7 @@ menuList.value = menuList.value.filter(item => item.name != 'System'); //不显示系统管理 menuList.value = menuList.value.filter(item => item.name != 'SponeScreen'); //不显示一张图 menuList1.value = menuList.value; - activeIndex.value = localStorage.getItem('routerPartXG'); //默认选中 + activeIndex.value = localStorage.getItem('routerPartKFC'); //默认选中 bus.on('closeUserCenter', e => { dialogShow.value = false; }); diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 3910848..17a10dd 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -88,7 +88,7 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index f63caad..ba8f4a1 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -58,7 +58,7 @@ // 菜单切换设置 function setMenuData() { - let key = localStorage.getItem('routerPartXG'); + let key = localStorage.getItem('routerPartKFC'); let routeArr = JSON.parse(JSON.stringify(permissionStore.sidebarRouters)); routeArr = routeArr.filter(item => item.path != '/index'); let paths = ''; @@ -69,7 +69,7 @@ } }); // 默认打开子系统的第一个页面 - if (localStorage.getItem('fromDoorXG') == 'chengguanweiScreen') { + if (localStorage.getItem('fromDoorKFC') == 'chengguanweiScreen') { console.log(newArr, 'newArr'); if (newArr.length == 0) { proxy.$modal.msgError('暂无权限查看该系统'); diff --git a/src/layout/index.vue b/src/layout/index.vue index 5ce324d..bdbdfad 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -89,7 +89,7 @@ // 默认收起菜单 function xgMenuSet() { - let key = localStorage.getItem('routerPartXG'); + let key = localStorage.getItem('routerPartKFC'); if (key == 'SponeScreen' || key == 'FloodSys' || key == 'Project' || key == 'DataAnalysis') { useAppStore().closeSideBar({ withoutAnimation: true }); } else { diff --git a/src/permission.js b/src/permission.js index 2d58b89..b51477d 100644 --- a/src/permission.js +++ b/src/permission.js @@ -18,9 +18,9 @@ // console.log(from.path, '111'); // 跳转各个子系统时只显示各自对应的菜单内容设置 if (from.path == '/chengguanweiScreen' || from.path == '/autoLogin') { - localStorage.setItem('fromDoorXG', 'chengguanweiScreen'); + localStorage.setItem('fromDoorKFC', 'chengguanweiScreen'); } else { - localStorage.setItem('fromDoorXG', 'other'); + localStorage.setItem('fromDoorKFC', 'other'); } NProgress.start(); if (getToken()) { diff --git a/src/layout/components/HeaderSys/index.vue b/src/layout/components/HeaderSys/index.vue index a06cbff..eab0e69 100644 --- a/src/layout/components/HeaderSys/index.vue +++ b/src/layout/components/HeaderSys/index.vue @@ -84,8 +84,8 @@ function getSelfMenu(item) { console.log(item, 'itemitem'); activeIndex.value = item.name; - localStorage.setItem('routerPartXG', item.name); - localStorage.setItem('fromDoorXG', 'chengguanweiScreen'); + localStorage.setItem('routerPartKFC', item.name); + localStorage.setItem('fromDoorKFC', 'chengguanweiScreen'); bus.emit('selfMenuXG', item); } @@ -124,14 +124,14 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } function goOneMap() { router.push({ path: '/chengguanweiScreen' }); - localStorage.setItem('routerPartXG', 'Project'); //默认加载项目首页 + localStorage.setItem('routerPartKFC', 'Project'); //默认加载项目首页 } // 消息弹框 @@ -152,7 +152,7 @@ menuList.value = menuList.value.filter(item => item.name != 'System'); //不显示系统管理 menuList.value = menuList.value.filter(item => item.name != 'SponeScreen'); //不显示一张图 menuList1.value = menuList.value; - activeIndex.value = localStorage.getItem('routerPartXG'); //默认选中 + activeIndex.value = localStorage.getItem('routerPartKFC'); //默认选中 bus.on('closeUserCenter', e => { dialogShow.value = false; }); diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 3910848..17a10dd 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -88,7 +88,7 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index f63caad..ba8f4a1 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -58,7 +58,7 @@ // 菜单切换设置 function setMenuData() { - let key = localStorage.getItem('routerPartXG'); + let key = localStorage.getItem('routerPartKFC'); let routeArr = JSON.parse(JSON.stringify(permissionStore.sidebarRouters)); routeArr = routeArr.filter(item => item.path != '/index'); let paths = ''; @@ -69,7 +69,7 @@ } }); // 默认打开子系统的第一个页面 - if (localStorage.getItem('fromDoorXG') == 'chengguanweiScreen') { + if (localStorage.getItem('fromDoorKFC') == 'chengguanweiScreen') { console.log(newArr, 'newArr'); if (newArr.length == 0) { proxy.$modal.msgError('暂无权限查看该系统'); diff --git a/src/layout/index.vue b/src/layout/index.vue index 5ce324d..bdbdfad 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -89,7 +89,7 @@ // 默认收起菜单 function xgMenuSet() { - let key = localStorage.getItem('routerPartXG'); + let key = localStorage.getItem('routerPartKFC'); if (key == 'SponeScreen' || key == 'FloodSys' || key == 'Project' || key == 'DataAnalysis') { useAppStore().closeSideBar({ withoutAnimation: true }); } else { diff --git a/src/permission.js b/src/permission.js index 2d58b89..b51477d 100644 --- a/src/permission.js +++ b/src/permission.js @@ -18,9 +18,9 @@ // console.log(from.path, '111'); // 跳转各个子系统时只显示各自对应的菜单内容设置 if (from.path == '/chengguanweiScreen' || from.path == '/autoLogin') { - localStorage.setItem('fromDoorXG', 'chengguanweiScreen'); + localStorage.setItem('fromDoorKFC', 'chengguanweiScreen'); } else { - localStorage.setItem('fromDoorXG', 'other'); + localStorage.setItem('fromDoorKFC', 'other'); } NProgress.start(); if (getToken()) { diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 1fb07a6..021832e 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -32,8 +32,8 @@ this.setSidebarRouters(constantRoutes.concat(sidebarRoutes)); resolve(rewriteRoutes); // 登录成功之后才默认加载菜单设置 - if (localStorage.getItem('fromDoorXG') == 'chengguanweiScreen') { - localStorage.setItem('routerPartXG', rewriteRoutes[1].name); //默认加载第一个菜单 + if (localStorage.getItem('fromDoorKFC') == 'chengguanweiScreen') { + localStorage.setItem('routerPartKFC', rewriteRoutes[1].name); //默认加载第一个菜单 } else { router.push({ path: '/chengguanweiScreen' }); } diff --git a/src/layout/components/HeaderSys/index.vue b/src/layout/components/HeaderSys/index.vue index a06cbff..eab0e69 100644 --- a/src/layout/components/HeaderSys/index.vue +++ b/src/layout/components/HeaderSys/index.vue @@ -84,8 +84,8 @@ function getSelfMenu(item) { console.log(item, 'itemitem'); activeIndex.value = item.name; - localStorage.setItem('routerPartXG', item.name); - localStorage.setItem('fromDoorXG', 'chengguanweiScreen'); + localStorage.setItem('routerPartKFC', item.name); + localStorage.setItem('fromDoorKFC', 'chengguanweiScreen'); bus.emit('selfMenuXG', item); } @@ -124,14 +124,14 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } function goOneMap() { router.push({ path: '/chengguanweiScreen' }); - localStorage.setItem('routerPartXG', 'Project'); //默认加载项目首页 + localStorage.setItem('routerPartKFC', 'Project'); //默认加载项目首页 } // 消息弹框 @@ -152,7 +152,7 @@ menuList.value = menuList.value.filter(item => item.name != 'System'); //不显示系统管理 menuList.value = menuList.value.filter(item => item.name != 'SponeScreen'); //不显示一张图 menuList1.value = menuList.value; - activeIndex.value = localStorage.getItem('routerPartXG'); //默认选中 + activeIndex.value = localStorage.getItem('routerPartKFC'); //默认选中 bus.on('closeUserCenter', e => { dialogShow.value = false; }); diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 3910848..17a10dd 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -88,7 +88,7 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index f63caad..ba8f4a1 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -58,7 +58,7 @@ // 菜单切换设置 function setMenuData() { - let key = localStorage.getItem('routerPartXG'); + let key = localStorage.getItem('routerPartKFC'); let routeArr = JSON.parse(JSON.stringify(permissionStore.sidebarRouters)); routeArr = routeArr.filter(item => item.path != '/index'); let paths = ''; @@ -69,7 +69,7 @@ } }); // 默认打开子系统的第一个页面 - if (localStorage.getItem('fromDoorXG') == 'chengguanweiScreen') { + if (localStorage.getItem('fromDoorKFC') == 'chengguanweiScreen') { console.log(newArr, 'newArr'); if (newArr.length == 0) { proxy.$modal.msgError('暂无权限查看该系统'); diff --git a/src/layout/index.vue b/src/layout/index.vue index 5ce324d..bdbdfad 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -89,7 +89,7 @@ // 默认收起菜单 function xgMenuSet() { - let key = localStorage.getItem('routerPartXG'); + let key = localStorage.getItem('routerPartKFC'); if (key == 'SponeScreen' || key == 'FloodSys' || key == 'Project' || key == 'DataAnalysis') { useAppStore().closeSideBar({ withoutAnimation: true }); } else { diff --git a/src/permission.js b/src/permission.js index 2d58b89..b51477d 100644 --- a/src/permission.js +++ b/src/permission.js @@ -18,9 +18,9 @@ // console.log(from.path, '111'); // 跳转各个子系统时只显示各自对应的菜单内容设置 if (from.path == '/chengguanweiScreen' || from.path == '/autoLogin') { - localStorage.setItem('fromDoorXG', 'chengguanweiScreen'); + localStorage.setItem('fromDoorKFC', 'chengguanweiScreen'); } else { - localStorage.setItem('fromDoorXG', 'other'); + localStorage.setItem('fromDoorKFC', 'other'); } NProgress.start(); if (getToken()) { diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 1fb07a6..021832e 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -32,8 +32,8 @@ this.setSidebarRouters(constantRoutes.concat(sidebarRoutes)); resolve(rewriteRoutes); // 登录成功之后才默认加载菜单设置 - if (localStorage.getItem('fromDoorXG') == 'chengguanweiScreen') { - localStorage.setItem('routerPartXG', rewriteRoutes[1].name); //默认加载第一个菜单 + if (localStorage.getItem('fromDoorKFC') == 'chengguanweiScreen') { + localStorage.setItem('routerPartKFC', rewriteRoutes[1].name); //默认加载第一个菜单 } else { router.push({ path: '/chengguanweiScreen' }); } diff --git a/src/utils/auth.js b/src/utils/auth.js index 28f454f..cbbacd3 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -1,6 +1,6 @@ import Cookies from 'js-cookie'; -const TokenKey = 'xiaogan-Token'; +const TokenKey = 'kaifeng-Token'; const ExpiresInKey = 'Admin-Expires-In'; diff --git a/src/layout/components/HeaderSys/index.vue b/src/layout/components/HeaderSys/index.vue index a06cbff..eab0e69 100644 --- a/src/layout/components/HeaderSys/index.vue +++ b/src/layout/components/HeaderSys/index.vue @@ -84,8 +84,8 @@ function getSelfMenu(item) { console.log(item, 'itemitem'); activeIndex.value = item.name; - localStorage.setItem('routerPartXG', item.name); - localStorage.setItem('fromDoorXG', 'chengguanweiScreen'); + localStorage.setItem('routerPartKFC', item.name); + localStorage.setItem('fromDoorKFC', 'chengguanweiScreen'); bus.emit('selfMenuXG', item); } @@ -124,14 +124,14 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } function goOneMap() { router.push({ path: '/chengguanweiScreen' }); - localStorage.setItem('routerPartXG', 'Project'); //默认加载项目首页 + localStorage.setItem('routerPartKFC', 'Project'); //默认加载项目首页 } // 消息弹框 @@ -152,7 +152,7 @@ menuList.value = menuList.value.filter(item => item.name != 'System'); //不显示系统管理 menuList.value = menuList.value.filter(item => item.name != 'SponeScreen'); //不显示一张图 menuList1.value = menuList.value; - activeIndex.value = localStorage.getItem('routerPartXG'); //默认选中 + activeIndex.value = localStorage.getItem('routerPartKFC'); //默认选中 bus.on('closeUserCenter', e => { dialogShow.value = false; }); diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 3910848..17a10dd 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -88,7 +88,7 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index f63caad..ba8f4a1 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -58,7 +58,7 @@ // 菜单切换设置 function setMenuData() { - let key = localStorage.getItem('routerPartXG'); + let key = localStorage.getItem('routerPartKFC'); let routeArr = JSON.parse(JSON.stringify(permissionStore.sidebarRouters)); routeArr = routeArr.filter(item => item.path != '/index'); let paths = ''; @@ -69,7 +69,7 @@ } }); // 默认打开子系统的第一个页面 - if (localStorage.getItem('fromDoorXG') == 'chengguanweiScreen') { + if (localStorage.getItem('fromDoorKFC') == 'chengguanweiScreen') { console.log(newArr, 'newArr'); if (newArr.length == 0) { proxy.$modal.msgError('暂无权限查看该系统'); diff --git a/src/layout/index.vue b/src/layout/index.vue index 5ce324d..bdbdfad 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -89,7 +89,7 @@ // 默认收起菜单 function xgMenuSet() { - let key = localStorage.getItem('routerPartXG'); + let key = localStorage.getItem('routerPartKFC'); if (key == 'SponeScreen' || key == 'FloodSys' || key == 'Project' || key == 'DataAnalysis') { useAppStore().closeSideBar({ withoutAnimation: true }); } else { diff --git a/src/permission.js b/src/permission.js index 2d58b89..b51477d 100644 --- a/src/permission.js +++ b/src/permission.js @@ -18,9 +18,9 @@ // console.log(from.path, '111'); // 跳转各个子系统时只显示各自对应的菜单内容设置 if (from.path == '/chengguanweiScreen' || from.path == '/autoLogin') { - localStorage.setItem('fromDoorXG', 'chengguanweiScreen'); + localStorage.setItem('fromDoorKFC', 'chengguanweiScreen'); } else { - localStorage.setItem('fromDoorXG', 'other'); + localStorage.setItem('fromDoorKFC', 'other'); } NProgress.start(); if (getToken()) { diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 1fb07a6..021832e 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -32,8 +32,8 @@ this.setSidebarRouters(constantRoutes.concat(sidebarRoutes)); resolve(rewriteRoutes); // 登录成功之后才默认加载菜单设置 - if (localStorage.getItem('fromDoorXG') == 'chengguanweiScreen') { - localStorage.setItem('routerPartXG', rewriteRoutes[1].name); //默认加载第一个菜单 + if (localStorage.getItem('fromDoorKFC') == 'chengguanweiScreen') { + localStorage.setItem('routerPartKFC', rewriteRoutes[1].name); //默认加载第一个菜单 } else { router.push({ path: '/chengguanweiScreen' }); } diff --git a/src/utils/auth.js b/src/utils/auth.js index 28f454f..cbbacd3 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -1,6 +1,6 @@ import Cookies from 'js-cookie'; -const TokenKey = 'xiaogan-Token'; +const TokenKey = 'kaifeng-Token'; const ExpiresInKey = 'Admin-Expires-In'; diff --git a/src/views/autoLogin/index.vue b/src/views/autoLogin/index.vue index 1c18713..298085d 100644 --- a/src/views/autoLogin/index.vue +++ b/src/views/autoLogin/index.vue @@ -37,7 +37,7 @@ router.push('/door'); } onMounted(() => { - localStorage.removeItem('fromDoorXG'); + localStorage.removeItem('fromDoorKFC'); }); diff --git a/src/layout/components/HeaderSys/index.vue b/src/layout/components/HeaderSys/index.vue index a06cbff..eab0e69 100644 --- a/src/layout/components/HeaderSys/index.vue +++ b/src/layout/components/HeaderSys/index.vue @@ -84,8 +84,8 @@ function getSelfMenu(item) { console.log(item, 'itemitem'); activeIndex.value = item.name; - localStorage.setItem('routerPartXG', item.name); - localStorage.setItem('fromDoorXG', 'chengguanweiScreen'); + localStorage.setItem('routerPartKFC', item.name); + localStorage.setItem('fromDoorKFC', 'chengguanweiScreen'); bus.emit('selfMenuXG', item); } @@ -124,14 +124,14 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } function goOneMap() { router.push({ path: '/chengguanweiScreen' }); - localStorage.setItem('routerPartXG', 'Project'); //默认加载项目首页 + localStorage.setItem('routerPartKFC', 'Project'); //默认加载项目首页 } // 消息弹框 @@ -152,7 +152,7 @@ menuList.value = menuList.value.filter(item => item.name != 'System'); //不显示系统管理 menuList.value = menuList.value.filter(item => item.name != 'SponeScreen'); //不显示一张图 menuList1.value = menuList.value; - activeIndex.value = localStorage.getItem('routerPartXG'); //默认选中 + activeIndex.value = localStorage.getItem('routerPartKFC'); //默认选中 bus.on('closeUserCenter', e => { dialogShow.value = false; }); diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 3910848..17a10dd 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -88,7 +88,7 @@ userStore.logOut().then(() => { location.href = '/'; }); - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token }) .catch(() => {}); } diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index f63caad..ba8f4a1 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -58,7 +58,7 @@ // 菜单切换设置 function setMenuData() { - let key = localStorage.getItem('routerPartXG'); + let key = localStorage.getItem('routerPartKFC'); let routeArr = JSON.parse(JSON.stringify(permissionStore.sidebarRouters)); routeArr = routeArr.filter(item => item.path != '/index'); let paths = ''; @@ -69,7 +69,7 @@ } }); // 默认打开子系统的第一个页面 - if (localStorage.getItem('fromDoorXG') == 'chengguanweiScreen') { + if (localStorage.getItem('fromDoorKFC') == 'chengguanweiScreen') { console.log(newArr, 'newArr'); if (newArr.length == 0) { proxy.$modal.msgError('暂无权限查看该系统'); diff --git a/src/layout/index.vue b/src/layout/index.vue index 5ce324d..bdbdfad 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -89,7 +89,7 @@ // 默认收起菜单 function xgMenuSet() { - let key = localStorage.getItem('routerPartXG'); + let key = localStorage.getItem('routerPartKFC'); if (key == 'SponeScreen' || key == 'FloodSys' || key == 'Project' || key == 'DataAnalysis') { useAppStore().closeSideBar({ withoutAnimation: true }); } else { diff --git a/src/permission.js b/src/permission.js index 2d58b89..b51477d 100644 --- a/src/permission.js +++ b/src/permission.js @@ -18,9 +18,9 @@ // console.log(from.path, '111'); // 跳转各个子系统时只显示各自对应的菜单内容设置 if (from.path == '/chengguanweiScreen' || from.path == '/autoLogin') { - localStorage.setItem('fromDoorXG', 'chengguanweiScreen'); + localStorage.setItem('fromDoorKFC', 'chengguanweiScreen'); } else { - localStorage.setItem('fromDoorXG', 'other'); + localStorage.setItem('fromDoorKFC', 'other'); } NProgress.start(); if (getToken()) { diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 1fb07a6..021832e 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -32,8 +32,8 @@ this.setSidebarRouters(constantRoutes.concat(sidebarRoutes)); resolve(rewriteRoutes); // 登录成功之后才默认加载菜单设置 - if (localStorage.getItem('fromDoorXG') == 'chengguanweiScreen') { - localStorage.setItem('routerPartXG', rewriteRoutes[1].name); //默认加载第一个菜单 + if (localStorage.getItem('fromDoorKFC') == 'chengguanweiScreen') { + localStorage.setItem('routerPartKFC', rewriteRoutes[1].name); //默认加载第一个菜单 } else { router.push({ path: '/chengguanweiScreen' }); } diff --git a/src/utils/auth.js b/src/utils/auth.js index 28f454f..cbbacd3 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -1,6 +1,6 @@ import Cookies from 'js-cookie'; -const TokenKey = 'xiaogan-Token'; +const TokenKey = 'kaifeng-Token'; const ExpiresInKey = 'Admin-Expires-In'; diff --git a/src/views/autoLogin/index.vue b/src/views/autoLogin/index.vue index 1c18713..298085d 100644 --- a/src/views/autoLogin/index.vue +++ b/src/views/autoLogin/index.vue @@ -37,7 +37,7 @@ router.push('/door'); } onMounted(() => { - localStorage.removeItem('fromDoorXG'); + localStorage.removeItem('fromDoorKFC'); }); diff --git a/src/views/login.vue b/src/views/login.vue index 7b8d80e..07edb31 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -127,7 +127,7 @@ .then(res => { // 登录成功之后都加载对应路由 router.push({ path: '/chengguanweiScreen' }); - localStorage.setItem('routerPartXG', 'Project'); //默认加载排水首页 + localStorage.setItem('routerPartKFC', 'Project'); //默认加载项目综合管控首页 loginLoading.value = false; }) .catch(err => { @@ -162,11 +162,9 @@ } onMounted(() => { - Cookies.remove('xiaogan-Token'); //清除token + Cookies.remove('kaifeng-Token'); //清除token localStorage.removeItem('routerPartKFC'); localStorage.removeItem('fromDoorKFC'); - localStorage.removeItem('routerPartXG'); - localStorage.removeItem('fromDoorXG'); getCode(); getCookie(); }); @@ -177,7 +175,6 @@ .formCenter { width: 460px; padding: 20px; - // background: #fff; background: url('@/assets/images/login/LoginBox.png') no-repeat; background-size: 100% 100%; border-radius: 8px;