<template>
  <div class="goods-list-template-con">
    <div class="tail-good-list">
      <div class="header flex-default">
        <div class="title flex-default">
          潜力版权
          <!-- {{title}} -->
        </div>
        <!-- <text class="more">更多</text> -->
      </div>
      <div class="item-list-con flex-default" v-show="!loading">
        <goods-item
          v-for="(item, index) of list"
          :key="'goods-item-' + index"
          :itemData="item"
          @click.native="goGoods(item.goodsId, item.type,item.salesType)"
        />
      </div>
    </div>
  </div>
</template>

<script>
import GoodsItem from "./goods-item.vue";
export default {
  components: {
    GoodsItem,
  },
  props: {
    title: {
      type: String,
      default: "潜力NFT",
    },
    line: {
      type: Number,
      default: 2,
    },
    floorId: String,
  },
  data() {
    return {
      loading: true,
      list: [],
    };
  },
  computed: {},
  methods: {
    requestData() {
      this.loading = true;
      let param = this.floorId;
      this.$api({
        apiName: "getFloorGoods",
        postData: {
          param,
          page: 1,
          size: this.line * 3,
        },
        success: (res) => {
          this.list = res.list;
          setTimeout(() => {
            this.loading = false;
            this.$emit("loadSuccess");
          }, 500);
        },
      });
    },
  },
};
</script>

<style lang="less">
.goods-list-template-con {
  padding: 18px 11px;
  .tail-good-list {
    height: 390px;
    background: #ffffff;
    border-radius: 8px;
    padding: 0 9px 20px;
    .header {
      justify-content: space-between;
      align-items: center;
      color: #140603;
      height: 50px;
      line-height: 20px;
      padding: 15px 0;
      color: #140603;
      .title {
        font-weight: bold;
        font-size: 16px;
        align-items: flex-start;
        line-height: 20px;

        // background: url(~@/assets/img/low-price-nft-title.png) no-repeat;
        background-size: 100%;
        width: 83px;
        height: 15px;
      }
      .more {
        font-size: 14px;
      }
    }
    .item-list-con {
      justify-content: space-between;
      flex-wrap: wrap;
      justify-content: space-between;
      &::after {
        content: "";
        display: block;
        width: 101px;
      }
    }
  }
}
</style>