|
@@ -2,7 +2,7 @@ import router from "@/router/index.js";
|
|
|
import store from "@/store";
|
|
|
import NProgress from "nprogress";
|
|
|
import "./progress.css";
|
|
|
-import { getToken, getUserName } from "@/utils/auth";
|
|
|
+import { getUserName } from "@/utils/auth";
|
|
|
import _ from "lodash";
|
|
|
|
|
|
const { initSettings, getSetting, getSettings } = window.systemParamsUtils;
|
|
@@ -56,24 +56,6 @@ function noNeedLogin(to, from, next) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- * 如果是Oauth2登录并且地址栏上有code字段,则去请求access_token
|
|
|
- * @param queryObject 地址栏上的参数
|
|
|
- */
|
|
|
-async function getAccessToken(queryObject) {
|
|
|
- let code = queryObject.code.split("#/")[0];
|
|
|
- try {
|
|
|
- await store.dispatch("GetOAuthToken", { code });
|
|
|
- if (getToken()) {
|
|
|
- window.location.href = "http://" + window.location.host + decodeURIComponent(window.location.pathname);
|
|
|
- }
|
|
|
- } catch (reason) {
|
|
|
- console.error(reason);
|
|
|
- store.dispatch("FedLogout").then(() => {
|
|
|
- location.reload();
|
|
|
- });
|
|
|
- }
|
|
|
-}
|
|
|
|
|
|
|
|
|
* 检查是否在白名单中,进行页面跳转
|