root 2 years ago
parent
commit
68fd5ad0c3
1 changed files with 16 additions and 3 deletions
  1. 16 3
      src/layout/search/index.vue

+ 16 - 3
src/layout/search/index.vue

@@ -10,7 +10,7 @@
     <div class="mt-20 padding">
       <span class="bold font-16">文档(393030)</span>
       <div class="flex mt-20">
-        <div class="full-width mt-10 list">
+        <div class="full-width mt-10 list" v-if="list.length > 0">
           <div v-for="i in list" :key="i">
             <div class="padding border-bottom">
               (初设批复)云县火车站站前广场及综合配套工程.pdf
@@ -18,7 +18,9 @@
           </div>
         </div>
         <div>
-          <div class="full-height full-width preview">dd</div>
+          <div class="full-height full-width preview" v-if="current">
+            <img class="img" :src="current.images[0].imagePath" />
+          </div>
           <div class="flex flex-center flex-justify-between padding">
             <div>
               <el-button type="primary" icon="ArrowLeftBold" circle />
@@ -48,7 +50,8 @@ export default {
       // fixme  测试
       keyword: '禄丰',
       page: { current: 1, size: 10 },
-      list: []
+      list: [],
+      current: null
     }
   },
   methods: {
@@ -58,6 +61,12 @@ export default {
         if (res.code === 200) {
           console.log(res.data)
           this.list = res.data.records
+          if (this.list.length > 0) {
+            this.current = this.list[0]
+          } else {
+            console.log('33')
+          }
+          console.log(this.current)
         } else {
           console.log(res.msg)
         }
@@ -90,6 +99,10 @@ export default {
   padding: 10px;
   margin: 10px;
   border-radius: 8px;
+  .img {
+    width: 100px;
+    height: 120px;
+  }
 }
 .tips {
   width: 260px;