iframeView.vue 493 B

1234567891011121314151617181920212223
  1. <template>
  2. <iframe :src="url" height="99.5%" width="100%" frameBorder="0" />
  3. </template>
  4. <script>
  5. import { getToken } from '@/utils/auth'
  6. export default {
  7. data() {
  8. return {
  9. token: getToken()
  10. }
  11. },
  12. computed: {
  13. url() {
  14. if (!!~this.$route.meta.url.indexOf("?x-token=")) {
  15. return this.$route.meta.url && this.token ? `${this.$route.meta.url}${this.token}` : ''
  16. } else {
  17. return this.$route.meta.url
  18. }
  19. }
  20. }
  21. }
  22. </script>
  23. <style></style>