ZZJ
2022-04-12 994e5e08cba4e6b9ce321b7cf5cb1ec8d19dfa22
src/views/index/components/commendContent.vue
@@ -8,11 +8,11 @@
      v-for="(item, index) in commendData"
      :key="index"
    >
      <img :src="'http:/' + item.logoUrl" alt="" />
      <img :src="'/httpImage/' + 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 class="button" @click="buyProduct(item.productName)">立即购买</div>
    </div>
  </div>
</template>
@@ -33,6 +33,14 @@
    refresh() {
      this.$emit("refresh");
    },
    buyProduct(productName) {
      this.$router.push({
        path: "/productDetail",
        query: {
          name: productName,
        },
      });
    },
  },
};
</script>