<template>
  <div id="app" style="{background:'#002976'}">
    <header-view class="headerView"></header-view>
    <router-view class="content" />
  </div>
</template>

<script>
import headerView from './components/SD-school/header-view'
export default {
  components:{headerView},
  data() {
    return {
      resizeTime: true,
    };
  },
  mounted() {
    this.getWeater()
    window.addEventListener("resize", () => this.resizeTimeActions(), true);
  },
  methods: {
    resizeTimeActions() {
      if (!this.resizeTime) return;
      this.resizeTime = false;
      setTimeout(() => {
        this.resizeTime = true;
        this.$store.commit("changClient",  document.documentElement.clientWidth + document.documentElement.clientHeight);
      }, 300);
    },
    async getWeater(){
      // let res = await this.$axios.get('/top/listWeather?'+this.$qs.stringify({ area: '上海市' }))
      // if(res.success){
      //   this.$store.commit("changWeater", res.data.showapi_res_body.now);
      // }
    }
  },
};
</script>

<style lang="scss">
#app {
  width: 100%;
  height: 100%;
  background: url('./assets/image/bg.png') no-repeat;
  background-size: 100% 100%;
  color: #fff;
  display: flex;
  flex-direction: column;
  .content{
    width: 100%;
    height: calc(100% - 60px);
  }
  .content-AF{
    width: 100%;
    height: calc(100% - 85px);
    padding-bottom: 0px;
  }
  .headerView{
    width: 100%;
    height: 60px;
  }
  .headerView-af{
    width: 100%;
    height: 85px;
  }
}
</style>
