Przeglądaj źródła

🎨 按要求调整首页

快乐的梦鱼 3 dni temu
rodzic
commit
3fe97858bf

+ 12 - 1
src/pages/article/common/CommonListPage.vue

@@ -314,7 +314,7 @@ const listLoader = useSimplePageListLoader(props.pageSize, async (page, pageSize
   return await props.load(
     page, pageSize, 
     searchValue.value,
-    dropDownValues.value,
+    getDropDownValues(),
     props.tabs?.[tabCurrentIndex.value]?.id ?? tabCurrentIndex.value,
   )
 });
@@ -322,6 +322,17 @@ const tabCurrentIndex = ref(0)
 const tabCurrentId = computed(() => props.tabs?.[tabCurrentIndex.value]?.id ?? -1)
 const showList = computed(() => !props.showListTabIds || props.showListTabIds.includes(tabCurrentId.value))
 
+
+function getDropDownValues() {
+  const result = [] as number[];
+  let c = 0;
+  for (const element of props.dropDownNames) {
+    if (!element.activeTab || element.activeTab.includes(tabCurrentId.value))
+      result.push(dropDownValues.value[c]);
+    c++;
+  }
+  return result;
+}
 function handleChangeDropDownValue(index: number, value: number) {
   dropDownValues.value[index] = value;
   listLoader.loadData(undefined, true);

+ 5 - 4
src/pages/article/data/CommonCategoryBlocks.ts

@@ -7,7 +7,7 @@ export interface CategoryDefine extends Omit<IHomeCommonCategoryListTabNestCateg
   title: string;
   showTitle: boolean;
   content: CommonContentApi|IHomeCommonCategoryBlock|HomeCommonCategoryBlockProps|IHomeCommonCategoryDynamicDataDetailContent|null;
-  type?: 'article'|'large-image2'|'horizontal-large'|'large-image'|'large-grid2'|'small-grid2'|'simple-text'
+  type?: 'article'|'large-image2'|'horizontal-large'|'large-image'|'large-grid2'|'small-grid2'|'simple-article'|'simple-text'
     |'default'
     |'CalendarBlock'|'StatsBlock'|'MapBlock'|'AudioBlock'
     |undefined;
@@ -16,12 +16,13 @@ export interface CategoryDefine extends Omit<IHomeCommonCategoryListTabNestCateg
 export const CommonCategoryBlockType : CategoryDefine['type'][] = [
   'default',
   'article',
-  'large-image2',
-  'horizontal-large',
+  'simple-article',
+  'simple-text',
   'large-image',
+  'large-image2',
   'large-grid2',
   'small-grid2',
-  'simple-text',
+  'horizontal-large',
   'CalendarBlock',
   'StatsBlock',
   'MapBlock',

+ 40 - 11
src/pages/article/data/CommonCategoryBlocks.vue

@@ -27,16 +27,18 @@
       <!--通用列表-->
       <SimplePageContentLoader v-else-if="category.data" :loader="category.data" >
         <FlexCol>
-          <template v-if="category.type === 'article'">
-            <Box2LineRightShadow
-              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)"
-            />
+          <template v-if="category.type === 'simple-article'">
+            <FlexCol :margin="[10, 0]">
+              <Box2LineRightShadow
+                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)"
+              />
+            </FlexCol>
           </template>
           <template v-else-if="category.type === 'large-image'">
             <FlexCol>
@@ -152,6 +154,21 @@
               />
             </FlexCol>
           </template>
+          <template v-else-if="category.type === 'article'">
+            <Box2LineImageRightShadow
+              v-for="(item, i) in category.data.content.value"
+              titleColor="title-text"
+              fixSize
+              wideImage
+              :key="i"
+              :title="item.title"
+              :titleBox="Boolean(item.titleBox)"
+              :desc="item.desc"
+              :image="item.image"
+              :tags="(item.bottomTags as string[])"
+              @click="category.detailsPage(item)"
+            />
+          </template>
           <template v-else>
             <Box2LineImageRightShadow
               v-for="(item, i) in category.data.content.value"
