WXL
15 小时以前 23f920eb107c284270c925d354f5623a515d7189
测试完成
已修改2个文件
58 ■■■■ 文件已修改
src/permission.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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*/
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' }
      }
    ]
  }
]
// 动态路由,基于用户权限动态去加载