From e37e45cfe1123928dba5d9c5a427b0ee497b7ad6 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期二, 23 八月 2022 03:21:32 +0800
Subject: [PATCH] 修复算法配置的字段内容

---
 src/views/index/components/commendContent.vue |   42 +++++++++++++++++++++++++++++++-----------
 1 files changed, 31 insertions(+), 11 deletions(-)

diff --git a/src/views/index/components/commendContent.vue b/src/views/index/components/commendContent.vue
index d90e824..c8c5991 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">&#xe606;</span>鎹竴鎵�</div>
+    <div class="refresh" @click="refresh">
+      <span class="icon iconfont">&#xe606;</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>
-      <div class="button">绔嬪嵆璐拱</div>
+      <ImageShow :src="item.logoUrl"> </ImageShow>
+      <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.id)">绔嬪嵆瀹夎</div>
     </div>
   </div>
 </template>
 
 <script>
-import price from "./price.vue";
+import price from "@/components/Price.vue";
 
 export default {
   props: {
@@ -28,6 +28,19 @@
   },
   components: {
     price,
+  },
+  methods: {
+    refresh() {
+      this.$emit("refresh");
+    },
+    buyProduct(id) {
+      this.$router.push({
+        path: "/productDetail",
+        query: {
+          id: id,
+        },
+      });
+    },
   },
 };
 </script>
@@ -40,6 +53,9 @@
   margin: 0 auto;
 
   .commendTabsItem {
+    position: relative;
+    max-width: 302px;
+    height: 332px;
     flex: 1;
     padding-top: 20px;
     text-align: center;
@@ -50,7 +66,8 @@
       margin-right: 0;
     }
 
-    .icon img {
+    img {
+      height: 96px;
       width: 96px;
     }
 
@@ -62,13 +79,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