<template>
  <el-card class="test-card" style="margin-top: 15px">
    <div slot="header" class="clearfix test-card-header">
      <span>入驻品牌机构</span>
      <a class="pull-right" style="color: rgba(0, 118, 203, 1); cursor: pointer" @click="goToMoreAgency()">more>></a>
    </div>
    <div style="height: 238px">
      <el-row :gutter="15">
        <el-col v-for="item in residentAgencyList" :key="item.id" :span="4" style="height: 90px; margin-bottom: 28px">
          <img :src="item.agencyPhoto==null?defaultValue.image:item.agencyPhoto" :alt="item.evaluationAgencyName" style="width: 70%;height: 100%; cursor: pointer;" @click="goToDetail(item.userId)"/>
        </el-col>
      </el-row>
    </div>
  </el-card>
</template>

<script>
  import {defaultValue} from '@/js/index.js'

  export default {
    name: "BrandCard",
    props:['residentAgencyList'],
    data() {
      return{
        defaultValue: defaultValue,
      }
    },
    methods:{
        goToMoreAgency(){
            this.$router.push({
                name: 'AgencyResidentList',
            });
        },
        goToDetail(userId) {
            this.$router.push({
                name: 'NewAgencyDetail',
                params: {id: userId, type: 1}
            })
        },
    }
  }
</script>

<style lang="less">

</style>
