<template>
  <div id="top">
    <el-row>
      <el-col :span="24" class="top" :style="'background: url(' + site.banner + ');'">
        <div class="w_1200">
          <el-col :span="24" class="topMain">
            <el-col :span="2">
              <el-image style="width:100px;height:100px" :src="site.logo || ''"></el-image>
            </el-col>
            <el-col :span="22" class="topTit">
              <el-link :underline="false">
                {{ site.name }}
              </el-link>
            </el-col>
          </el-col>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'top',
  props: {},
  components: {},
  data: () => ({
    site: {},
  }),
  created() {
    this.search();
  },
  computed: {},
  methods: {
    async search() {
      let site = sessionStorage.getItem('site');
      if (site) {
        site = JSON.parse(site);
        this.$set(this, `site`, site);
        return;
      }
    },
  },
};
</script>

<style lang="less" scoped>
.w_1200 {
  width: 1200px;
  margin: 0 auto;
}
.top {
  min-height: 300px;
}
.topMain {
  padding: 80px 0;
}
.topTit .el-link.el-link--default {
  height: 100px;
  line-height: 100px;
  padding: 0 10px;
  font-size: 3em;
  font-family: cursive;
  color: #850000;
  text-shadow: 2px 2px 0 #fff;
}
</style>
