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
122
123
124
125
126
127
128
129
<template>
  <div class="commendContent">
    <div class="refresh" @click="refresh">
      <span class="icon iconfont">&#xe606;</span>换一批
    </div>
    <div
      class="commendTabsItem"
      v-for="(item, index) in commendData"
      :key="index"
    >
      <img :src="'http:/' + item.logoUrl" alt="" />
      <div class="title">{{ item.productName }}</div>
      <div class="des limitoRow2">{{ 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: {
    commendData: {
      type: Array,
    },
  },
  components: {
    price,
  },
  methods: {
    refresh() {
      this.$emit("refresh");
    },
  },
};
</script>
 
<style lang="scss" scoped>
.commendContent {
  display: flex;
  position: relative;
  width: 1280px;
  margin: 0 auto;
 
  .commendTabsItem {
    position: relative;
    max-width: 302px;
    height: 332px;
    flex: 1;
    padding-top: 20px;
    text-align: center;
    background-color: #fff;
    margin-right: 24px;
 
    &:last-child {
      margin-right: 0;
    }
 
    img {
      height: 96px;
      width: 96px;
    }
 
    .title {
      margin-top: 20px;
      margin-bottom: 10px;
      font-size: 18px;
      font-weight: 700;
    }
 
    .des {
      height: 38px;
      margin: 0 20px 20px 20px;
      color: #666666;
      font-size: 14px;
    }
 
    .button {
      position: absolute;
      bottom: 0;
      right: 0;
      width: 100%;
      height: 40px;
      box-shadow: 0px 2px 8px rgba(0, 43, 106, 0.12);
      color: #ff6a00;
      font-size: 14px;
      font-weight: 700;
      line-height: 40px;
      cursor: pointer;
 
      &:hover {
        background: linear-gradient(
          90.78deg,
          #ffba4a 0%,
          #ff6a00 20.33%,
          #ff6a00 79.66%,
          #ffba4a 100%
        );
        color: #fff;
      }
    }
  }
 
  .refresh {
    position: absolute;
    right: 0;
    top: -31px;
    font-size: 14px;
    color: #999999;
    cursor: pointer;
 
    span {
      margin-right: 6px;
      color: rgb(153, 153, 153);
      font-size: 16px;
    }
 
    &:hover {
      color: #666;
 
      span {
        color: #666;
      }
    }
  }
}
</style>