Преглед изворни кода

💄 增加PDF显示,修改细节问题

快乐的梦鱼 пре 3 недеља
родитељ
комит
7fa8753d8f

+ 1 - 1
src/api/CommonContent.ts

@@ -228,7 +228,7 @@ export class GetContentDetailItem extends DataModel<GetContentDetailItem> {
       if (!this.image && this.images && this.images && this.images.length > 0  ) {
         this.image = this.images[0]
       }
-      if ((!this.images || this.images.length == 0) && this.image) {
+      if ((!this.images || this.images.length == 0) && this.image && this.image != '') {
         this.images = [ this.image ]
       }
     }

+ 29 - 9
src/assets/scss/news.scss

@@ -349,33 +349,53 @@
     overflow: hidden;
     margin: 20px 0;
 
-    img {
+    &.float {
+      img {
+        width: 100%;
+        height: 30vh;
+        max-height: 250px;
+        object-fit: contain;
+        background-color: $border-split-color;
+      }
+    }
+    &.large {
       width: 100%;
-      height: 30vh;
-      max-height: 250px;
-      object-fit: contain;
-      background-color: $border-split-color;
+      height: 60vh;
+
+      img {
+        width: 50%;
+        height: 60vh;
+        object-fit: contain;
+        background-color: $border-split-color;
+      }
     }
+
   }
 }
 @media (max-width: 1200px) {
-  .news-detail .carousel {
+  .news-detail .carousel.float {
     width: 300px;
   }
 }
 @media (max-width: 1000px) {
-  .news-detail .carousel {
+  .news-detail .carousel.float {
     width: 40%;
   }
+  .news-detail .carousel.large img {
+    width: 70%;
+  }
 }
 @media (max-width: 768px) {
-  .news-detail .carousel {
+  .news-detail .carousel.float {
     width: 60%;
   }
+  .news-detail .carousel.large img {
+    width: 100%;
+  }
 }
 
 @media (min-width: 808px) {
-  .news-detail .carousel {
+  .news-detail .carousel.float {
     width: 300px;
     float: right;
     margin: 0;

+ 15 - 15
src/views/InheritorView.vue

@@ -57,16 +57,6 @@
       </div>
     </section>
 
-    <!-- 重要相关文物古迹 -->
-    <section class="main-section pb-0">
-      <div class="content">
-        <div class="title">
-          <h2>重要相关文物古迹</h2>
-        </div>
-        <ThreeImageList :list="list2" />
-      </div>
-    </section>
-
     <!-- 世界文化遗产 -->
     <section class="main-section pb-0">
       <div class="content">
@@ -85,6 +75,16 @@
       </div>
     </section>
 
+    <!-- 重要相关文物古迹 -->
+    <section class="main-section pb-0">
+      <div class="content">
+        <div class="title">
+          <h2>重要相关文物古迹</h2>
+        </div>
+        <ThreeImageList :list="list2" />
+      </div>
+    </section>
+
     <!-- 历史文化街区 -->
     <section class="main-section pb-0">
       <div class="content">
@@ -104,14 +104,14 @@
       </div>
     </section>
 
-    <!-- 闽南语 -->
+    <!-- 重要闽南记忆遗产 -->
     <section class="main-section">
       <div class="content">
         <div class="title">
-          <h2>闽南语</h2>
+          <h2>重要闽南记忆遗产</h2>
         </div>
         <LeftRightBox 
-          title="闽南语"
+          title="重要闽南记忆遗产"
           :image="Image10"
           :showExpand="false"
           :rightItems="minnanyuLoader.content.value"
@@ -227,8 +227,8 @@ const blockData = useSimpleDataLoader(async () =>
 )
 const minnanyuLoader = useSimpleDataLoader(async () => 
  (await CommonContent.getContentList(new GetContentListParams()
-    .setModelId(5)
-    .setMainBodyColumnId([257,235,237,210])
+    .setModelId(18)
+    .setMainBodyColumnId(318)
   , 1, 6)).list
 )
 const overviewsLoader = useSimpleDataLoader(async () => {

+ 17 - 3
src/views/NewsDetailView.vue

@@ -14,8 +14,9 @@
           </div>
 
           <h1>{{ newsLoader.content.value.title }}</h1>
-          <div class="d-flex flex-row justify-content-center">
+          <div class="d-flex flex-row justify-content-center gap-3" >
             <span v-if="newsLoader.content.value.from" class="small-info">转自:{{ newsLoader.content.value.from }}</span>
+            <span v-if="newsLoader.content.value.regionText" class="small-info">区域:{{ newsLoader.content.value.regionText }}</span>
             <span class="small-info">时间:{{ DateUtils.formatDate(newsLoader.content.value.publishAt, DateUtils.FormatStrings.YearCommonShort) }}</span>
           </div>
    
@@ -32,6 +33,13 @@
             :src="newsLoader.content.value.video" 
           />
 
+          <iframe 
+            v-if="newsLoader.content.value.type === 5 && newsLoader.content.value.archives" 
+            class="w-100 mt-3"
+            :style="{ height: '90vh' }" 
+            :src="(newsLoader.content.value.archives as string[])[0]" 
+          />
+
           <SimpleRichHtml 
             class="news-content mt-3"
             :contents="[
@@ -48,7 +56,10 @@
                 :itemsToShow="1"
                 wrapAround
                 :autoPlay="5000"
-                class="carousel float"
+                :class="[
+                  'carousel large',
+                  //!newsLoader.content.value.content ? 'large' : 'float',
+                ]"
               >
                 <Slide v-for="(image, key) in newsLoader.content.value.images" :key="key">
                   <img :src="image" />
@@ -105,7 +116,10 @@ const newsLoader = useSimpleDataLoader<GetContentDetailItem, {
 }>(async (p) => {
   if (!p)
     throw new Error('参数错误');
-  return (await NewsIndexContent.getContentDetail<GetContentDetailItem>(p.id, p.modelId ? p.modelId : undefined));
+  const z = (await NewsIndexContent.getContentDetail<GetContentDetailItem>(p.id, p.modelId ? p.modelId : undefined));
+  console.log(z);
+  return z;
+  
 }, false)
 
 useLoadQuerys({

+ 1 - 0
src/views/details/TabDetailView.vue

@@ -17,6 +17,7 @@
           <h1>{{ loader.content.value.title }}</h1>
           <p class="d-flex flex-row justify-content-between small-info">
             <span>{{ loader.content.value.address }}</span>
+            <span v-if="loader.content.value.regionText">区域:{{ loader.content.value.regionText }}</span>
             <span v-if="loader.content.value.from" >转自:{{ loader.content.value.from }}</span>
           </p>
 

+ 2 - 2
src/views/fusion/fashion.vue

@@ -34,7 +34,7 @@ async function loadData(
 ) {
   _selectedTag = selectedTag;
   const res = await CustomContent.getContentList(new GetContentListParams()
-    .setModelId(tagsData.value.find((item) => item.id == selectedTag)?.modelId || 0)
+    .setModelId(16)
     .setMainBodyColumnId(selectedTag > 0 ? selectedTag : 0)
     .setKeywords(searchText)
   , page, pageSize);
@@ -56,7 +56,7 @@ async function loadData(
 
 //子分类
 const tagsData = ref([
-  { modelId: 4, id: 276, name: '闽南时尚' },
+  { modelId: 16, id: 291, name: '闽南时尚' },
   { modelId: 16, id: 191, name: '闽南语经典歌曲' },
   { modelId: 16, id: 190, name: '南音' },
   { modelId: 16, id: 189, name: '闽南童谣' },

+ 4 - 4
src/views/inheritor/language.vue

@@ -1,7 +1,7 @@
 <template>
-  <!-- 文化传承 - 闽南语 -->
+  <!-- 文化传承 - 重要闽南记忆遗产 -->
   <CommonListPage
-    :title="'闽南语'"
+    :title="'重要闽南记忆遗产'"
     :prevPage="{ title: '文化传承' }"
     :dropDownNames="[]"
     :showSearch="true"
@@ -27,8 +27,8 @@ async function loadData(
 ) {
 
   const res = await LanguageContent.getContentList(new GetContentListParams()
-    .setMainBodyColumnId([257,235,237,210])
-    .setModelId(5)
+    .setMainBodyColumnId(318)
+    .setModelId(18)
     .setKeywords(searchText)
   , page, pageSize);