<template>
  <div>
    <iframe id="envT" :src="envUrl" style="width:100%;" scrolling="yes" frameborder="0" :height="iframeHeight" />
  </div>
</template>

<script>
// import { envTag, host } from '@/apiConfig/requestIP.js'
export default {
  name: 'Automation',
  data() {
    return {
      show: true,
      iframeHeight: '720px'
    }
  },
  computed: {
    envUrl() {
      return `http://api-kylin-xg02.intra.xiaojukeji.com/tech_esfe_tr_h5_platform_mars_test#` + this.$route.name
      //   return envTag === 'test' ? ' http://api-kylin-xg02.intra.xiaojukeji.com/tech_esfe_tr_h5_platform_dev_multi_service_support_test' : ' http://api-kylin-xg02.intra.xiaojukeji.com/tech_esfe_tr_h5_platform_mars_test'
    }
  },
  mounted() {
    const envT = document.getElementById('envT')
    envT.countWindow.postMessage('zhihui', '*')
    var height = window.innerHeight > document.body.clientHeight ? window.innerHeight : document.body.clientHeight
    this.iframeHeight = height + 'px'
  }
}
</script>

