<template>
  <div id="app">
    <Ediheader></Ediheader>
     <router-view v-if="isRouterAlive"></router-view>
     <errorPage></errorPage>
  </div>
</template>

<script>
import Ediheader from '@components/layout/header'
import errorPage from '@components/layout/error_dialog_page'
// import axios from 'axios'
export default {
  components: {
    Ediheader,
    errorPage
  },
  name: 'app',
  provide() {
    return {
      reload: this.reload
    }
  },
  data() {
    return {
      isRouterAlive: true,
      setting: {}
    }
  },
  mounted() {
    this.$API.get('')
  },
  methods: {

  },
  computed: {
    key() {
      return this.$route.name ? this.$route.name + MathRand() : MathRand()
    }
  }
}
function MathRand() {
  let a = ''
  for (var i = 0; i < 6; i++) {
    a += Math.floor(Math.random() * 10)
  }
  return a
}
</script>

<style>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
</style>
