<template>
  <div class="goods-list-template-con">
    <div class="customized-goods-list">
      <div class="header">
        <!-- <div class="title">
          {{ title }}
        </div>
        <div class="maintitle"> 个性需求 量身定制 </div>
        <div class="desc-con">
          <div class="text"> 低至7.9折 </div>
        </div> -->
      </div>
      <div class="item-list-con flex-default">
        <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: "电影专区",
    },
    line: {
      type: Number,
      default: 1,
    },
    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;
  .customized-goods-list {
    border-radius: 8px;
    overflow: hidden;
    .header {
      display: flex;
      height: 124px;
      background-image: url(~@/assets/img/customized-nft-bg.png);
      background-repeat: no-repeat;
      background-size: contain;
      flex-direction: column;
      justify-content: center;
      color: #ffffff;
      padding-left: 20px;
      .title {
        font-size: 10px;
        line-height: 14px;
      }
      .maintitle {
        font-size: 17px;
        line-height: 24px;
        margin: 3px 0 8px;
      }
      .desc-con {
        position: relative;
        width: 71.5px;
        background-color: #ffffff;
        border-radius: 16px 0 16px 0;
        .text {
          font-size: 11px;
          line-height: 16px;
          color: #f7bf8f;
          text-align: center;
        }
        &::after {
          content: "";
          display: block;
          width: 71.5px;
          height: 16px;
          background-color: transparent;
          border-radius: 16px 0 16px 0;
          position: absolute;
          border: 1px solid #ffffff;
          top: 2px;
          left: 2px;
        }
      }
    }
    .item-list-con {
      justify-content: space-between;
      flex-wrap: wrap;
      justify-content: space-between;
      padding: 5px 9px 13px;
      background-color: #ffffff;
      height: 168px;
      &::after {
        content: "";
        display: block;
        width: 101px;
      }
    }
  }
}
</style>