Commit f695bd72 authored by “yiyousong”'s avatar “yiyousong”

pref:修改全局路由守卫

parent f4d73834
......@@ -2,7 +2,8 @@ import { hasAuthority } from "@/utils/authority-utils";
// import {loginIgnore} from '@/router/index'
// import {checkAuthorization} from '@/utils/request'
import NProgress from "nprogress";
import local from "@/utils/local";
// import local from "@/utils/local";
import store from "@/store/index";
NProgress.configure({ showSpinner: false });
......@@ -28,7 +29,8 @@ const progressStart = (to, from, next) => {
* @param options
*/
const loginGuard = (to, from, next) => {
let token = local.getLocal("token") ? true : false;
// let token = local.getLocal("token") ? true : false;
let token = store.getters["site/token"];
if (token) {
next();
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment