|
@@ -23,17 +23,77 @@
|
|
</template>
|
|
</template>
|
|
</Carousel>
|
|
</Carousel>
|
|
|
|
|
|
- <!-- 精选推荐 -->
|
|
|
|
|
|
+ <!-- 精选推荐文物 -->
|
|
|
|
+ <section class="main-section main-background main-background-type1">
|
|
|
|
+ <div class="content">
|
|
|
|
+ <div class="title">
|
|
|
|
+ <h2>精选文物</h2>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <SimplePageContentLoader :loader="recommend1Data">
|
|
|
|
+ <Carousel ref="carousel2Ref" v-bind="carousel2Config">
|
|
|
|
+ <Slide
|
|
|
|
+ v-for="(item, index) in recommend1Data.content.value"
|
|
|
|
+ :key="index"
|
|
|
|
+ @click="router.push({ name: 'artifact-detail', query: { id: item.id } })"
|
|
|
|
+ >
|
|
|
|
+ <ImageTitleBlock
|
|
|
|
+ :image="item.image"
|
|
|
|
+ :title="item.title"
|
|
|
|
+ :desc="item.desc"
|
|
|
|
+ />
|
|
|
|
+ </Slide>
|
|
|
|
+ </Carousel>
|
|
|
|
+ </SimplePageContentLoader>
|
|
|
|
+
|
|
|
|
+ <div class="simple-carousel2-left-right">
|
|
|
|
+ <div @click="carousel2Ref?.prev()">←</div>
|
|
|
|
+ <div @click="carousel2Ref?.next()">→</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </section>
|
|
|
|
+
|
|
|
|
+ <!-- 精选推荐非遗 -->
|
|
|
|
+ <section class="main-section main-background main-background-type1">
|
|
|
|
+ <div class="content">
|
|
|
|
+ <div class="title">
|
|
|
|
+ <h2>精选非遗</h2>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <SimplePageContentLoader :loader="recommend2Data">
|
|
|
|
+ <Carousel ref="carousel2Ref" v-bind="carousel2Config">
|
|
|
|
+ <Slide
|
|
|
|
+ v-for="(item, index) in recommend2Data.content.value"
|
|
|
|
+ :key="index"
|
|
|
|
+ @click="router.push({ name: 'news-detail', query: { id: item.id } })"
|
|
|
|
+ >
|
|
|
|
+ <ImageTitleBlock
|
|
|
|
+ :image="item.image"
|
|
|
|
+ :title="item.title"
|
|
|
|
+ :desc="item.desc"
|
|
|
|
+ />
|
|
|
|
+ </Slide>
|
|
|
|
+ </Carousel>
|
|
|
|
+ </SimplePageContentLoader>
|
|
|
|
+
|
|
|
|
+ <div class="simple-carousel2-left-right">
|
|
|
|
+ <div @click="carousel2Ref?.prev()">←</div>
|
|
|
|
+ <div @click="carousel2Ref?.next()">→</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </section>
|
|
|
|
+
|
|
|
|
+ <!-- 精选推荐项目 -->
|
|
<section class="main-section main-background main-background-type1">
|
|
<section class="main-section main-background main-background-type1">
|
|
<div class="content">
|
|
<div class="content">
|
|
<div class="title">
|
|
<div class="title">
|
|
<h2>精选推荐</h2>
|
|
<h2>精选推荐</h2>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <SimplePageContentLoader :loader="recommendData">
|
|
|
|
|
|
+ <SimplePageContentLoader :loader="recommend3Data">
|
|
<Carousel ref="carousel2Ref" v-bind="carousel2Config">
|
|
<Carousel ref="carousel2Ref" v-bind="carousel2Config">
|
|
<Slide
|
|
<Slide
|
|
- v-for="(item, index) in recommendData.content.value"
|
|
|
|
|
|
+ v-for="(item, index) in recommend3Data.content.value"
|
|
:key="index"
|
|
:key="index"
|
|
@click="router.push({ name: 'news-detail', query: { id: item.id } })"
|
|
@click="router.push({ name: 'news-detail', query: { id: item.id } })"
|
|
>
|
|
>
|
|
@@ -141,12 +201,12 @@ import { Carousel, Slide, Pagination, Navigation } from 'vue3-carousel'
|
|
import { onMounted, ref } from 'vue';
|
|
import { onMounted, ref } from 'vue';
|
|
import { useRouter } from 'vue-router';
|
|
import { useRouter } from 'vue-router';
|
|
import { useSimpleDataLoader } from '@/composeable/SimpleDataLoader';
|
|
import { useSimpleDataLoader } from '@/composeable/SimpleDataLoader';
|
|
-import CommonContent, { GetContentListParams, type GetContentListItem } from '@/api/CommonContent';
|
|
|
|
|
|
+import CommonContent, { GetColumListParams, GetContentListParams, type GetContentListItem } from '@/api/CommonContent';
|
|
|
|
+import { NO_CONTENT_STRING } from '@/common/ConstStrings';
|
|
import NewsIndexContent from '@/api/news/NewsIndexContent';
|
|
import NewsIndexContent from '@/api/news/NewsIndexContent';
|
|
import ImageTitleBlock from '@/components/parts/ImageTitleBlock.vue';
|
|
import ImageTitleBlock from '@/components/parts/ImageTitleBlock.vue';
|
|
import SimplePageContentLoader from '@/components/content/SimplePageContentLoader.vue';
|
|
import SimplePageContentLoader from '@/components/content/SimplePageContentLoader.vue';
|
|
import IndexContent from '@/api/introduction/IndexContent';
|
|
import IndexContent from '@/api/introduction/IndexContent';
|
|
-import { NO_CONTENT_STRING } from '@/common/ConstStrings';
|
|
|
|
import SimpleRemoveRichHtml from '@/components/display/SimpleRemoveRichHtml.vue';
|
|
import SimpleRemoveRichHtml from '@/components/display/SimpleRemoveRichHtml.vue';
|
|
import UnmoveableContent from '@/api/inheritor/UnmoveableContent';
|
|
import UnmoveableContent from '@/api/inheritor/UnmoveableContent';
|
|
import ProjectContent from '@/api/research/ProjectContent';
|
|
import ProjectContent from '@/api/research/ProjectContent';
|
|
@@ -187,32 +247,30 @@ const bannerData = useSimpleDataLoader(async () => {
|
|
return await IndexContent.getBanner()
|
|
return await IndexContent.getBanner()
|
|
});
|
|
});
|
|
const overviewData = useSimpleDataLoader(async () => {
|
|
const overviewData = useSimpleDataLoader(async () => {
|
|
- return (await IndexContent.getColumList(new GetContentListParams().setSelfValues({
|
|
|
|
- modelId: 3,
|
|
|
|
|
|
+ return (await IndexContent.getColumList(new GetColumListParams().setSelfValues({
|
|
|
|
+ modelId: 17,
|
|
mainBodyColumnId: 234,
|
|
mainBodyColumnId: 234,
|
|
}))).list[0]?.overview || NO_CONTENT_STRING
|
|
}))).list[0]?.overview || NO_CONTENT_STRING
|
|
});
|
|
});
|
|
-const recommendData = useSimpleDataLoader<GetContentListItem[]>(async () => {
|
|
|
|
- const list = [];
|
|
|
|
-
|
|
|
|
- list.push(...(await UnmoveableContent.getContentList(new GetContentListParams().setSelfValues({
|
|
|
|
- flag: 'recommend',
|
|
|
|
- }), 1, 2)).list);
|
|
|
|
- list.push(...(await ProductContent.getContentList(new GetContentListParams().setSelfValues({
|
|
|
|
- flag: 'recommend',
|
|
|
|
- }), 1, 2)).list);
|
|
|
|
- list.push(...(await ProjectContent.getContentList(new GetContentListParams().setSelfValues({
|
|
|
|
- flag: 'recommend',
|
|
|
|
- }), 1, 2)).list);
|
|
|
|
- list.push(...(await ActivityContent.getContentList(new GetContentListParams().setSelfValues({
|
|
|
|
- flag: 'recommend',
|
|
|
|
- }), 1, 2)).list);
|
|
|
|
-
|
|
|
|
- return list;
|
|
|
|
|
|
+const recommend1Data = useSimpleDataLoader<GetContentListItem[]>(async () => {
|
|
|
|
+ return (await UnmoveableContent.getContentList(new GetContentListParams().setSelfValues({
|
|
|
|
+
|
|
|
|
+ }), 1, 6)).list;
|
|
|
|
+});
|
|
|
|
+const recommend2Data = useSimpleDataLoader<GetContentListItem[]>(async () => {
|
|
|
|
+ return (await CommonContent.getContentList(new GetContentListParams()
|
|
|
|
+ .setModelId(3)
|
|
|
|
+ .setMainBodyColumnId(238)
|
|
|
|
+ , 1, 6)).list
|
|
|
|
+});
|
|
|
|
+const recommend3Data = useSimpleDataLoader<GetContentListItem[]>(async () => {
|
|
|
|
+ return (await CommonContent.getContentList(new GetContentListParams()
|
|
|
|
+ .setModelId(17)
|
|
|
|
+ .setMainBodyColumnId(273)
|
|
|
|
+ , 1, 6)).list
|
|
});
|
|
});
|
|
const newsData = useSimpleDataLoader<GetContentListItem[]>(async () => {
|
|
const newsData = useSimpleDataLoader<GetContentListItem[]>(async () => {
|
|
return (await NewsIndexContent.getContentList(new GetContentListParams().setSelfValues({
|
|
return (await NewsIndexContent.getContentList(new GetContentListParams().setSelfValues({
|
|
- flag: 'recommend',
|
|
|
|
}), 1, 6)).list
|
|
}), 1, 6)).list
|
|
});
|
|
});
|
|
const statsData = useSimpleDataLoader(async () => {
|
|
const statsData = useSimpleDataLoader(async () => {
|