<script setup lang="ts">
import { computed } from 'vue';
import { useRoute } from 'vue-router';

const route = useRoute();
// @ts-ignore
window.BACKEND_VERSION = 'V2';

const url = computed(() => {
  const token = localStorage.getItem('token_a');
  const { enterpriseCode, webSite, name } = route.query;
  if(name) {
    document.title = name as string
  }
  return `${webSite || 'http://ab.dev.jbpm.shalu.com'}/api/enterpriselogin/doLoginByToken?enterpriseCode=${enterpriseCode || ''}&token=${token || ''}`;
});

</script>

<template>
  <iframe
    id="jumpIF"
    :src="url"
    style="width: 100vw; height: 100vh; border: 0"
  ></iframe>
</template>
