fix: 解决 sso 登录跳转之后又执行signout的问题
This commit is contained in:
parent
2b6c627e14
commit
817fc25bb8
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue