浏览代码

🚧 修改闽南文化概况栏目ID

快乐的梦鱼 2 周之前
父节点
当前提交
85968e1392
共有 1 个文件被更改,包括 7 次插入4 次删除
  1. 7 4
      pages/about/index.vue

+ 7 - 4
pages/about/index.vue

@@ -42,7 +42,7 @@
       <div class="content">   
         <SimplePageContentLoader :loader="introdLoader">
           <div class="d-flex justify-content-center">
-            <h2>{{ introdLoader.content.value?.introd1?.title }}</h2>
+            <h2>{{ introdLoader.content.value?.introd1?.title || '无法找到数据' }}</h2>
           </div>
           <LeftRightBox 
             class="mt-4"
@@ -53,7 +53,7 @@
             :moreLink="router.resolve({ path: '/introduction/about' }).href"
           />
           <div class="d-flex justify-content-center mt-5">
-            <h2>{{ introdLoader.content.value?.introd2?.title }}</h2>
+            <h2>{{ introdLoader.content.value?.introd2?.title || '无法找到数据' }}</h2>
           </div>
           <LeftRightBox 
             class="mt-4"
@@ -63,7 +63,7 @@
             :moreLink="router.resolve({ path: '/introduction/about' }).href"
           />
           <div class="d-flex justify-content-center mt-5">
-            <h2>{{ introdLoader.content.value?.introd3?.title }}</h2>
+            <h2>{{ introdLoader.content.value?.introd3?.title || '无法找到数据' }}</h2>
           </div>
           <LeftRightBox 
             class="mt-4"
@@ -180,16 +180,19 @@ const introdLoader = await useSSrSimpleDataLoader('introd', async () => {
       , 1, 10);
   const res2 = await CommonContent.getContentList(new GetContentListParams()
         .setModelId(17)
-        .setMainBodyColumnId([ 234 ])
+        .setMainBodyColumnId([ 256,283 ])
       , 1, 10);
 
   const id1 = res2.list.find(item => item.title.includes('厦门'))?.id; 
   const id2 = res2.list.find(item => item.title.includes('闽南') && !item.title.includes('厦门'))?.id; 
   const id3 = res2.list.find(item => item.title.includes('全国'))?.id; 
+
+  console.log(res2, id1, id2, id3);
   
   const introd1 = id1 ? (await NewsIndexContent.getContentDetail(id1)).toJSON() : undefined;
   const introd2 = id2 ? (await NewsIndexContent.getContentDetail(id2)).toJSON() : undefined;
   const introd3 = id3 ? (await NewsIndexContent.getContentDetail(id3)).toJSON() : undefined;
+
   return {
     introd1,
     introd2,