App.vue 1.19 KB
<template>
  <div id="app" class="blue">
    <router-view />
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },

  created() {
    let menus = JSON.parse(localStorage.getItem("menu"));
    if (menus) {
      this.$store.dispatch("GetMenuRole", menus).then(res => {});
    }
    let token = localStorage.getItem("atoken");
    if (!token) {
      this.$router.push("/login");
    }
  },
  mounted() {
    window.videoEquitTableHeight = document.body.clientHeight - 142 + "px";
    window.opsTableHeight = document.body.clientHeight - 260 + "px";
    if (document.body.clientWidth > 1366) {
      window.oneSearchTableHeight = document.body.clientHeight - 250 + "px";
      window.twoSearchTableHeight = document.body.clientHeight - 280 + "px";
    } else {
      window.oneSearchTableHeight = document.body.clientHeight - 280 + "px";
      window.twoSearchTableHeight = document.body.clientHeight - 315 + "px";
    }
  }
};
</script>
<style lang="scss">
#app {
  height: 100%;
  font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
</style>