|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <view class="home-container page-home-introduction d-flex flex-col bg-base">
|
|
|
+ <view class="home-container page-home-introduction d-flex flex-col bg-base" style="min-height:100vh">
|
|
|
<u-navbar :autoBack="true" bgColor="transparent" />
|
|
|
<image
|
|
|
class="w-100 position-absolute"
|
|
@@ -10,7 +10,7 @@
|
|
|
|
|
|
<!-- 标题 -->
|
|
|
<view class="font-songti color-title-text d-flex flex-col align-center justify-center p-3">
|
|
|
- <text class="size-lll">闽南文化(厦门)生态保护区</text>
|
|
|
+ <text class="size-lll">闽南文化生态保护区<text class="size-ll">(厦门市)</text></text>
|
|
|
<text class="size-base mt-2">世界闽南文化交流中心</text>
|
|
|
</view>
|
|
|
|
|
@@ -20,26 +20,78 @@
|
|
|
<u-parse :content="introdData.content.value" :tag-style="commonParserStyle"></u-parse>
|
|
|
</SimplePageContentLoader>
|
|
|
</view>
|
|
|
+
|
|
|
+ <view class="d-flex flex-col mt-3">
|
|
|
+ <view
|
|
|
+ v-for="item in listLoader.list.value"
|
|
|
+ :key="item.id"
|
|
|
+ >
|
|
|
+ <Box2LineImageRightShadow
|
|
|
+ classNames="ml-2 mb-3"
|
|
|
+ titleColor="title-text"
|
|
|
+ :image="item.image"
|
|
|
+ :title="item.title"
|
|
|
+ @click="goDetail(item.id)"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <SimplePageListLoader :loader="listLoader" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<tabbar :current="0"></tabbar>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { GetContentListParams } from '@/api/CommonContent';
|
|
|
import { useSimpleDataLoader } from '@/common/composeabe/SimpleDataLoader';
|
|
|
+import CommonContent, { GetContentListParams } from '@/api/CommonContent';
|
|
|
+import SimplePageListLoader from '@/common/components/SimplePageListLoader.vue';
|
|
|
+import Box2LineImageRightShadow from '@/pages/parts/Box2LineImageRightShadow.vue';
|
|
|
import NewsIndexContent from '@/api/news/NewsIndexContent';
|
|
|
import Tabbar from '@/common/components/tabs/tabbar.vue';
|
|
|
import commonParserStyle from '@/common/style/commonParserStyle';
|
|
|
import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
|
|
|
+import { useSimplePageListLoader } from '@/common/composeabe/SimplePageListLoader';
|
|
|
+import { DataDateUtils } from '@imengyu/js-request-transform';
|
|
|
+import { navTo } from '@/common/utils/PageAction';
|
|
|
+import { onMounted } from 'vue';
|
|
|
|
|
|
const introdData = useSimpleDataLoader(async () => {
|
|
|
return (await NewsIndexContent.getColumList(new GetContentListParams().setSelfValues({
|
|
|
- modelId: 3,
|
|
|
+ modelId: 17,
|
|
|
mainBodyColumnId: 234,
|
|
|
}))).list[0]?.overview || '无内容!请添加内容!!';
|
|
|
}, true);
|
|
|
|
|
|
+const listLoader = useSimplePageListLoader<{
|
|
|
+ id: number,
|
|
|
+ image: string,
|
|
|
+ title: string,
|
|
|
+ date: string
|
|
|
+}, {
|
|
|
+ modelId: number|undefined,
|
|
|
+ mainBodyColumnId: number|undefined,
|
|
|
+}>(8, async (page, pageSize, params) => {
|
|
|
+ const res = await CommonContent.getContentList(new GetContentListParams().setSelfValues({
|
|
|
+ modelId: 17,
|
|
|
+ mainBodyColumnId: '255,256,283,284',
|
|
|
+ }), page, pageSize);
|
|
|
+ return res.list.map((item) => {
|
|
|
+ return {
|
|
|
+ id: item.id,
|
|
|
+ image: item.image,
|
|
|
+ title: item.title,
|
|
|
+ date: DataDateUtils.formatDate(item.publishAt, 'YYYY-MM-dd'),
|
|
|
+ }
|
|
|
+ })
|
|
|
+});
|
|
|
+
|
|
|
+function goDetail(id: number) {
|
|
|
+ navTo('/pages/article/details', { id });
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ listLoader.loadData();
|
|
|
+})
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|