<template>
  <index-card simple title="高中信息库" more-text="查看全部" @more="handleMore">
    <el-row gutter="20">
      <el-col v-for="item in list" :key="item.id" :span="6">
        <el-image :src="item.pict" fit="fill" style="height: 200px; width: 100%; cursor: pointer" @click="handleMore" />
      </el-col>
    </el-row>
  </index-card>
</template>

<script>
import {getHighSchoolList} from "@/api/webApi/baiyou";
import MxTransferMixin from "@/components/mx-transfer-mixin";
import IndexLoginInterceptorMixin from "@/views/index/blocks/index-login-interceptor-mixin";
import IndexCard from "@/views/index/components/index-card.vue";

export default {
  name: "index-card-high-school",
  components: {IndexCard},
  mixins: [MxTransferMixin, IndexLoginInterceptorMixin],
  data() {
    return {
      morePath: {name: 'LibraryHighSchool'},
      list: []
    }
  },
  mounted() {
    this.getList()
  },
  methods: {
    async getList() {
      const {rows} = await getHighSchoolList({pageNum:1, pageSize:4})
      this.list = rows
    },
    async handleMore() {
      await this.loginCheck()
      this.transferTo(this.morePath)
    }
  }
}
</script>

<style scoped>

</style>
