index.vue 1002 B

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <div>
  3. <iframe id="envT" :src="envUrl" style="width:100%;" scrolling="yes" frameborder="0" :height="iframeHeight" />
  4. </div>
  5. </template>
  6. <script>
  7. // import { envTag, host } from '@/apiConfig/requestIP.js'
  8. export default {
  9. name: 'Automation',
  10. data() {
  11. return {
  12. show: true,
  13. iframeHeight: '720px'
  14. }
  15. },
  16. computed: {
  17. envUrl() {
  18. return `https://api-kylin-xg02.intra.xiaojukeji.com/tech_esfe_tr_h5_platform_mars_test#` + this.$route.name
  19. // return envTag === 'test' ? ' https://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'
  20. }
  21. },
  22. mounted() {
  23. const envT = document.getElementById('envT')
  24. envT.countWindow.postMessage('zhihui', '*')
  25. var height = window.innerHeight > document.body.clientHeight ? window.innerHeight : document.body.clientHeight
  26. this.iframeHeight = height + 'px'
  27. }
  28. }
  29. </script>