<!--
 * @Author: jixiang
 * @Date: 2021-09-10 09:23:17
 * @Description: 
 * @FilePath: /suqian_pc_new/src/views/login/toCasLogin.vue
 * One World One Drefeel(56580223@qq.com)
-->
<!--  -->
<template>
  <div class=""></div>
</template>

<script setup lang="ts">
import { onMounted, computed } from 'vue';
import { mapGetters } from 'vuex';
import { useRoute, useRouter } from 'vue-router';
// import microserviceRouter from '@/config/microserviceRouter';

const route = useRoute();
const router = useRouter();
// const app = computed(() => mapGetters(['website']));
const firstPage = '/';
// import引入的组件需要注入到对象中才能使用
const cas = () => {
  let frontUrl = window.location.href;
  frontUrl = frontUrl.substring(0, frontUrl.indexOf('/toCasLogin'));
  let toUrl: any = route.query.toUrl ? route.query.toUrl : '/bookList';
  let thirdPartyName = route.query.thirdPartyName ? route.query.thirdPartyName : '';
  let paths =
    '/fighter-integrate-uaap/integrate/uaap/cas/to-cas-login?next=' +
    encodeURIComponent(toUrl) +
    '&thirdPartyName=' +
    thirdPartyName +
    '&frontUrl=' +
    encodeURIComponent(frontUrl + '/casLogin');
  let method = 'GET';
  window.location.href = import.meta.env.VITE_APP_BASE_URL + paths;
};
// 生命周期 - 挂载完成（可以访问DOM元素）
onMounted(() => {
  console.log('cas');
  cas();
});
</script>
<!-- <style lang="scss" scoped>
  //@import url(); 引入公共css类
</style> -->
