fix: 解决 sso 登录跳转之后又执行signout的问题

This commit is contained in:
Captain.B 2021-01-26 17:50:08 +08:00
parent 2b6c627e14
commit 817fc25bb8
1 changed files with 2 additions and 3 deletions

View File

@ -1,7 +1,6 @@
import Vue from "vue";
import VueRouter from 'vue-router'
import RouterSidebar from "./RouterSidebar";
import axios from "axios";
import Setting from "@/business/components/settings/router";
import API from "@/business/components/api/router";
import Performance from "@/business/components/performance/router";
@ -31,8 +30,8 @@ router.beforeEach((to, from, next) => {
//解决localStorage清空cookie没失效导致的卡死问题
if (!localStorage.getItem('Admin-Token')) {
axios.get("/signout");
console.log("signout");
// axios.get("/signout");
// console.log("signout");
localStorage.setItem('Admin-Token', "{}");
window.location.href = "/login";
next();