|
|
@@ -1,66 +1,31 @@
|
|
|
<template>
|
|
|
<FlexCol :gap="20" :padding="30">
|
|
|
- <HomeLargeTitle title="发现" />
|
|
|
- <Image
|
|
|
- mode="aspectFill"
|
|
|
- src="https://xy.wenlvti.net/app_static/images/dig/IntrodBanner.png"
|
|
|
- width="100%"
|
|
|
- :height="300"
|
|
|
- radius="20"
|
|
|
- :innerStyle="{
|
|
|
- border: '1px solid #fff',
|
|
|
- }"
|
|
|
- />
|
|
|
-
|
|
|
|
|
|
-
|
|
|
- <HomeTitle title="最新推荐" />
|
|
|
- <SimplePageContentLoader :loader="discoverLoader">
|
|
|
- <FlexCol :gap="25" backgroundColor="background.tertiary" :radius="20" :padding="30">
|
|
|
- <ImageBlock3
|
|
|
- v-for="(item, i) in discoverLoader.content.value"
|
|
|
- :key="i"
|
|
|
- backgroundColor="transparent"
|
|
|
- :src="item.image"
|
|
|
- :title="item.title"
|
|
|
- :desc="item.desc"
|
|
|
- :imageRadius="15"
|
|
|
- :imageWidth="200"
|
|
|
- :imageHeight="140"
|
|
|
- />
|
|
|
- </FlexCol>
|
|
|
- </SimplePageContentLoader>
|
|
|
-
|
|
|
+ <FlexRow center :gap="30">
|
|
|
+ <HomeLargeTitle title="村社名片" :active="tab === 'card'" @click="tab = 'card'" />
|
|
|
+ <HomeLargeTitle title="乡源树" :active="tab === 'tree'" @click="tab = 'tree'">
|
|
|
+ <template #icon>
|
|
|
+ <Image src="https://xy.wenlvti.net/app_static/images/village/IconLargeTree.png" :width="45" :height="46" mode="heightFix" />
|
|
|
+ </template>
|
|
|
+ </HomeLargeTitle>
|
|
|
+ </FlexRow>
|
|
|
+ <Card v-if="tab === 'card'" />
|
|
|
+ <Tree v-if="tab === 'tree'" />
|
|
|
<Loadmore status="nomore" />
|
|
|
<Height :height="150" />
|
|
|
</FlexCol>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { navTo } from '@/components/utils/PageAction';
|
|
|
-import { useSimpleDataLoader } from '@/common/composeabe/SimpleDataLoader';
|
|
|
-import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
|
|
|
import Loadmore from '@/components/display/loading/Loadmore.vue';
|
|
|
import FlexCol from '@/components/layout/FlexCol.vue';
|
|
|
import Height from '@/components/layout/space/Height.vue';
|
|
|
-import ProvideVar from '@/components/theme/ProvideVar.vue';
|
|
|
-import Grid from '@/components/layout/grid/Grid.vue';
|
|
|
-import GridItem from '@/components/layout/grid/GridItem.vue';
|
|
|
-import VillageInfoApi from '@/api/inhert/VillageInfoApi';
|
|
|
-import Tag from '@/components/display/Tag.vue';
|
|
|
import Image from '@/components/basic/Image.vue';
|
|
|
import HomeLargeTitle from '@/common/components/parts/HomeLargeTitle.vue';
|
|
|
-import HomeTitle from '@/common/components/parts/HomeTitle.vue';
|
|
|
-import ImageBlock3 from '@/components/display/block/ImageBlock3.vue';
|
|
|
+import FlexRow from '@/components/layout/FlexRow.vue';
|
|
|
+import { ref } from 'vue';
|
|
|
+import Card from './introd/card.vue';
|
|
|
+import Tree from './introd/tree.vue';
|
|
|
|
|
|
-const discoverLoader = useSimpleDataLoader(async () => {
|
|
|
- return (await VillageInfoApi.getListForDiscover(1, 30)).list.map((item) => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- image: (item.thumbnail || item.image) as string,
|
|
|
- desc: item.desc || '',
|
|
|
- title: item.title,
|
|
|
- }
|
|
|
- })
|
|
|
-});
|
|
|
+const tab = ref('card');
|
|
|
</script>
|