组织机构可配置区域、类型、层级

支持cas登录
This commit is contained in:
yaoyn
2024-09-19 15:47:06 +08:00
parent 78b05fc000
commit 54def95458
8 changed files with 377 additions and 260 deletions

View File

@ -0,0 +1,40 @@
<template>
<div style="width: 100%; height: 300px; display: flex;justify-content: center;align-items: center;">
<a-spin />
</div>
</template>
<script lang="ts" setup>
import { useUserStore } from '/@/store/modules/user';
import { onMounted } from 'vue';
import { useRouter } from 'vue-router';
const { currentRoute } = useRouter();
const userStore = useUserStore();
onMounted(async () => {
const fullPath = currentRoute.value.fullPath;
let targetURL = ''
let redirect = ''
if (fullPath.includes('targetURL')) {
const list = fullPath.split('targetURL=');
targetURL = list[1];
} else {
const list = fullPath.split('redirect=');
redirect = list[1];
}
let params = {...currentRoute.value.query, targetURL: targetURL,redirect: redirect, mode: 'none',goHome:true }; //不要默认的错误提示
const token=currentRoute.value.query?.token;
//cas ticket的话走一遍后端换成token
const ticket=currentRoute.value.query?.ticket;
if(ticket){
params.ticket=ticket;
await userStore.casLogin(params);
}else if (token) {
await userStore.tokenLogin(token,params);
}
});
</script>
<style lang="less">
</style>