<template>
  <div id="index">
    <el-row>
      <el-col :span="24" class="style">
        <el-col :span="24" class="top">
          <topInfo></topInfo>
        </el-col>
        <el-col :span="24" class="main">
          <mainData></mainData>
        </el-col>
        <el-col :span="24" class="foot">
          <footInfo></footInfo>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import topInfo from '@/layout/common/topInfo.vue';
import footInfo from '@/layout/common/footInfo.vue';
import mainData from '@/layout/index/mainData.vue';
import { createNamespacedHelpers, mapGetters } from 'vuex';
const { mapActions: mapStudent } = createNamespacedHelpers('student');
export default {
  name: 'index',
  props: {},
  components: {
    topInfo, //头部导航
    footInfo, //底部导航
    mainData, //课程安排主体
  },
  data: () => ({}),
  created() {
    this.searchSite();
  },
  computed: {},
  methods: {
    ...mapStudent(['fetch']),
    async searchSite() {
      const res = await this.fetch('5e4f3d096a90e861b0f30871');
      sessionStorage.setItem('site', JSON.stringify(res.data));
    },
  },
};
</script>

<style lang="less" scoped>
.style {
  width: 100%;
  min-height: 667px;
  position: relative;
  background-color: #f9fafc;
}
.top {
  height: 46px;
  overflow: hidden;
}
.main {
  min-height: 570px;
}
.foot {
  height: 50px;
  overflow: hidden;
}
</style>
