ZZJ
2022-04-02 45faaf27722588e92050e2e3eace9b3704377048
src/views/index/components/commendContent.vue
@@ -1,24 +1,24 @@
<template>
  <div class="commendContent">
    <div class="refresh"><span class="icon iconfont">&#xe606;</span>换一批</div>
    <div class="refresh" @click="refresh">
      <span class="icon iconfont">&#xe606;</span>换一批
    </div>
    <div
      class="commendTabsItem"
      v-for="(item, index) in commendData"
      :key="index"
    >
      <div class="icon">
        <img :src="item.img" alt="" />
      </div>
      <div class="title">{{ item.title }}</div>
      <div class="des">{{ item.des }}</div>
      <price :priceNew="item.priceNew" :priceOld="item.priceOld"></price>
      <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 "./price.vue";
import price from "@/components/Price.vue";
export default {
  props: {
@@ -28,6 +28,11 @@
  },
  components: {
    price,
  },
  methods: {
    refresh() {
      this.$emit("refresh");
    },
  },
};
</script>
@@ -40,6 +45,9 @@
  margin: 0 auto;
  .commendTabsItem {
    position: relative;
    max-width: 302px;
    height: 332px;
    flex: 1;
    padding-top: 20px;
    text-align: center;
@@ -50,7 +58,8 @@
      margin-right: 0;
    }
    .icon img {
    img {
      height: 96px;
      width: 96px;
    }
@@ -62,13 +71,16 @@
    }
    .des {
      height: 38px;
      margin: 0 20px 20px 20px;
      color: #666666;
      font-size: 14px;
    }
    .button {
      margin-top: 25px;
      position: absolute;
      bottom: 0;
      right: 0;
      width: 100%;
      height: 40px;
      box-shadow: 0px 2px 8px rgba(0, 43, 106, 0.12);