|
@@ -24,19 +24,33 @@
|
|
|
</Carousel>
|
|
|
|
|
|
<!-- 数据统计 -->
|
|
|
- <section class="main-section">
|
|
|
+ <section class="main-section main-background main-background-type2">
|
|
|
<div class="content">
|
|
|
<div class="title">
|
|
|
<h2>数据统计</h2>
|
|
|
</div>
|
|
|
|
|
|
<SimplePageContentLoader :loader="statsData">
|
|
|
- <div v-for="(stat,key) in statsData.content.value" :key="key" class="main-stats">
|
|
|
- <h4>{{ stat.title }}</h4>
|
|
|
- <div class="descs">
|
|
|
- <div v-for="(data, key2) in stat.datas" :key="key2" @click="data.onClick">
|
|
|
- <h5>{{ data.value }}</h5>
|
|
|
- <p>{{ data.title }}</p>
|
|
|
+ <div class="d-flex row">
|
|
|
+ <div
|
|
|
+ class="col-12 col-md-6 col-lg-4 col-xl-4"
|
|
|
+ v-for="(stat,key) in statsData.content.value"
|
|
|
+ :key="key"
|
|
|
+ >
|
|
|
+ <div :class="`main-card-box type${stat.type}`">
|
|
|
+ <div class="content">
|
|
|
+ <h4>{{ stat.title }}</h4>
|
|
|
+ <div class="descs">
|
|
|
+ <div
|
|
|
+ v-for="(data, key2) in stat.datas"
|
|
|
+ :key="key2"
|
|
|
+ @click="data.onClick"
|
|
|
+ >
|
|
|
+ <h5>{{ data.title }}</h5>
|
|
|
+ <p>{{ data.value }}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -44,6 +58,36 @@
|
|
|
</div>
|
|
|
</section>
|
|
|
|
|
|
+ <!-- 保护区大事记 -->
|
|
|
+ <section class="main-section main-background main-background-type2">
|
|
|
+ <div class="content">
|
|
|
+ <div class="title">
|
|
|
+ <h2>保护区大事记</h2>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <SimplePageContentLoader :loader="recordData">
|
|
|
+ <div class="main-time-line">
|
|
|
+ <ScrollRect scroll="horizontal" containerClass="time-line-scroll">
|
|
|
+ <div
|
|
|
+ v-for="(item, index) in recordData.content.value"
|
|
|
+ :key="index"
|
|
|
+ class="item"
|
|
|
+ :class="index % 2 === 0 ? 'top' : 'bottom'"
|
|
|
+ >
|
|
|
+ <div class="time">
|
|
|
+ {{ DataDateUtils.formatDate(item.publishAt, 'YYYY-MM') }}
|
|
|
+ </div>
|
|
|
+ <div class="box">
|
|
|
+ <div class="title">{{ item.title }}</div>
|
|
|
+ <div class="content">{{ item.desc }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </ScrollRect>
|
|
|
+ </div>
|
|
|
+ </SimplePageContentLoader>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+
|
|
|
<!-- 精选推荐非遗 -->
|
|
|
<section class="main-section main-background main-background-type1">
|
|
|
<div class="content">
|
|
@@ -144,64 +188,6 @@
|
|
|
</div>
|
|
|
</section>
|
|
|
|
|
|
- <!-- 数据统计 -->
|
|
|
- <section class="main-section main-background main-background-type2">
|
|
|
- <div class="content">
|
|
|
- <div class="title">
|
|
|
- <h2>数据统计</h2>
|
|
|
- </div>
|
|
|
-
|
|
|
- <SimplePageContentLoader :loader="statsData">
|
|
|
- <Carousel ref="carousel3Ref" v-bind="carousel3Config">
|
|
|
- <Slide v-for="(stat,key) in statsData.content.value" :key="key">
|
|
|
- <div :class="`main-card-box type${stat.type}`">
|
|
|
- <h4>{{ stat.title }}</h4>
|
|
|
- <div class="descs">
|
|
|
- <div v-for="(data, key2) in stat.datas" :key="key2">
|
|
|
- <h5>{{ data.title }}</h5>
|
|
|
- <p>{{ data.value }}</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </Slide>
|
|
|
- <template #addons>
|
|
|
- <Navigation />
|
|
|
- </template>
|
|
|
- </Carousel>
|
|
|
- </SimplePageContentLoader>
|
|
|
- </div>
|
|
|
- </section>
|
|
|
-
|
|
|
- <!-- 保护区大事记 -->
|
|
|
- <section class="main-section main-background main-background-type2">
|
|
|
- <div class="content">
|
|
|
- <div class="title">
|
|
|
- <h2>保护区大事记</h2>
|
|
|
- </div>
|
|
|
-
|
|
|
- <SimplePageContentLoader :loader="recordData">
|
|
|
- <div class="main-time-line">
|
|
|
- <ScrollRect scroll="horizontal" containerClass="time-line-scroll">
|
|
|
- <div
|
|
|
- v-for="(item, index) in recordData.content.value"
|
|
|
- :key="index"
|
|
|
- class="item"
|
|
|
- :class="index % 2 === 0 ? 'top' : 'bottom'"
|
|
|
- >
|
|
|
- <div class="time">
|
|
|
- {{ DataDateUtils.formatDate(item.publishAt, 'YYYY-MM') }}
|
|
|
- </div>
|
|
|
- <div class="box">
|
|
|
- <div class="title">{{ item.title }}</div>
|
|
|
- <div class="content">{{ item.desc }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </ScrollRect>
|
|
|
- </div>
|
|
|
- </SimplePageContentLoader>
|
|
|
- </div>
|
|
|
- </section>
|
|
|
-
|
|
|
<!-- 介绍 -->
|
|
|
<section class="main-introd main-section">
|
|
|
<div class="main-introd-bg">
|
|
@@ -243,6 +229,7 @@ import ProductsContent from '@/api/inheritor/ProductsContent';
|
|
|
import ProjectsContent from '@/api/inheritor/ProjectsContent';
|
|
|
import { DataDateUtils } from '@imengyu/js-request-transform';
|
|
|
import { ScrollRect } from '@imengyu/vue-scroll-rect';
|
|
|
+import SeminarContent from '@/api/inheritor/SeminarContent';
|
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
@@ -256,22 +243,8 @@ const carousel2Config = {
|
|
|
mouseWheel: true,
|
|
|
wrapAround: true
|
|
|
}
|
|
|
-const carousel3Config = ref({
|
|
|
- itemsToShow: 4,
|
|
|
- mouseWheel: true,
|
|
|
- wrapAround: true,
|
|
|
- autoplay: 3000,
|
|
|
-});
|
|
|
-const carousel3Ref = ref<any>(null);
|
|
|
const carousel6Ref = ref<any>(null);
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- if (window.innerWidth <= 435) {
|
|
|
- carousel3Config.value.itemsToShow = 1;
|
|
|
- } else if (window.innerWidth <= 768) {
|
|
|
- carousel3Config.value.itemsToShow = 2;
|
|
|
- }
|
|
|
-})
|
|
|
|
|
|
|
|
|
const bannerData = useSimpleDataLoader(async () => {
|
|
@@ -287,7 +260,7 @@ const recommend1Data = useSimpleDataLoader<GetContentListItem[]>(async () => {
|
|
|
return (await UnmoveableContent.getContentList(new GetContentListParams(), 1, 9)).list;
|
|
|
});
|
|
|
const recommend2Data = useSimpleDataLoader<GetContentListItem[]>(async () => {
|
|
|
- return (await ProjectsContent.getContentList(new GetContentListParams(), 1, 9)).list
|
|
|
+ return (await ProjectsContent.getContentList(new GetContentListParams().setMainBodyColumnId([]), 1, 9)).list
|
|
|
});
|
|
|
const recommend3Data = useSimpleDataLoader<GetContentListItem[]>(async () => {
|
|
|
return (await CommonContent.getContentList(new GetContentListParams()
|
|
@@ -301,7 +274,9 @@ const newsData = useSimpleDataLoader<GetContentListItem[]>(async () => {
|
|
|
});
|
|
|
const statsData = useSimpleDataLoader(async () => {
|
|
|
const data = (await IndexContent.getStats());
|
|
|
-
|
|
|
+ const semiCount = (await SeminarContent.getContentList(new GetContentListParams(), 1, 6)).total;
|
|
|
+ const unmoveableCount = (await UnmoveableContent.getContentList(new GetContentListParams(), 1, 6)).total;
|
|
|
+
|
|
|
return [
|
|
|
{
|
|
|
title: '非遗项目',
|
|
@@ -329,6 +304,26 @@ const statsData = useSimpleDataLoader(async () => {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ {
|
|
|
+ type: '1',
|
|
|
+ datas: [
|
|
|
+ {
|
|
|
+ title: '传习所',
|
|
|
+ value: semiCount,
|
|
|
+ onClick: () => router.push({ path: '/inheritor/seminar' }),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '传统村落',
|
|
|
+ value: data.villageData[0].total,
|
|
|
+ onClick: () => router.push({ path: '/village/index' }),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '文物古迹',
|
|
|
+ value: unmoveableCount,
|
|
|
+ onClick: () => router.push({ path: '/inheritor/unmoveable' }),
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
/*{
|
|
|
title: '不可移动文物',
|
|
|
type: '3',
|
|
@@ -389,41 +384,46 @@ const recordData = useSimpleDataLoader<GetContentListItem[]>(async () => {
|
|
|
|
|
|
.main-card-box {
|
|
|
position: relative;
|
|
|
- width: 340px;
|
|
|
min-height: 330px;
|
|
|
color: #fff;
|
|
|
- padding: 24px;
|
|
|
margin-right: 24px;
|
|
|
overflow: hidden;
|
|
|
- transform: translateX(-50%);
|
|
|
+ //transform: translateX(-50%);
|
|
|
|
|
|
- h4 {
|
|
|
- font-family: SourceHanSerifCNBold;
|
|
|
- font-size: 1.5rem;
|
|
|
- margin: 0;
|
|
|
- margin-bottom: 32px;
|
|
|
+ .content {
|
|
|
+ position: absolute;
|
|
|
+ inset: 24px;
|
|
|
z-index: 10;
|
|
|
- }
|
|
|
- .descs {
|
|
|
display: flex;
|
|
|
- flex-direction: row;
|
|
|
- flex-wrap: wrap;
|
|
|
- z-index: 10;
|
|
|
+ flex-direction: column;
|
|
|
|
|
|
- div {
|
|
|
- flex: 1 1 50%;
|
|
|
+ h4 {
|
|
|
+ font-family: SourceHanSerifCNBold;
|
|
|
+ font-size: 1.5rem;
|
|
|
+ margin: 0;
|
|
|
margin-bottom: 32px;
|
|
|
-
|
|
|
- h5 {
|
|
|
- font-size: 1rem;
|
|
|
- font-weight: normal;
|
|
|
- margin: 0;
|
|
|
- }
|
|
|
- p {
|
|
|
- font-family: Impact;
|
|
|
- font-weight: normal;
|
|
|
- font-size: 2.8rem;
|
|
|
- margin: 0;
|
|
|
+ }
|
|
|
+ .descs {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ flex-wrap: wrap;
|
|
|
+
|
|
|
+ div {
|
|
|
+ flex: 1 1 50%;
|
|
|
+ margin-bottom: 32px;
|
|
|
+ cursor: pointer;
|
|
|
+
|
|
|
+ h5 {
|
|
|
+ font-size: 1rem;
|
|
|
+ font-weight: normal;
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
+ p {
|
|
|
+ font-family: Impact;
|
|
|
+ font-weight: normal;
|
|
|
+ font-size: 2.8rem;
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -441,7 +441,7 @@ const recordData = useSimpleDataLoader<GetContentListItem[]>(async () => {
|
|
|
position: absolute;
|
|
|
inset: 0;
|
|
|
background-image: list.nth($type, 2);
|
|
|
- z-index: -2;
|
|
|
+ z-index: 0;
|
|
|
}
|
|
|
&::before {
|
|
|
content: '';
|
|
@@ -452,7 +452,7 @@ const recordData = useSimpleDataLoader<GetContentListItem[]>(async () => {
|
|
|
height: 180px;
|
|
|
background-size: 180px;
|
|
|
background-image: list.nth($type, 1);
|
|
|
- z-index: -1;
|
|
|
+ z-index: 1;
|
|
|
}
|
|
|
}
|
|
|
}
|