瀏覽代碼

🎨 按要求调整首页

快乐的梦鱼 3 天之前
父節點
當前提交
6192fbf237

+ 6 - 0
src/pages/article/common/CommonContent.ts

@@ -99,6 +99,12 @@ const resolveCommonContentData = {
     });
     return item;
   },
+  'inheritor-deadbox': (item: GetContentListItem[]) => {
+    item.forEach(it => {
+      it.titleBox = Boolean(it.deathBirth);
+    });
+    return item;
+  },
 } as Record<string, (item: GetContentListItem[]) => GetContentListItem[]>
 
 export function resolveCommonContentSolveProps(res: GetContentListItem[], dataSolve: IHomeCommonCategoryListTabListDataSolve[]) {

+ 15 - 2
src/pages/article/data/CommonCategoryBlocks.vue

@@ -32,6 +32,7 @@
               v-for="(item, i) in category.data.content.value" 
               :key="i" 
               :title="item.title"
+              :titleBox="item.titleBox"
               :desc="item.desc"
               :tags="(item.bottomTags as string[])"
               @click="category.detailsPage(item)"
@@ -46,6 +47,7 @@
                 title1
                 :key="i"
                 :title="item.title"
+                :titleBox="Boolean(item.titleBox)"
                 :desc="item.desc"
                 :image="item.image"
                 :tags="(item.bottomTags as string[])"
@@ -64,6 +66,7 @@
                   title1
                   :key="i"
                   :title="item.title"
+                  :titleBox="Boolean(item.titleBox)"
                   :desc="item.desc"
                   :image="item.image"
                   :tags="(item.bottomTags as string[])"
@@ -83,6 +86,7 @@
                   fixSize
                   :key="i"
                   :title="item.title"
+                  :titleBox="Boolean(item.titleBox)"
                   :desc="item.desc"
                   :image="item.thumbnail || item.image"
                   :tags="(item.bottomTags as string[])"
@@ -100,6 +104,7 @@
                 fixSize
                 :key="i"
                 :title="item.title"
+                :titleBox="Boolean(item.titleBox)"
                 :desc="item.desc"
                 :image="item.image"
                 :tags="(item.bottomTags as string[])"
@@ -140,6 +145,7 @@
                 fixSize
                 :key="i"
                 :title="item.title"
+                :titleBox="Boolean(item.titleBox)"
                 :desc="item.desc"
                 :showImage="false"
                 :tags="(item.bottomTags as string[])"
@@ -153,6 +159,7 @@
               fixSize
               :key="i"
               :title="item.title"
+              :titleBox="Boolean(item.titleBox)"
               :desc="item.desc"
               :image="item.image"
               :tags="(item.bottomTags as string[])"
@@ -234,9 +241,12 @@ const categoryDatas = computed(() => props.categoryDefine.map(item => {
         if (item.morePage) {
           navTo(item.morePage, {});
         } else {
+          let mainBodyColumnId : any = content.mainBodyColumnId;
+          if (item.data.type === 'serializedApi' && item.data.params?.mainBodyColumnId)
+            mainBodyColumnId = item.data.params.mainBodyColumnId;
           navCommonList({
             title: item.title,
-            mainBodyColumnId: content.mainBodyColumnId,
+            mainBodyColumnId: mainBodyColumnId,
             modelId: content.modelId,
             detailsPage: item.detailsPage,
             dataSolve: item.dataSolve || [],
@@ -244,8 +254,11 @@ const categoryDatas = computed(() => props.categoryDefine.map(item => {
         }
       },
       data: useSimpleDataLoader(async () => {
+        const params = new GetContentListParams();
+        if (item.data.type === 'serializedApi' && item.data.params?.mainBodyColumnId)
+          params.setMainBodyColumnId(item.data.params.mainBodyColumnId);
         let res = (await (item.content as CommonContentApi)
-          .getContentList(new GetContentListParams(), 1, item.count || 4))
+          .getContentList(params, 1, item.count || 4))
           .list;
         return resolveCommonContentSolveProps(res, item.dataSolve || []);;
       }, false)

+ 22 - 15
src/pages/article/data/DefaultCategory.json

@@ -12,45 +12,51 @@
           "homeButtons": [
             {
               "title": "常识一点通",
-              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button11.png",
+              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button61.png",
               "size": 50,
               "link": "/pages/article/data/list?pageConfigName=explore",
-              "style": "large-bg"
+              "style": "large-bg",
+              "showTitle": false
             },
             {
               "title": "闽南新鲜事",
-              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button4.png",
+              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button62.png",
               "size": 50,
               "link": "/pages/article/data/list?pageConfigName=news",
-              "style": "large-bg"
+              "style": "large-bg",
+              "showTitle": false
             },
             {
               "title": "遗产报你知",
-              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button12.png",
+              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button63.png",
               "size": 50,
               "link": "/pages/article/data/list?pageConfigName=inhert",
-              "style": "large-bg"
+              "style": "large-bg",
+              "showTitle": false
             },
             {
               "title": "文化新视角",
-              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button14.png",
+              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button64.png",
               "size": 50,
               "link": "/pages/article/data/list?pageConfigName=research",
-              "style": "large-bg"
+              "style": "large-bg",
+              "showTitle": false
             },
             {
               "title": "世界走透透",
-              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button15.png",
+              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button65.png",
               "size": 50,
               "link": "/pages/article/data/list?pageConfigName=communicate",
-              "style": "large-bg"
+              "style": "large-bg",
+              "showTitle": false
             },
             {
-              "title": "来厦门䢐迌",
-              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button16.png",
+              "title": "来厦门逛逛",
+              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button66.png",
               "size": 50,
               "link": "/pages/article/data/list?pageConfigName=travel",
-              "style": "large-bg"
+              "style": "large-bg",
+              "showTitle": false
             }
           ],
           "categorys": [
@@ -1010,9 +1016,10 @@
                     "name": "InheritorContent"
                   },
                   "dataSolve": [
-                    "ich"
+                    "ich",
+                    "inheritor-deadbox"
                   ],
-                  "morePage": "/pages/article/data/list?pageConfigName=inheritor&tab=0",
+                  "morePage": "/pages/inhert/inheritor/list",
                   "detailsPage": "/pages/article/data/details?pageConfigName=inheritor-details",
                   "type": "horizontal-large"
                 },

+ 2 - 13
src/pages/article/data/defines/List.ts

@@ -200,19 +200,8 @@ export function CommonCategoryListTabNestCategoryDataToContent(
   if (!data)
     return null;
   switch (data.type) {
-    case 'serializedApi': {
-      const api = CommonCategoryDynamicDataSerializedApi(data);
-      return {
-        title: define.text,
-        mainBodyColumnId: data.params?.mainBodyColumnId ?? api.mainBodyColumnId,
-        modelId: api.modelId,
-        itemType: define.itemType,
-        detailsPage: define.detailsPage || 'byContent',
-        count: define.count,
-        params: (define.data as IHomeCommonCategoryDynamicDataCommonContent).otherParams || {},
-        dataSolve: define.dataSolve || [],
-      } as HomeCommonCategoryBlockProps;
-    }
+    case 'serializedApi':
+      return CommonCategoryDynamicDataSerializedApi(data);
     case 'detailContent':
       return data;
     case 'parentKey':

+ 2 - 0
src/pages/article/data/editor/components/DataSolveEditor.vue

@@ -25,6 +25,8 @@ const dataSolveOptions = [
   { value: 'common', label: '通用' },
   { value: 'date', label: '日期' },
   { value: 'form', label: '来源' },
+  { value: 'inheritor-deadbox', label: '传承人死亡盒子' },
+  { value: 'inheritor', label: '年代' },
 ];
 
 const localValue = ref<string[]>(props.modelValue || []);

+ 1 - 1
src/pages/blocks/AudioBlock.vue

@@ -1,5 +1,5 @@
 <template>
-  <view class="position-relative d-flex flex-row flex-wrap justify-between mt-3">
+  <view class="position-relative d-flex flex-row flex-wrap justify-between">
     <Box1AudioPlay
       class="w-100" 
       :title="indexAudioPlayer.currentTitle.value"

+ 3 - 2
src/pages/home/index.vue

@@ -159,10 +159,11 @@ onShareAppMessage(() => {
     }
     
     .title {
-      font-size: 40rpx;
+      font-size: 47rpx;
+      letter-spacing: -0.2rem;
     }
     text {
-      font-size: 35rpx;
+      font-size: 36rpx;
       letter-spacing: -0.06rem;
       margin-top: 10rpx;
     }

+ 1 - 0
src/pages/inhert/inheritor/list.vue

@@ -32,6 +32,7 @@ async function loadData(
   }), page, pageSize));
   res.list.forEach((p) => {
     p.desc = p.ichName as string;
+    p.titleBox = Boolean(p.deathBirth);
     p.bottomTags = [
       p.levelText, 
       p.nation,