<template>
  <div
    class="search-list-item-con flex-default"
    @click="goGoods(data.goodsId, data.type,data.salesType,data.salesType)"
  >
    <img class="thumb" :src="data.thumb" />
    <div class="desc flex-default">
      <div class="name">{{ data.name }}</div>
      <!-- <div scroll-x class="tag-list">
        <div class="tag">高音质</div>
        <div class="tag">品质保证</div>
        <div class="tag">蓝牙控制</div>
        <div class="tag">高音质</div>
        <div class="tag">品质保证</div>
        <div class="tag">蓝牙控制</div>
      </div> -->
      <!-- <m-price
        :amt="data.defaultPrice"
        :rmbSize="10"
        :intSize="20"
        :floatSize="14"
      /> -->
      <div class="bottom flex-between">
        <!-- <div class="promotion flex-default">
          <div class="type">满减</div>
          <div class="rule">满200元减20元</div>
        </div> -->

        <m-price
          :amt="data.defaultPrice"
          :rmbSize="10"
          :intSize="20"
          :floatSize="14"
        />
        <div class="shop" @click.stop="goShop(data.merchantId)">进店></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    data: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    return {};
  },
  methods: {},
};
</script>

<style lang="less">
.search-list-item-con {
  background: #ffffff;
  padding: 10px 16px;

  > .desc {
    padding: 9px;
  }

  > .thumb {
    width: 110px;
    height: 110px;
    border-radius: 10px;
    object-fit: cover;
    background-color: #f2f2f2;
    margin-right: 10px;
  }
  > .desc {
    flex: 1;
    padding: 5px 0;
    flex-direction: column;
    align-items: flex-start;
    height: 110px;
  }
  > .desc .name {
    flex: 1;
    color: #2b2b3a;
    font-size: 14px;
    line-height: 16px;
    margin-bottom: 6px;
  }
  > .desc .tag-list {
    width: 220px;
    white-space: nowrap;
    height: 14px;
    margin-bottom: 5px;
    overflow-x: auto;
    .tag {
      display: inline-block;
      height: 14px;
      line-height: 14px;
      background: #f5f7fb;
      border-radius: 7px;
      color: #aeaeae;
      font-size: 8px;
      margin-right: 5px;
      padding: 0 5px;
      vertical-align: top;
    }
  }
  > .desc > .bottom {
    width: 100%;
    margin-top: 5px;
    .promotion {
      flex: 1;
      align-items: center;
    }
    .type {
      padding: 0 2px;
      font-size: 8px;
      line-height: 12px;
      color: #ffffff;
      border-radius: 2px;
      background: linear-gradient(295deg, #f07c5b 0%, #dd2e41 100%);
      margin-right: 3px;
    }
    .rule {
      width: fit-content;
      font-size: 8px;
      line-height: 12px;
      color: #dd2e41;
      border-radius: 2px;
      border: 1px solid #dd2e41;
      background-color: #ffffff;
      padding: 0 5px;
    }
    .shop {
      color: #140603;
      font-size: 10px;
    }
  }
}
</style>
