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/rightRrid.vue | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/views/index/components/rightRrid.vue b/src/views/index/components/rightRrid.vue index d1f064b..c1eb39c 100644 --- a/src/views/index/components/rightRrid.vue +++ b/src/views/index/components/rightRrid.vue @@ -2,14 +2,14 @@ <div class="rightRrid"> <div class="gridItem" v-for="(item, index) in product" :key="index"> <div class="title"> - <img :src="'/httpImage/' + item.logoUrl" alt="" /> + <ImageShow :src="item.logoUrl"></ImageShow> {{ item.modelName }} </div> <div class="des limitRow2"> {{ item.description }} </div> <price :priceNew="item.priceBase"></price> - <div class="button">绔嬪嵆璐拱</div> + <div class="button" @click="buyProduct(item.modelName)">绔嬪嵆璐拱</div> </div> </div> </template> @@ -38,6 +38,16 @@ this.product = this.data.product; } }, + methods: { + buyProduct(modelName) { + this.$router.push({ + path: "/productDetail", + query: { + name: modelName, + }, + }); + }, + }, }; </script> -- Gitblit v1.8.0