From 00a4538b06beaf8b21dfdc6c4cec25e61ebc0ee5 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 23 五月 2023 09:15:35 +0800
Subject: [PATCH] 1.递交

---
 src/permission.js |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/permission.js b/src/permission.js
index fd74217..887ea67 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -1,16 +1,16 @@
 import router from './router'
 import store from './store'
-import { Message } from 'element-ui'
+import {Message} from 'element-ui'
 import NProgress from 'nprogress' // progress bar
 import 'nprogress/nprogress.css' // progress bar style
-import { getCookie, getToken } from '@/utils/auth' // get token from cookie
+import {getCookie, getToken} from '@/utils/auth' // get token from cookie
 import getPageTitle from '@/utils/get-page-title'
 
-NProgress.configure({ showSpinner: false }) // NProgress Configuration
+NProgress.configure({showSpinner: false}) // NProgress Configuration
 
-const whiteList = ['/login', '/zhkb', '/ckgl', '/cgdd', '/bzcj', '/dccj', '/zpcj', '/back'] // no redirect whitelist
+const whiteList = ['/login', '/jgcj', '/zpcj', '/ckgl', '/zp1', '/zp2', '/zp3'] // no redirect whitelist
 
-router.beforeEach(async(to, from, next) => {
+router.beforeEach(async (to, from, next) => {
   // start progress bar
   NProgress.start()
 
@@ -23,7 +23,7 @@
   if (hasToken) {
     if (to.path === '/login') {
       // if is logged in, redirect to the home page
-      next({ path: '/' })
+      next({path: '/'})
       NProgress.done()
     } else {
       const hasGetUserInfo = store.getters.name
@@ -42,7 +42,7 @@
           router.addRoutes(store.getters.addRouters)
 
           // hack鏂规硶 纭繚addRoutes宸插畬鎴�
-          next({ ...to, replace: true })
+          next({...to, replace: true})
 
           // next()
         } catch (error) {

--
Gitblit v1.9.3