This commit is contained in:
13684185576
2025-07-22 09:53:52 +08:00
parent 11ec0b2d13
commit 6e5853d852
476 changed files with 528 additions and 125899 deletions

View File

@ -1,34 +1,33 @@
<template></template>
<script setup>
import { ref, onMounted } from "vue";
import { useStore } from "vuex";
import { useRouter } from "vue-router";
import { setItem } from "@/utils/storage";
import {
setItem
} from "@/utils/storage";
const loginDialog = ref(false);
const deptList = ref([]);
const deptId = ref("");
const store = useStore();
const origin = location.origin;
function redirectAuth() {
let search = window.location.search;
let params = new URLSearchParams(search);
let token = params.get("token");
let token = location.hash.slice(20) || null;
if (token != null) {
setItem("SSOTOKEN", token);
handleLogin({ token: token, systemId: "XLFK_ZHJMXFZAGK" });
debugger
token = token.replace(/\ +/g, "");
setItem("SSOTOKEN", token)
handleLogin({ token: token});
} else {
window.location.href = `https://80.60.20.10`;
window.location.href = `http://155.240.22.188:9020`;
}
}
const handleLogin = (e) => {
store.dispatch("user/oatuhLogin", e).then((res) => {
console.log("登录后操作");
console.log(res);
// 登录后操作
if (res.deptList.length === 1) {
window.location.href = "/";
window.location.hash = "/";
} else {
deptList.value = [...res.deptList];
loginDialog.value = true;
@ -40,6 +39,5 @@ onMounted(() => {
redirectAuth();
});
</script>
<style>
</style>
<style></style>