src/views/index/components/commendContent.vue
@@ -12,7 +12,7 @@ <div class="title">{{ item.productName }}</div> <div class="des limitRow2">{{ item.description }}</div> <price :priceNew="item.priceBase ? item.priceBase : 0"></price> <div class="button" @click="buyProduct(item.productName)">立即购买</div> <div class="button" @click="buyProduct(item.id)">立即购买</div> </div> </div> </template> @@ -33,11 +33,11 @@ refresh() { this.$emit("refresh"); }, buyProduct(productName) { buyProduct(id) { this.$router.push({ path: "/productDetail", query: { name: productName, id: id, }, }); },