Parcourir la source

公众号图标显示

zero il y a 1 mois
Parent
commit
12c5196b49
1 fichiers modifiés avec 18 ajouts et 3 suppressions
  1. 18 3
      src/views/NewsList.vue

+ 18 - 3
src/views/NewsList.vue

@@ -101,9 +101,15 @@
         </el-table-column>
         <el-table-column prop="title" label="标题" min-width="200">
           <template #default="scope">
-            <el-link :href="scope.row.articleUrl" target="_blank" :underline="false">
-              {{ scope.row.title }}
-            </el-link>
+            <div>
+              <div v-if="scope.row.wxArticleIcon" style="width: 50px;height: 50px;background:#ede8e8;">
+                <img style="width: 100%;height:100%;object-fit: contain;" :src="getDownloadPath(scope.row.wxArticleIcon)" ></img>
+              </div>
+              <el-link :href="scope.row.articleUrl" target="_blank" :underline="false">
+                {{ scope.row.title }}
+              </el-link>
+            </div>
+            
           </template>
         </el-table-column>
         <el-table-column prop="sourceName" label="来源名称" width="150"></el-table-column>
@@ -316,6 +322,15 @@ const showSelectedNews = ref(false)
 const selectedReportId = ref<number | null>(null)
 const newsTableRef = ref<TableInstance>()
 
+//获取下载地址
+const getDownloadPath = (guid: string) => {
+  if (!guid) {
+    return ''
+  }
+  return `/api/fileManager/downloadFile?fileId=${guid}`
+}
+
+
 // Search form
 const searchForm = reactive({
   beginTime: '',