ZZJ
2022-04-02 45faaf27722588e92050e2e3eace9b3704377048
src/views/index/components/rightRrid.vue
@@ -1,21 +1,21 @@
<template>
  <div class="rightRrid">
    <div class="gridItem" v-for="(item, index) in data.product" :key="index">
    <div class="gridItem" v-for="(item, index) in product" :key="index">
      <div class="title">
        <img :src="item.icon" alt="" />
        {{ item.title }}
        <img :src="'/httpImage/' + item.logoUrl" alt="" />
        {{ item.modelName }}
      </div>
      <div class="des">
        {{ item.des }}
      <div class="des limitRow2">
        {{ item.description }}
      </div>
      <price :priceNew="item.priceNew" :priceOld="item.priceOld"></price>
      <price :priceNew="item.priceBase"></price>
      <div class="button">立即购买</div>
    </div>
  </div>
</template>
<script>
import price from "@/views/index/components/price";
import price from "@/components/Price.vue";
export default {
  props: {
@@ -25,6 +25,18 @@
  },
  components: {
    price,
  },
  data() {
    return {
      product: [],
    };
  },
  created() {
    if (this.data.product.length > 6) {
      this.product = this.data.product.slice(0, 6);
    } else {
      this.product = this.data.product;
    }
  },
};
</script>
@@ -72,12 +84,13 @@
    .des {
      margin-bottom: 10px;
      height: 35px;
      font-size: 14px;
      color: #666666;
    }
    .price {
      margin-bottom: 10px;
    .Price {
      margin-bottom: 16px;
      margin-left: 0;
    }