优化代码

This commit is contained in:
不做码农
2021-12-04 08:24:38 +08:00
parent ea81780636
commit 94d586ee9e
8 changed files with 20 additions and 12 deletions

View File

@@ -17,7 +17,7 @@ const whiteList = ['/login', '/auth-redirect', '/bind', '/register', '/demo']
router.beforeEach((to, from, next) => {
NProgress.start()
console.log(to.path);
console.log('router to ' + to.path);
const hasToken = getToken()
if (hasToken) {

View File

@@ -21,11 +21,11 @@ const permission = {
},
SET_TOPBAR_ROUTES: (state, routes) => {
// 顶部导航菜单默认添加统计报表栏指向首页
// const index = [{
// path: 'index',
// meta: { title: '系统首页', icon: 'dashboard' }
// }]
state.topbarRouters = routes; //.concat(index);
const index = [{
// path: 'index',
// meta: { title: '系统首页', icon: 'dashboard' }
}]
state.topbarRouters = routes;//.concat(index);
},
SET_SIDEBAR_ROUTERS: (state, routes) => {
state.sidebarRouters = routes