ZZJ
2022-07-11 6ef2ac92c0d3f79b59b8698274918df830b58b29
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<template>
  <div class="rightColumn">
    <div class="columnItem" v-for="(item, index) in product" :key="index">
      <div class="title">
        <ImageShow :src="item.logoUrl"></ImageShow>
        {{ item.modelName }}
      </div>
      <div class="des limitRow2">
        {{ item.summary }}
      </div>
      <ul class="list scroll">
        <li>
          <span class="icon iconfont">&#xe60c;</span>{{ item.description }}
        </li>
      </ul>
      <price :priceNew="item.priceBase"></price>
      <div class="button" @click="buyProduct(item.modelName)">立即购买</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 > 3) {
      this.product = this.data.product.slice(0, 3);
    } else {
      this.product = this.data.product;
    }
  },
  methods: {
    buyProduct(modelName) {
      this.$router.push({
        path: "/productDetail",
        query: {
          name: modelName,
        },
      });
    },
  },
};
</script>
 
<style lang="scss" scoped>
.rightColumn {
  display: flex;
  flex-wrap: wrap;
  flex: 1;
  height: 100%;
 
  .columnItem {
    box-sizing: border-box;
    padding: 20px;
    height: 100%;
    width: 326px;
    border-right: 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(3n) {
      border-right: none;
    }
    .title {
      margin-bottom: 12px;
      font-size: 18px;
      font-weight: 700;
      img {
        width: 40px;
        vertical-align: middle;
      }
    }
 
    .des {
      height: 38px;
      font-size: 14px;
      color: #999;
    }
 
    .list {
      margin-top: 10px;
      margin-bottom: 10px;
      height: 170px;
      overflow-y: auto;
      li {
        font-size: 14px;
        color: #666666;
        line-height: 28px;
        padding-left: 25px;
        text-indent: -25px;
 
        span {
          margin-right: 10px;
          color: rgb(10, 107, 255);
        }
      }
    }
 
    .Price {
      margin-bottom: 10px;
      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>