From d889eaf990af99c06970e51f2bc421ac0015489c Mon Sep 17 00:00:00 2001 From: ZZJ <zzjdsg2300@163.com> Date: 星期四, 05 五月 2022 13:30:31 +0800 Subject: [PATCH] bug修复 --- src/views/index/components/rightColumn.vue | 53 +++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 39 insertions(+), 14 deletions(-) diff --git a/src/views/index/components/rightColumn.vue b/src/views/index/components/rightColumn.vue index f656cb2..a60fbfb 100644 --- a/src/views/index/components/rightColumn.vue +++ b/src/views/index/components/rightColumn.vue @@ -1,26 +1,26 @@ <template> <div class="rightColumn"> - <div class="columnItem" v-for="(item, index) in data.product" :key="index"> + <div class="columnItem" v-for="(item, index) in product" :key="index"> <div class="title"> - <img :src="item.icon" alt="" /> - {{ item.title }} + <ImageShow :src="item.logoUrl"></ImageShow> + {{ item.modelName }} </div> - <div class="des"> - {{ item.des }} + <div class="des limitRow2"> + {{ item.summary }} </div> - <ul class="list"> - <li v-for="(v, i) in item.menu" :key="i"> - <span class="icon iconfont"></span>{{ v }} + <ul class="list scroll"> + <li> + <span class="icon iconfont"></span>{{ item.description }} </li> </ul> - <price :priceNew="item.priceNew" :priceOld="item.priceOld"></price> - <div class="button">绔嬪嵆璐拱</div> + <price :priceNew="item.priceBase"></price> + <div class="button" @click="buyProduct(item.modelName)">绔嬪嵆璐拱</div> </div> </div> </template> <script> -import price from "@/views/index/components/price"; +import price from "@/components/Price.vue"; export default { props: { @@ -30,6 +30,28 @@ }, components: { price, + }, + data() { + return { + product: [], + }; + }, + created() { + if (this.data.product.length > 3) { + this.product = this.data.product.slice(0, 3); + } else { + this.product = this.data.product; + } + }, + methods: { + buyProduct(modelName) { + this.$router.push({ + path: "/productDetail", + query: { + name: modelName, + }, + }); + }, }, }; </script> @@ -70,13 +92,16 @@ } .des { + height: 38px; font-size: 14px; color: #999; } .list { - margin-top: 33px; - height: 150px; + margin-top: 10px; + margin-bottom: 10px; + height: 170px; + overflow-y: auto; li { font-size: 14px; color: #666666; @@ -91,7 +116,7 @@ } } - .price { + .Price { margin-bottom: 10px; margin-left: 0; } -- Gitblit v1.8.0