isv-robot 2 年之前
父節點
當前提交
fbc95baa10
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      src/permission.js

+ 2 - 3
src/permission.js

@@ -8,9 +8,9 @@ import getPageTitle from '@/utils/get-page-title'
 
 NProgress.configure({showSpinner: false}) // NProgress Configuration
 
-const whiteList = ['/login', '/auth-redirect','/dashboard-screen', '/login1'] // no redirect whitelist
+const whiteList = ['/login', '/auth-redirect', '/login1'] // no redirect whitelist
 
-router.beforeEach(async(to, from, next) => {
+router.beforeEach(async (to, from, next) => {
   // start progress bar
   NProgress.start()
 
@@ -23,7 +23,6 @@ router.beforeEach(async(to, from, next) => {
   if (hasToken) {
     if (to.path === '/login') {
       // if is logged in, redirect to the home page
-      next({path: '/dashboard-screen'})
       NProgress.done() // hack: https://github.com/PanJiaChen/vue-element-admin/pull/2939
     }
     // if (to.path === '/index') {