From 45faaf27722588e92050e2e3eace9b3704377048 Mon Sep 17 00:00:00 2001 From: ZZJ <zzjdsg2300@163.com> Date: 星期六, 02 四月 2022 18:44:30 +0800 Subject: [PATCH] 首页接口 --- src/views/index/components/commendContent.vue | 32 ++++++++++++++++++++++---------- 1 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/views/index/components/commendContent.vue b/src/views/index/components/commendContent.vue index d90e824..3c3b324 100644 --- a/src/views/index/components/commendContent.vue +++ b/src/views/index/components/commendContent.vue @@ -1,24 +1,24 @@ <template> <div class="commendContent"> - <div class="refresh"><span class="icon iconfont"></span>鎹竴鎵�</div> + <div class="refresh" @click="refresh"> + <span class="icon iconfont"></span>鎹竴鎵� + </div> <div class="commendTabsItem" v-for="(item, index) in commendData" :key="index" > - <div class="icon"> - <img :src="item.img" alt="" /> - </div> - <div class="title">{{ item.title }}</div> - <div class="des">{{ item.des }}</div> - <price :priceNew="item.priceNew" :priceOld="item.priceOld"></price> + <img :src="'http:/' + 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> </div> </template> <script> -import price from "./price.vue"; +import price from "@/components/Price.vue"; export default { props: { @@ -28,6 +28,11 @@ }, components: { price, + }, + methods: { + refresh() { + this.$emit("refresh"); + }, }, }; </script> @@ -40,6 +45,9 @@ margin: 0 auto; .commendTabsItem { + position: relative; + max-width: 302px; + height: 332px; flex: 1; padding-top: 20px; text-align: center; @@ -50,7 +58,8 @@ margin-right: 0; } - .icon img { + img { + height: 96px; width: 96px; } @@ -62,13 +71,16 @@ } .des { + height: 38px; margin: 0 20px 20px 20px; color: #666666; font-size: 14px; } .button { - margin-top: 25px; + position: absolute; + bottom: 0; + right: 0; width: 100%; height: 40px; box-shadow: 0px 2px 8px rgba(0, 43, 106, 0.12); -- Gitblit v1.8.0