<template>
  <!-- 豆腐块 -->
  <div class="Search_center">
    <ul class="pd-list">
      <li class="pd-box" v-for="(item,index) in DataList" :key="index">
        <a class="pd-link">
          <template v-if="item.imgCover && item.imgCover.length > 0">
            <div class="pd-img"
            :style="{backgroundImage:`url('${item.imgCover[0].url}')`}">
            <div class="pd-price">
              <div class="price">
                {{item.dayNum}}
                <small class="unit">天</small> {{item.b2BPrice}}
                <small class="unit">元起</small>
              </div>
            </div>
          </div>
          </template>
          <template v-else>
            <div class="pd-img">
            <div class="pd-price">
              <div class="price">
                {{item.dayNum}}
                <small class="unit">天</small> {{item.b2BPrice}}
                <small class="unit">元起</small>
              </div>
            </div>
          </div>
          </template>
        
          <div class="pd-content">
            <h3 class="pd-title">{{item.title}}</h3>
            <div class="pd-departure">
              出發日期：{{item.startDate}}
              <span class="more" @click="GotoDetails(item)" style="cursor:pointer">...更多</span>
            </div>
          </div>
        </a>
      </li>
    </ul>
  </div>
</template>
<script>
  export default {
    props: ["DataList", "PageCount"],
    data() {
      return {

      };
    },
    methods: {
      GotoDetails(item) {
        this.CommonJump('/details/' + encodeURIComponent(item.id) + "/" + item.tcid, {});
      }
    }
  }

</script>
