From f7f0e44c4be8eb0e77fd310296c3b43bde21e4f9 Mon Sep 17 00:00:00 2001 From: ZZJ <10913410+zzj2100@user.noreply.gitee.com> Date: 星期四, 23 六月 2022 14:17:01 +0800 Subject: [PATCH] 新增联动场景 --- src/views/index/components/commendContent.vue | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/views/index/components/commendContent.vue b/src/views/index/components/commendContent.vue index 3c3b324..1074544 100644 --- a/src/views/index/components/commendContent.vue +++ b/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.productName)">绔嬪嵆璐拱</div> </div> </div> </template> @@ -33,6 +33,14 @@ refresh() { this.$emit("refresh"); }, + buyProduct(productName) { + this.$router.push({ + path: "/productDetail", + query: { + name: productName, + }, + }); + }, }, }; </script> -- Gitblit v1.8.0