Quellcode durchsuchen

🎨 按要求修改

快乐的梦鱼 vor 2 Wochen
Ursprung
Commit
19ce2f21aa

+ 7 - 0
src/pages.json

@@ -180,6 +180,13 @@
       }
     },
     {
+      "path": "pages/inhert/seminar/list",
+      "style": {
+        "navigationBarTitleText": "传习所列表",
+        "enablePullDownRefresh": true
+      }
+    },
+    {
       "path": "pages/inhert/seminar/details",
       "style": {
         "navigationBarTitleText": "传习所详情"

+ 21 - 3
src/pages/article/common/CommonListPage.vue

@@ -111,6 +111,21 @@
           :badge="item.badge"
           @click="goDetails(item, item.id)"
         />
+        <Box2LineImageRightShadow 
+          v-else-if="itemType.startsWith('simple-text')"
+          class="w-100"
+          :classNames="getItemClass(i)"
+          titleColor="title-text"
+          :border="false"
+          :showImage="false"
+          :title="item.title"
+          :titlePrefix="item.titlePrefix"
+          :titleBox="item.titleBox"
+          :tags="item.bottomTags || item.keywords"
+          :desc="item.desc"
+          :badge="item.badge"
+          @click="goDetails(item, item.id)"
+        />
 
       </view>
       <view v-if="itemType.endsWith('-2') && listLoader.list.value.length % 2 != 0" class="width-1-2" />
@@ -206,7 +221,7 @@ const props = defineProps({
    * 列表项类型
    */
   itemType: {
-    type: String as PropType<'image-large-2'|'image-large'|'article-common'|'article-character'>,
+    type: String as PropType<'image-large-2'|'image-large'|'article-common'|'article-character'|'simple-text'>,
     default: 'article-common',
   },
   /**
@@ -360,8 +375,11 @@ onMounted(() => {
   if (props.title)
     uni.setNavigationBarTitle({ title: props.title, })
   loadDropDownValues();
-  if (props.loadMounted)
-    listLoader.loadData(undefined, true);
+  if (props.loadMounted) {
+    setTimeout(() => {
+      listLoader.loadData(undefined, true);
+    }, 500);
+  }
 });
 </script>
 

+ 17 - 5
src/pages/home.vue

@@ -208,6 +208,7 @@ import SimplePageContentLoader from "@/common/components/SimplePageContentLoader
 import HorizontalScrollText from '@/components/typography/HorizontalScrollText.vue';
 import Image from '@/components/basic/Image.vue';
 import HomeButton from './parts/HomeButton.vue';
+import { navHomePageMiniCommonListGo } from './article/common/CommonContent';
 
 const mapCtx = uni.createMapContext('map');
 const mapTab = ref(1);
@@ -352,7 +353,7 @@ const statsLoader = useSimpleDataLoader(async () => {
           value: item.total,
           titleSuffix: '处',
           type: 'normal',
-          onClick: () => navTo('/pages/inhert/map/index', { tab: 2 }),
+          onClick: () => navTo('/pages/inhert/seminar/list', { region: item.id }),
         }
       }),
     },
@@ -364,15 +365,24 @@ const statsLoader = useSimpleDataLoader(async () => {
           value: item.total,
           titleSuffix: '处',
           onClick: () => {
-            console.log(item.title);
-            
             switch (item.title) {
               case '世界文化遗产':
-                //TODO
+                navHomePageMiniCommonListGo({
+                  title: '世界文化遗产',
+                  modelId: 17,
+                  mainBodyColumnId: 310
+                });
                 break;
               case '传统村落':
                 navTo('/pages/inhert/village/list');
                 break;
+              case '重点区域':
+                navHomePageMiniCommonListGo({
+                  title: '重点区域',
+                  modelId: 17,
+                  mainBodyColumnId: 283
+                });
+                break;
             }
           },
         }
@@ -386,7 +396,9 @@ const statsLoader = useSimpleDataLoader(async () => {
           title: item.title,
           value: item.total,
           titleSuffix: '处',
-          onClick: () => navTo('/pages/inhert/artifact/list'),
+          onClick: () => navTo('/pages/inhert/artifact/list', {
+            level: item.level
+          }),
         }
       }),
     },

+ 13 - 0
src/pages/inhert/artifact/list.vue

@@ -55,6 +55,7 @@ import SimpleDropDownPicker from '@/common/components/SimpleDropDownPicker.vue';
 import AppCofig from '@/common/config/AppCofig';
 import Tabs from '@/components/nav/Tabs.vue';
 import SearchBar from '@/components/form/SearchBar.vue';
+import { useLoadQuerys } from '@/common/composeabe/LoadQuerys';
 
 const categoryData = useSimpleDataLoader(async () => 
   [{
@@ -124,7 +125,19 @@ const listLoader = useSimplePageListLoader<{
   }), total: res.total }
 });
 
+useLoadQuerys({
+  region: 0,
+  level: 0,
+}, (querys) => {
+  if (querys.level)
+    selectedLevel.value = querys.level;
+  if (querys.region)
+    selectedRegion.value = querys.region;
+  setTimeout(doSearch, 1000);
+});
+
 watch(selectedLevel, () => {
+    console.log('watchselectedLevel.value', selectedLevel.value);
   listLoader.loadData(undefined, true);
 });
 watch(selectedRegion, () => {

+ 78 - 0
src/pages/inhert/seminar/list.vue

@@ -0,0 +1,78 @@
+<template>
+  <CommonListPage 
+    title="非遗传习所"
+    itemType="article-character"
+    detailsPage="/pages/inhert/seminar/details"
+    showTotal
+    :dropDownNames="dropdownNames"
+    :load="loadData" 
+  />
+</template>
+
+<script setup lang="ts">
+import CommonContent, { GetContentListParams } from '@/api/CommonContent';
+import SeminarContent from '@/api/inheritor/SeminarContent';
+import CommonListPage, { type DropDownNames } from '@/pages/article/common/CommonListPage.vue';
+import { onLoad } from '@dcloudio/uni-app';
+import { onMounted, ref } from 'vue';
+
+const dropdownNames = ref<DropDownNames[]>([]);
+
+async function loadData(
+  page: number, 
+  pageSize: number,
+  searchText: string,
+  dropDownValues: number[]
+) {
+  const res = (await SeminarContent.getContentList(new GetContentListParams().setSelfValues({
+    ichType: dropDownValues[0] == 0 ? undefined: dropDownValues[0],
+    level: dropDownValues[1] == 0 ? undefined: dropDownValues[1],
+    region: dropDownValues[2] == 0 ? undefined: dropDownValues[2],
+    keywords: searchText,
+  }), page, pageSize));
+  res.list.forEach((p) => {
+    p.titleBox = Boolean(p.deathBirth);
+    p.desc = p.ichName as string;
+    p.bottomTags = [
+      p.levelText, 
+      p.nation,
+    ];
+  })
+  return res;
+}
+
+onLoad(async (querys) => {
+  dropdownNames.value.push({ 
+    options: [{
+      id: 0, 
+      name: '全部类别'
+    }].concat((await CommonContent.getCategoryList(4)).map((item) => ({
+      id: item.id,
+      name: item.title,
+    }))),
+    defaultSelectedValue: 0,
+  });
+  const levels = await CommonContent.getCategoryList(2);
+  dropdownNames.value.push({ 
+    options: [{
+      id: 0, 
+      name: '全部级别'
+    }].concat(levels.map((item) => ({
+      id: item.id,
+      name: item.title,
+    }))),
+    activeTab: [0],
+    defaultSelectedValue: querys?.level ?? 0,
+  });
+  dropdownNames.value.push({  
+    options: [{
+      id: 0, 
+      name: '全部区域'
+    }].concat((await CommonContent.getCategoryList(1)).map((item) => ({
+      id: item.id,
+      name: item.title,
+    }))),
+    defaultSelectedValue: querys?.region ?? 0,
+  });
+})
+</script>

+ 7 - 2
src/pages/inhert/unit/list.vue

@@ -1,7 +1,7 @@
 <template>
   <CommonListPage 
     title="保护单位"
-    itemType="article-common"
+    itemType="simple-text"
     detailsPage="disabled"
     showTotal
     :dropDownNames="dropdownNames"
@@ -31,7 +31,12 @@ async function loadData(
     .setKeywords(searchText)
   , page, pageSize));
   res.list.forEach((p) => {
-    p.desc = p.ichName as string;
+    p.bottomTags = [
+      p.levelText, 
+      p.ichTypeText, 
+      p.batchText,
+      p.regionText,
+    ] as string[];
   })
   return res;
 }

+ 3 - 3
src/pages/introduction/inhert.vue

@@ -47,13 +47,13 @@
         <Box2LineImageRightShadow
           v-for="(item, i) in unitData.content.value"
           titleColor="title-text"
+          :border="false"
           fixSize
           :key="i"
           :title="item.title"
           :desc="item.desc"
-          :image="item.image"
+          :showImage="false"
           :tags="item.bottomTags"
-          @click="navTo('inhert/intangible/details', { id: item.id })"
         />
       </FlexCol>
     </SimplePageContentLoader>
@@ -76,7 +76,7 @@
           :desc="item.desc"
           :image="item.image"
           :tags="item.bottomTags"
-          @click="navTo('inhert/seminar/details', { id: item.id })"
+          @click="navTo('/pages/inhert/seminar/details', { id: item.id })"
         />
       </FlexCol>
     </SimplePageContentLoader>

+ 9 - 9
src/pages/introduction/map.vue

@@ -111,22 +111,22 @@ const categoryDefine = [
     title: '艺术特色',
     content: FeatureContent,
   },
-  // {
-  //   title: '建筑文化',
-  //   content: BulidingContent,
-  // },
+  /* {
+    title: '建筑文化',
+    content: BulidingContent,
+  },
   {
     title: '饮食文化',
     content: VictualsContent,
   },
-  // {
-  //   title: '海洋文化',
-  //   content: SeaContent,
-  // },
+  {
+    title: '海洋文化',
+    content: SeaContent,
+  },
   {
     title: '政策法规',
     content: PolicyContent,
-  },
+  },*/
 ]
 const categoryDatas = categoryDefine.map(item => ({
   ...item,

+ 2 - 0
src/pages/introduction/news.vue

@@ -66,6 +66,7 @@ import Box2LineImageRightShadow from '../parts/Box2LineImageRightShadow.vue';
 import Icon from '@/components/basic/Icon.vue';
 import Text from '@/components/basic/Text.vue';
 import Touchable from '@/components/feedback/Touchable.vue';
+import ApiCofig from '@/common/config/ApiCofig';
 
 const searchText = ref('');
 const filterDate = ref(['']);
@@ -74,6 +75,7 @@ const newsLoader = useSimplePageListLoader(10, async (page, pageSize) => {
   return await NewsIndexContent.getContentList(new GetContentListParams().setSelfValues({
     keywords: searchText.value,
     publishAt: filterDate.value[0],
+    platform: ApiCofig.platformId,
   }), page, pageSize);
 });
 

+ 13 - 5
src/pages/parts/Box2LineImageRightShadow.vue

@@ -1,8 +1,10 @@
 <template>
   <view 
-    class="d-flex flex-row flex-grow-1 justify-between shadow-s 
-    radius-base mb-3 p-2 pt-3 pb-3 overflow-hidden
-    border-all-light-light-primary"
+    :class="[
+      'd-flex flex-row flex-grow-1 justify-between',
+      'radius-base mb-3 overflow-hidden',
+      border ? 'border-all-light-light-primary shadow-s p-2 pt-3 pb-3 ' : '' ,
+    ]"
     :style="{ 
       height: 'calc(100% - 20rpx)',
       width: 'calc(100% - 10rpx)',
@@ -21,7 +23,10 @@
           mode="aspectFit"
         />
       </slot>
-      <view class="d-flex flex-col ml-3 flex-one width-500">
+      <view :class="[
+        'd-flex flex-col flex-one width-500',
+        showImage ? 'ml-3' : '',
+      ]">
         <text v-if="titlePrefix" :class="'size-ss color-primary text-lines-3'">{{ titlePrefix }}</text>
         <view class="d-flex flex-row">
           <text :class="[
@@ -54,7 +59,10 @@ defineProps({
     type: String,
     default: '',
   },
-  
+  border: {
+    type: Boolean,
+    default: true,
+  },
   titleBox: {
     type: Boolean,
     default: false,

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

@@ -1,6 +1,6 @@
 <template>
   <view 
-    class="position-relative d-flex flex-row justify-center align-center radius-base bg-light-light-primary p-3 gap-sss"
+    class="position-relative d-flex flex-row justify-center align-center radius-base bg-light-light-primary p-2 pt-3 pb-3 gap-sss"
     :style="{
       width: large ? '' : 'calc(50% - 15rpx)'
     }"

+ 5 - 5
src/pages/parts/StatsText.vue

@@ -96,7 +96,7 @@ $color-second: map.get($colors, "second");
   flex-direction: column;
 
   .title {
-    font-size: 32rpx;
+    font-size: 36rpx;
     margin: 10rpx 0;
     font-family: "SongtiSCBlack";
     color: $color-primary;
@@ -133,17 +133,17 @@ $color-second: map.get($colors, "second");
       }
 
       .title-prefix {
-        font-size: 26rpx;
+        font-size: 32rpx;
         color: $color-primary;
       }
       .title-suffix {
-        font-size: 22rpx;
+        font-size: 26rpx;
         color: $color-primary;
         margin-bottom: 12rpx;
         margin-left: -6rpx;
       }
       .sub-title {
-        font-size: 22rpx;
+        font-size: 26rpx;
         color: $color-primary;
 
         &.long {
@@ -159,7 +159,7 @@ $color-second: map.get($colors, "second");
         color: $color-primary;
       }
       .sub-text {
-        font-size: 22rpx;
+        font-size: 26rpx;
         color: $color-primary;
       }
     }

+ 1 - 2
src/pages/travel.vue

@@ -122,7 +122,6 @@
 
 <script setup lang="ts">
 import { useHomePageMiniCommonListGoMoreAndGoDetail } from './article/common/CommonContent';
-import { useSimpleDataLoader } from '@/common/composeabe/SimpleDataLoader';
 import { navTo } from '@/components/utils/PageAction';
 import { onShareTimeline, onShareAppMessage } from '@dcloudio/uni-app';
 import Tabbar from '@/common/components/tabs/Tabbar.vue';
@@ -141,7 +140,7 @@ const subTabs = [
   { 
     name: '节庆日历', 
     icon: CategoryIcon1,
-    onClick: () => navTo('/pages/travel/calendar'),
+    onClick: () => navTo('/pages/travel/calendar/index'),
   },
   { 
     name: '文化景区',