lcw
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useStore } from "vuex";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useRouter,useRoute } from "vue-router";
|
||||
import {
|
||||
setItem
|
||||
} from "@/utils/storage";
|
||||
@ -11,13 +11,17 @@ const loginDialog = ref(false);
|
||||
const deptList = ref([]);
|
||||
const store = useStore();
|
||||
function redirectAuth() {
|
||||
let token = location.hash.slice(20) || null;
|
||||
// 从路由参数中获取token
|
||||
const route = useRoute();
|
||||
let token = route.query.token || null;
|
||||
console.log(token,"xxxxxxxx");
|
||||
|
||||
if (token != null) {
|
||||
token = token.replace(/\ +/g, "");
|
||||
setItem("SSOTOKEN", token)
|
||||
handleLogin({ token: token});
|
||||
} else {
|
||||
window.location.href = `http://155.240.22.102:40992`;
|
||||
window.location.href = `http://155.240.22.188:9020`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user