ZZJ
2022-04-02 45faaf27722588e92050e2e3eace9b3704377048
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<template>
  <div class="rightRrid">
    <div class="gridItem" v-for="(item, index) in product" :key="index">
      <div class="title">
        <img :src="'/httpImage/' + item.logoUrl" alt="" />
        {{ item.modelName }}
      </div>
      <div class="des limitRow2">
        {{ item.description }}
      </div>
      <price :priceNew="item.priceBase"></price>
      <div class="button">立即购买</div>
    </div>
  </div>
</template>
 
<script>
import price from "@/components/Price.vue";
 
export default {
  props: {
    data: {
      type: Object,
    },
  },
  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>
 
<style lang="scss" scoped>
.rightRrid {
  display: flex;
  flex-wrap: wrap;
  flex: 1;
  height: 100%;
 
  .gridItem {
    box-sizing: border-box;
    padding: 20px;
    height: 231px;
    width: 326px;
    border-right: 1px solid #e9ebee;
    border-bottom: 1px solid #e9ebee;
    background-color: #fff;
    cursor: default;
 
    &:hover {
      position: relative;
      z-index: 1;
      box-shadow: 0px 2px 16px rgba(0, 43, 106, 0.25);
    }
 
    &:nth-child(n + 4) {
      border-bottom: none;
    }
 
    &:nth-child(3n) {
      border-right: none;
    }
 
    .title {
      margin-bottom: 12px;
      font-size: 18px;
      font-weight: 700;
      img {
        width: 40px;
        vertical-align: middle;
      }
    }
 
    .des {
      margin-bottom: 10px;
      height: 35px;
      font-size: 14px;
      color: #666666;
    }
 
    .Price {
      margin-bottom: 16px;
      margin-left: 0;
    }
 
    .button {
      width: 286px;
      height: 40px;
      line-height: 40px;
      box-shadow: 0px 2px 8px rgba(0, 43, 106, 0.12);
      color: #ff6a00;
      font-size: 14px;
      font-weight: 700;
      text-align: center;
      cursor: pointer;
 
      &:hover {
        background: linear-gradient(
          90.78deg,
          #ffba4a 0%,
          #ff6a00 20.33%,
          #ff6a00 79.66%,
          #ffba4a 100%
        );
        color: #fff;
      }
    }
  }
}
</style>