<template>
  <div id="app" style="height: 775px">
    <iframe
      class="placeholder"
      frameborder="0"
      scrolling="auto"
      :src="
        'diy-mobile/index.html?page_id=' +
        page_id +
        '&api_url=' +
        encodeURIComponent(URL.api_url) +
        '&admin_url=' +
        encodeURIComponent(URL.admin_url) +
        '&authorization=' +
        encodeURIComponent(authorization) +
        '&uploadUrl=' + encodeURIComponent(URL.upload)
      "
      style="width: 100%; height: 770px"
    ></iframe>
  </div>
</template>

<script>
  import { URL } from '@/config'
  import { getToken } from '@/utils/token'
  import { mapGetters } from 'vuex'

  export default {
    name: 'AppTemplate',
    components: {},
    data() {
      return {
        URL: URL,
        authorization: '',
      }
    },
    computed: {
      ...mapGetters({
        token: 'user/token',
      }),
    },
    created() {
      this.authorization = getToken()
    },
    methods: {
    },
  }
</script>
