<template>
  <iframe :src="iframeURL"
    frameborder="0"
    width="100%"
    height="800px"></iframe>
</template>

<script setup>
import { useRoute } from 'vue-router'
import { getTicketId } from '@/api'
import { onMounted } from 'vue'
const route = useRoute()
const ticket = ref('')
const iframeURL = ref('')
onMounted(() => {
  getTicketId({
    id: route.query.id
  }).then(response => {
    ticket.value = response.data.accessTicket
    iframeURL.value = `${route.query.url}&accessTicket=${ticket.value}`
  })
})
</script>
<style scoped></style>