<template>
  <view class="Hl-container-item" @click="goDetail(goods, index)">
    <image lazy-load class="Hlc-item-img" mode="aspectFit" :src="goods.goodsImage" />
    <view class="Hlc-item-info">
      <text class="Hlc-item-info-title">
        <text v-if="goods.textTag" class="Hlc-item-info-title-tag">{{ goods.textTag }}</text>

        <text class="Hlc-item-info-title-name" space="emsp"> {{ goods.goodsName || "" }}</text>
      </text>
      <view class="Hlc-item-info-bottom">
        <view class="Hlc-item-info-bottom-des">{{ goods.des || "" }}</view>
      </view>
    </view>
  </view>
</template>
<script>
// import { saTrackEvent } from "@/utils/sa.js";
export default {
  name: "DisabledGoodsCard",
  props: {
    goods: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {};
  },
  computed: {
    skuName() {
      return this.goods.textTag ? `${this.goods.skuName}` : this.goods.skuName;
    }
  },
  mounted() {
    console.log("card---goods", this.goods);
  },
  methods: {
    goDetail() {}
  }
};
</script>
<style lang="scss" scoped>
.Hl-container-item {
  display: flex;
  // margin: 40rpx 0;
  justify-content: space-around;
  .Hlc-item-img {
    width: 240rpx;
    height: 240rpx;
    border-radius: 12rpx;
    opacity: 0.5;
    margin-right: 10rpx;
  }
  .Hlc-item-info {
    width: 450rpx;
    height: 240rpx;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    &-title {
      position: relative;
      opacity: 0.5;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      &-name {
        font-size: 26rpx;
        line-height: 36rpx;
        color: #333333;
      }
      &-tag {
        font-size: 22rpx;
        color: #fff;
        background: red;
        border-radius: 6rpx;
        padding: 0 7rpx;
        margin-right: 10rpx;
      }
    }
    &-bottom {
      position: absolute;
      bottom: 10rpx;
      display: flex;
      width: 100%;
      &-des {
        font-size: 26rpx;
        // line-height: 36rpx;
        width: 90%;
        color: #333333;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
      }
      &-btn {
        width: 40%;
        .similar {
          height: 60rpx;
          line-height: 60rpx;
          font-size: 28rpx;
          font-weight: bold;
          border-radius: $border-radius-2;
          border: $border-sm solid $border-color-search;
          // background: $white;
          color: $font-color-search;
          padding: 0 $padding-sm;
        }
      }
    }
  }
}
</style>
