<template>
  <div id="index">
    <el-row>
      <el-col :span="24">
        <el-col :span="24">
          <top :infoMes="infoMes"></top>
        </el-col>
        <el-col :span="24">
          <menus></menus>
        </el-col>
        <el-col :span="24" class="info">
          <div class="w_1200"></div>
        </el-col>
        <el-col :span="24">
          <foot :infoMes="infoMes"></foot>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';
import top from '../../components/common/top.vue';
import menus from '../../components/common/menus.vue';
import foot from '../../components/common/foot1.vue';
const { mapActions: siteInfo } = createNamespacedHelpers('siteInfo');
export default {
  metaInfo() {
    return { title: this.$route.meta.title };
  },
  name: 'index',
  props: {},
  components: {
    menus,
    top,
    foot,
  },
  data: function() {
    return {
      //头尾信息
      infoMes: {},
    };
  },
  created() {
    this.search();
  },
  methods: {
    ...siteInfo({ sitequery: 'query' }),
    async search() {
      const res1 = await this.sitequery();
      if (this.$checkRes(res1)) {
        this.$set(this, `infoMes`, res1.data[0]);
      }
    },
  },
  computed: {
    ...mapState(['user']),
  },
};
</script>

<style lang="less" scoped>
.w_1200 {
  width: 1200px;
  margin: 0 auto;
}
.info {
  min-height: 500px;
  margin-top: 10px;
}
</style>
