From 23f920eb107c284270c925d354f5623a515d7189 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期二, 17 六月 2025 15:09:27 +0800 Subject: [PATCH] 测试完成 --- src/permission.js | 4 +++- src/router/index.js | 54 +++++++++++++++++++++++++++--------------------------- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/src/permission.js b/src/permission.js index c36698f..a7b0f89 100644 --- a/src/permission.js +++ b/src/permission.js @@ -8,9 +8,11 @@ NProgress.configure({ showSpinner: false }) -const whiteList = ['/login', '/auth-redirect', '/bind', '/register','/wt','/xj','/sf', '/outsideChain','/outsideChainwt','/outsideChainxj'] +const whiteList = ['/login', '/auth-redirect', '/bind', '/register','/wxsf/wt','/xj','/sf', '/outsideChain','/outsideChainwt','/outsideChainxj'] router.beforeEach((to, from, next) => { NProgress.start() + console.log(to,'toto'); + if (getToken()) { to.meta.title && store.dispatch('settings/setTitle', to.meta.title) /* has token*/ diff --git a/src/router/index.js b/src/router/index.js index 4ccc2b8..ccfedee 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -96,33 +96,33 @@ component: () => import('@/views/error/401'), hidden: true }, - // { - // path: '', - // component: Layout, - // redirect: 'index', - // children: [ - // { - // path: 'index', - // component: () => import('@/views/index'), - // name: 'Index', - // meta: { title: '棣栭〉', icon: 'dashboard', affix: true } - // } - // ] - // }, - // { - // path: '/user', - // component: Layout, - // hidden: true, - // redirect: 'noredirect', - // children: [ - // { - // path: 'profile', - // component: () => import('@/views/system/user/profile/index'), - // name: 'Profile', - // meta: { title: '涓汉涓績', icon: 'user' } - // } - // ] - // } + { + path: '', + component: Layout, + redirect: 'index', + children: [ + { + path: 'index', + component: () => import('@/views/index'), + name: 'Index', + meta: { title: '棣栭〉', icon: 'dashboard', affix: true } + } + ] + }, + { + path: '/user', + component: Layout, + hidden: true, + redirect: 'noredirect', + children: [ + { + path: 'profile', + component: () => import('@/views/system/user/profile/index'), + name: 'Profile', + meta: { title: '涓汉涓績', icon: 'user' } + } + ] + } ] // 鍔ㄦ�佽矾鐢憋紝鍩轰簬鐢ㄦ埛鏉冮檺鍔ㄦ�佸幓鍔犺浇 -- Gitblit v1.9.3