BrandCard.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <el-card class="test-card" style="margin-top: 15px">
  3. <div slot="header" class="clearfix test-card-header">
  4. <span>入驻品牌机构</span>
  5. <a class="pull-right" style="color: rgba(0, 118, 203, 1); cursor: pointer" @click="goToMoreAgency()">more>></a>
  6. </div>
  7. <div style="height: 238px">
  8. <el-row :gutter="15">
  9. <el-col v-for="item in residentAgencyList" :key="item.id" :span="4" style="height: 90px; margin-bottom: 28px">
  10. <img :src="item.agencyPhoto==null?defaultValue.image:item.agencyPhoto" :alt="item.evaluationAgencyName" style="width: 70%;height: 100%; cursor: pointer;" @click="goToDetail(item.userId)"/>
  11. </el-col>
  12. </el-row>
  13. </div>
  14. </el-card>
  15. </template>
  16. <script>
  17. import {defaultValue} from '@/js/index.js'
  18. export default {
  19. name: "BrandCard",
  20. props:['residentAgencyList'],
  21. data() {
  22. return{
  23. defaultValue: defaultValue,
  24. }
  25. },
  26. methods:{
  27. goToMoreAgency(){
  28. this.$router.push({
  29. name: 'AgencyResidentList',
  30. });
  31. },
  32. goToDetail(userId) {
  33. this.$router.push({
  34. name: 'NewAgencyDetail',
  35. params: {id: userId, type: 1}
  36. })
  37. },
  38. }
  39. }
  40. </script>
  41. <style lang="less">
  42. </style>