<template>
   <div class="swiperHotHouseType" @click="stopJump">
       <div class="hot__house_type">
         <div class="hot__house_img">
           <img v-if="index === 0 || index === 1" class="house__img_url" :src="`${hostUrl}${data.coverImg}`">          
           <img v-if="index !== 0 && index !== 1" class="house__img_url swiper-lazy" :data-src="`${hostUrl}${data.coverImg}`">        
         </div>
         <p class="hot__house_info">{{data.regionName }}</p>
         <p class="hot__house_info">{{data.layoutName }}</p>
         <p class="hot__house_info_price">{{data.minimumPrice|currency}}元起/月</p>
         <p class="hot__house_info">{{data.address}}</p>
         <div class="expect_box" v-show="data.status === 4">
           <p class="sample_room_expect">
             <span class="expect_time">{{data.publishTime }}</span>
             <b class="expect_content">尽请期待</b>
           </p>
         </div>
       </div>
      
   </div>
</template>

<script>
//import { mapState } from 'vuex'
import api from "@/api/index.js";
let URL = api.serverURI;
export default {
  name: "swiperHotHouseType",
  props: {
    data: {
      type: Object,
      default: {},
      required: true
    },
    isExpect: {
      type: Boolean,
      default: false,
      required: false
    },
    index: {
      type: Number,
      default: false,
      required: false
    }
  },
  components: {
    //addPane

  },
  computed: {
    // ...mapState({
          
    // })
  },
  mounted() {
      
  },
  data: function() {
    return {
      name: "swiperHotHouseType",
      hostUrl: URL
    };
  },
  methods: {
    stopJump(event) {
      if(this.data.status === 4) {
        event.preventDefault();
      }
    }
  }
};
</script>
<style scoped lang='less'>
  @import "~@/common/less/variable.less";
.swiperHotHouseType{
   .hot__house_type {
    width: 167.54px;
    height: 183.61px;
    background:@nice-bgwhite;
    border-radius: 5px;
    box-shadow: 0 0 6px rgba(0,0,0,0.11);
    margin-right:0;  
    border: 1px solid @nice-border;
    position: relative;  
    .hot__house_img {
      width: 167.54px;
      height:98px;
      margin-bottom: 4.61px;
      position: relative;           
      .house__img_url {
        width: 167.54px;
        height: 98px;
        display: block;
      }
    }
    .hot__house_info {
      width: 167.54px;
      height: 16px;
      margin-top:2px; 
      font-size: 11px;
      color: #585858;
      text-align: center;
      line-height: 16px;
    }
    .hot__house_info_price {
      width: 167.54px;
      height: 18px;
      font-size: 13px;
      color: #313131;
      text-align: center;
      line-height: 18px;
      margin: 2px 0 1px 0;
    }
    .expect_box {
      display: block;
      width: 167.54px;
      height: 183.61px;
      z-index: 9999;
      position: absolute;
      left: 0;
      top: 0;     
      .sample_room_expect {           
        width: 67px;
        height: 67px;
        margin-left: 50px;
        margin-top: 15px;
        border-radius: 50%;
        background: rgba(0,0,0,.35);
        color: @nice-bgwhite;
        .expect_time {
          display: block;
          width: 100%;
          height: 15px;
          line-height:10px;
          font-size: 8px; 
          padding-top: 24px;
        }
        .expect_content {
          display: block;
          width: 100%;
          height: 15px;
          line-height:15px;
          font-size: 11px; 
        }

      }
    }

   }

 }
</style>