mark
2022-10-25 f20a554bdb24e9dfde9dc6a69d78595944f61d15
src/views/index/components/commendContent.vue
@@ -8,11 +8,11 @@
      v-for="(item, index) in commendData"
      :key="index"
    >
      <img :src="'http:/' + item.logoUrl" alt="" />
      <ImageShow :src="item.logoUrl"> </ImageShow>
      <div class="title">{{ item.productName }}</div>
      <div class="des limitoRow2">{{ item.description }}</div>
      <price :priceNew="item.priceBase"></price>
      <div class="button">立即购买</div>
      <div class="des limitRow2">{{ item.description }}</div>
      <price :priceNew="item.priceBase ? item.priceBase : 0"></price>
      <div class="button" @click="buyProduct(item.id)">立即购买</div>
    </div>
  </div>
</template>
@@ -33,6 +33,14 @@
    refresh() {
      this.$emit("refresh");
    },
    buyProduct(id) {
      this.$router.push({
        path: "/productDetail",
        query: {
          id: id,
        },
      });
    },
  },
};
</script>