zs 8 hónapja
szülő
commit
19e1332ce0
3 módosított fájl, 17 hozzáadás és 8 törlés
  1. 10 3
      src/views/detail/news.vue
  2. 4 3
      src/views/nine/index.vue
  3. 3 2
      src/views/one/index.vue

+ 10 - 3
src/views/detail/news.vue

@@ -6,9 +6,9 @@
           <h2 class="name">双高新闻资讯</h2>
           <h5 class="remark">跟紧政策指引方向 &nbsp;&nbsp;&nbsp; 抓牢各地双高机遇</h5>
           <div class="search">
-            <el-input v-model="input1" size="large" placeholder="请输入关键字" :suffix-icon="Search">
+            <el-input v-model="searchForm.title" size="large" placeholder="请输入关键字" :suffix-icon="Search">
               <template #append>
-                <el-button type="primary" size="large">搜索</el-button>
+                <el-button type="primary" size="large" @click="toSearchInfo">搜索</el-button>
               </template>
             </el-input>
           </div>
@@ -96,6 +96,8 @@ let limit = inject('limit')
 const total = ref(0)
 const achievementList = ref([])
 const projectList = ref([])
+// 搜索
+const searchForm = ref({})
 // 请求
 onMounted(async () => {
   loading.value = true
@@ -124,7 +126,8 @@ const search = async (query = { skip, limit }) => {
     limit: query.limit,
     type: route.query.type,
     status: '1',
-    is_use: '0'
+    is_use: '0',
+    ...searchForm.value
   }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -132,6 +135,10 @@ const search = async (query = { skip, limit }) => {
     total.value = res.total
   }
 }
+// 搜索
+const toSearchInfo = async () => {
+  await search({ skip, limit })
+}
 // 查看
 const toView = (item) => {
   router.push({ path: `/news/detail`, query: { id: item.id || item._id } })

+ 4 - 3
src/views/nine/index.vue

@@ -109,15 +109,15 @@
             <div class="list_2">
               <div class="other">
                 <el-image class="image" :src="one" fit="fill" />
-                <div class="text">{{ item.field || '暂无' }}</div>
+                <div class="text textOne">{{ item.field || '暂无' }}</div>
               </div>
               <div class="other">
                 <el-image class="image" :src="two" fit="fill" />
-                <div class="text">{{ item.person || '暂无' }}</div>
+                <div class="text textOne">{{ item.person || '暂无' }}</div>
               </div>
               <div class="other">
                 <el-image class="image" :src="thr" fit="fill" />
-                <div class="text">{{ item.source || '暂无' }}</div>
+                <div class="text textOne">{{ item.source || '暂无' }}</div>
               </div>
             </div>
           </div>
@@ -377,6 +377,7 @@ const sizeChange = (limits) => {
             margin: 0 5px 0 0;
           }
           .text {
+            max-width: 260px;
             font-size: $global-font-size-16;
             line-height: 32px;
             color: #404040;

+ 3 - 2
src/views/one/index.vue

@@ -102,7 +102,7 @@
       </div>
       <div class="thr_2">
         <div class="left">
-          <el-image v-if="matchInfo.file && matchInfo.file.length > 0" class="image" :src="getUrl(matchInfo.file)" fit="cover">
+          <el-image v-if="matchInfo.file && matchInfo.file.length > 0" class="image" :src="getUrl(matchInfo.file, 'array')" fit="cover">
             <template v-slot:error>
               <el-image class="image" :src="match_3" fit="fill" />
             </template>
@@ -120,7 +120,7 @@
         </div>
         <div class="right">
           <div class="list" v-for="(item, index) in matchList" :key="index">
-            <el-image v-if="item.file && item.file.length > 0" class="image" :src="getUrl(item.file)" fit="cover">
+            <el-image v-if="item.file && item.file.length > 0" class="image" :src="getUrl(item.file, 'array')" fit="cover">
               <template v-slot:error>
                 <el-image class="image" :src="match_3" fit="fill" />
               </template>
@@ -439,6 +439,7 @@ const getUrl = (item, type) => {
         font-size: $global-font-size-20;
       }
       .brief {
+        min-height: 60px;
         margin-bottom: 20px !important;
         font-size: $global-font-size-16;
         color: #717794;