<template>
    <iframe :src="iframeSrc" :height="height" width="100%" class="iframe"> </iframe>
</template>
<script>
import { mapState } from 'vuex'

export default {
    created() {
        this.getIframeSrc();
    },
    data() {
        return {
            iframeSrc: '/404',
        }
    },
    computed: {
        height() {
            return window.innerHeight - 104 + 'px'
        }
    },
    methods: {
        getIframeSrc() {

            this.iframeSrc = this.$route.query.code;

        },
    },
    watch: {
        $route() {
            this.getIframeSrc()
        }
    },

}
</script>
<style lang="less" scoped>
.iframe {
    border: none;
}
</style>