@@ -309,4 +326,16 @@ function loadCategoryDatas() {
 
 watch(categoryDatas, loadCategoryDatas);
 onMounted( loadCategoryDatas);
-</script>
+</script>
+
+<style lang="scss">
+.grid4-item {
+  width: 320rpx;
+
+  .tag {
+    top: 2rpx; 
+    right: 2rpx;
+    z-index: 20;
+  }
+}
+</style>

+ 1 - 1
src/pages/article/data/CommonCategoryDetail.vue

@@ -323,7 +323,7 @@ async function load(id: number, tabsArray: DetailTabPageTabsArray) {
     else if (tab.type === 'video')
       check = Boolean(d.video);
     else if (tab.type === 'images')
-      check = Boolean(d.images) && (d.images as string[]).length > 0;
+      check = Boolean(d.images) && (d.images as string[]).length > 1;
     else if (!v)
       check = false;
     else if (Array.isArray(v))

+ 2 - 0
src/pages/article/data/CommonCategoryDynamicData.ts

@@ -208,6 +208,8 @@ export async function doLoadDynamicListData(
       const params = new GetContentListParams();
       if (item.params?.mainBodyColumnId)
         params.setMainBodyColumnId(item.params.mainBodyColumnId);
+
+      console.log('aaaa', dropDownValues, dropdownDefines);
       return (await CommonCategoryDynamicDataSerializedApi(item).getContentList(
         params
         .setKeywords(keywords)

+ 7 - 7
src/pages/article/data/DefaultCategory.json

@@ -12,7 +12,7 @@
           "homeButtons": [
             {
               "title": "常识一点通",
-              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button61.png",
+              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button71.png",
               "size": 50,
               "link": "/pages/article/data/list?pageConfigName=explore",
               "style": "large-bg",
@@ -20,7 +20,7 @@
             },
             {
               "title": "闽南新鲜事",
-              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button62.png",
+              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button72.png",
               "size": 50,
               "link": "/pages/article/data/list?pageConfigName=news",
               "style": "large-bg",
@@ -28,7 +28,7 @@
             },
             {
               "title": "遗产报你知",
-              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button63.png",
+              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button73.png",
               "size": 50,
               "link": "/pages/article/data/list?pageConfigName=inhert",
               "style": "large-bg",
@@ -36,7 +36,7 @@
             },
             {
               "title": "文化新视角",
-              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button64.png",
+              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button74.png",
               "size": 50,
               "link": "/pages/article/data/list?pageConfigName=research",
               "style": "large-bg",
@@ -44,7 +44,7 @@
             },
             {
               "title": "世界走透透",
-              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button65.png",
+              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button75.png",
               "size": 50,
               "link": "/pages/article/data/list?pageConfigName=communicate",
               "style": "large-bg",
@@ -52,7 +52,7 @@
             },
             {
               "title": "来厦门逛逛",
-              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button66.png",
+              "icon": "https://mncdn.wenlvti.net/app_static/minnan/images/home/Button76.png",
               "size": 50,
               "link": "/pages/article/data/list?pageConfigName=travel",
               "style": "large-bg",
@@ -259,7 +259,7 @@
                   "dataSolve": [
                     "common"
                   ],
-                  "morePage": "/pages/introduction/custom/list",
+                  "morePage": "",
                   "type": "",
                   "textLevel": "h3"
                 },

+ 35 - 1
src/pages/blocks/MapBlock.vue

@@ -87,4 +87,38 @@ const mapLoader = useSimpleDataLoader(async () => {
 
 watch(mapTab, () => mapLoader.loadData(undefined, true));
 
-</script>
+</script>
+
+<style lang="scss">
+.map-tags {
+  left: 0;
+  top: 0;
+  padding: 15rpx 0;
+  font-size: 25rpx;
+
+  .tag-bar {
+    padding: 0 20rpx;
+
+    view {
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+      flex-shrink: 0;
+      border-radius: 40rpx;
+      padding: 10rpx 15rpx;
+      background-color: #f7f3e8;
+      color: #d9492e;
+      margin-right: 10rpx;
+
+      .iconfont {
+        margin-right: 8rpx;
+      }
+      &.active {
+        background-color: #d9492e;
+        color: #f7f3e8;
+      }
+    }
+  }
+}
+
+</style>

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

@@ -93,47 +93,7 @@ onShareAppMessage(() => {
     top: -100rpx;
   }
   .content {
-    margin-top: 400rpx;
-  }
-
-  .map-tags {
-    left: 0;
-    top: 0;
-    padding: 15rpx 0;
-    font-size: 25rpx;
-
-    .tag-bar {
-      padding: 0 20rpx;
-
-      view {
-        display: flex;
-        flex-direction: row;
-        align-items: center;
-        flex-shrink: 0;
-        border-radius: 40rpx;
-        padding: 10rpx 15rpx;
-        background-color: #f7f3e8;
-        color: #d9492e;
-        margin-right: 10rpx;
-
-        .iconfont {
-          margin-right: 8rpx;
-        }
-        &.active {
-          background-color: #d9492e;
-          color: #f7f3e8;
-        }
-      }
-    }
-  }
-  ::v-deep .grid4-item {
-    width: 320rpx;
-
-    .tag {
-      top: 2rpx; 
-      right: 2rpx;
-      z-index: 20;
-    }
+    margin-top: 360rpx;
   }
   .main-banner-box {
     position: relative;
@@ -163,11 +123,11 @@ onShareAppMessage(() => {
     
     .title {
       font-size: 47rpx;
-      letter-spacing: -0.2rem;
+      letter-spacing: -0.15rem;
     }
     text {
       font-size: 36rpx;
-      letter-spacing: -0.06rem;
+      letter-spacing: -0.04rem;
       margin-top: 10rpx;
     }
     .more {

+ 1 - 1
src/pages/parts/Box2LineLargeImageUserShadow.vue

@@ -1,7 +1,7 @@
 <template>
   <view 
     :class="[
-      'position-relative grid4-item',
+      'position-relative',
       'd-flex flex-col shadow-base radius-l bg-base p-2 mb-2 overflow-hidden',
       'border-all-light-light-primary',
       classNames,