|
@@ -7,28 +7,29 @@
|
|
|
GridItemPaddingHorizontal: 0,
|
|
GridItemPaddingHorizontal: 0,
|
|
|
}">
|
|
}">
|
|
|
<Grid :borderGrid="false" :mainAxisCount="4">
|
|
<Grid :borderGrid="false" :mainAxisCount="4">
|
|
|
- <GridItem title="全部" icon="/static/images/icons/icon-all.png" touchable />
|
|
|
|
|
- <GridItem title="历史文化" icon="/static/images/icons/icon-history.png" touchable />
|
|
|
|
|
- <GridItem title="环境格局" icon="/static/images/icons/icon-envirounment.png" touchable />
|
|
|
|
|
- <GridItem title="传统建筑" icon="/static/images/icons/icon-buliding.png" touchable />
|
|
|
|
|
- <GridItem title="民俗文化" icon="/static/images/icons/icon-location.png" touchable />
|
|
|
|
|
- <GridItem title="地道美食" icon="/static/images/icons/icon-foods.png" touchable />
|
|
|
|
|
- <GridItem title="物产资源" icon="/static/images/icons/icon-resource.png" touchable />
|
|
|
|
|
- <GridItem title="旅游线路" icon="/static/images/icons/icon-route.png" touchable />
|
|
|
|
|
|
|
+ <GridItem title="全部" icon="/static/images/icons/icon-all.png" touchable @click="goList('all', '全部')" />
|
|
|
|
|
+ <GridItem title="历史文化" icon="/static/images/icons/icon-history.png" touchable @click="goList('cultural', '历史文化')" />
|
|
|
|
|
+ <GridItem title="环境格局" icon="/static/images/icons/icon-envirounment.png" touchable @click="goList('environment', '环境格局')" />
|
|
|
|
|
+ <GridItem title="传统建筑" icon="/static/images/icons/icon-buliding.png" touchable @click="goList('building', '传统建筑')" />
|
|
|
|
|
+ <GridItem title="民俗文化" icon="/static/images/icons/icon-location.png" touchable @click="goList('folk_culture', '民俗文化')" />
|
|
|
|
|
+ <GridItem title="地道美食" icon="/static/images/icons/icon-foods.png" touchable @click="goList('food_product', '美食物产')" />
|
|
|
|
|
+ <GridItem title="物产资源" icon="/static/images/icons/icon-resource.png" touchable @click="goList('figure', '历史人物')" />
|
|
|
|
|
+ <GridItem title="旅游线路" icon="/static/images/icons/icon-route.png" touchable @click="goList('route', '旅游线路')" />
|
|
|
</Grid>
|
|
</Grid>
|
|
|
</ProvideVar>
|
|
</ProvideVar>
|
|
|
</Box>
|
|
</Box>
|
|
|
- <Box title="文章" icon="/static/images/home/icon-article.png">
|
|
|
|
|
|
|
+ <Box title="最新推荐" icon="/static/images/home/icon-article.png">
|
|
|
<SimplePageContentLoader :loader="discoverLoader">
|
|
<SimplePageContentLoader :loader="discoverLoader">
|
|
|
<FlexCol :gap="25">
|
|
<FlexCol :gap="25">
|
|
|
<Touchable
|
|
<Touchable
|
|
|
v-for="(item, i) in discoverLoader.content.value"
|
|
v-for="(item, i) in discoverLoader.content.value"
|
|
|
:key="i"
|
|
:key="i"
|
|
|
- align="center"
|
|
|
|
|
direction="column"
|
|
direction="column"
|
|
|
|
|
+ @click="goDetails(item)"
|
|
|
>
|
|
>
|
|
|
<Image
|
|
<Image
|
|
|
- :src="item.thumbnail || item.image"
|
|
|
|
|
|
|
+ :src="item.image"
|
|
|
|
|
+ :failedImage="AppCofig.defaultImage"
|
|
|
width="100%"
|
|
width="100%"
|
|
|
:height="350"
|
|
:height="350"
|
|
|
:radius="15"
|
|
:radius="15"
|
|
@@ -36,7 +37,7 @@
|
|
|
round
|
|
round
|
|
|
/>
|
|
/>
|
|
|
<Height :height="20" />
|
|
<Height :height="20" />
|
|
|
- <FlexCol>
|
|
|
|
|
|
|
+ <FlexCol >
|
|
|
<Text :text="item.title" fontConfig="h4" />
|
|
<Text :text="item.title" fontConfig="h4" />
|
|
|
<Text :text="item.desc" fontConfig="subText" />
|
|
<Text :text="item.desc" fontConfig="subText" />
|
|
|
</FlexCol>
|
|
</FlexCol>
|
|
@@ -51,7 +52,6 @@
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import { useSimpleDataLoader } from '@/common/composeabe/SimpleDataLoader';
|
|
import { useSimpleDataLoader } from '@/common/composeabe/SimpleDataLoader';
|
|
|
-import { RandomUtils } from '@imengyu/imengyu-utils';
|
|
|
|
|
import Box from '@/common/components/parts/Box.vue';
|
|
import Box from '@/common/components/parts/Box.vue';
|
|
|
import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
|
|
import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
|
|
|
import Image from '@/components/basic/Image.vue';
|
|
import Image from '@/components/basic/Image.vue';
|
|
@@ -63,17 +63,36 @@ import Height from '@/components/layout/space/Height.vue';
|
|
|
import ProvideVar from '@/components/theme/ProvideVar.vue';
|
|
import ProvideVar from '@/components/theme/ProvideVar.vue';
|
|
|
import Grid from '@/components/layout/grid/Grid.vue';
|
|
import Grid from '@/components/layout/grid/Grid.vue';
|
|
|
import GridItem from '@/components/layout/grid/GridItem.vue';
|
|
import GridItem from '@/components/layout/grid/GridItem.vue';
|
|
|
|
|
+import { navTo } from '@/components/utils/PageAction';
|
|
|
|
|
+import { useCollectStore } from '@/store/collect';
|
|
|
|
|
+import VillageInfoApi from '@/api/inhert/VillageInfoApi';
|
|
|
|
|
+import AppCofig from '@/common/config/AppCofig';
|
|
|
|
|
|
|
|
-function testImage() {
|
|
|
|
|
- return 'https://mncdn.wenlvti.net/app_static/minnan/images/home/ImageTest' + RandomUtils.genRandom(1, 5) +'.jpg';
|
|
|
|
|
|
|
+const { getCollectModuleId } = useCollectStore();
|
|
|
|
|
+
|
|
|
|
|
+function goList(collectModelName: string, title: string) {
|
|
|
|
|
+ navTo('/pages/home/discover/list', {
|
|
|
|
|
+ collectModelInternalName: collectModelName,
|
|
|
|
|
+ collectModelId: collectModelName === 'all' ? undefined : getCollectModuleId(collectModelName),
|
|
|
|
|
+ title,
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
+function goDetails(item: any) {
|
|
|
|
|
+ navTo('/pages/home/discover/details', {
|
|
|
|
|
+ id: item.id,
|
|
|
|
|
+ collectModelId: item.collectModuleId,
|
|
|
|
|
+ collectModelInternalName: item.collectModuleInternalName,
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const discoverLoader = useSimpleDataLoader(async () => {
|
|
const discoverLoader = useSimpleDataLoader(async () => {
|
|
|
- return new Array(26).fill(0).map((_, i) => ({
|
|
|
|
|
- title: '张家大院·门楼' + i,
|
|
|
|
|
- desc: '多馆联展,沉浸式交互体验。多馆联展,沉浸式交互体验。',
|
|
|
|
|
- image: testImage(),
|
|
|
|
|
- thumbnail: testImage(),
|
|
|
|
|
- }));
|
|
|
|
|
|
|
+ return (await VillageInfoApi.getListForDiscover(undefined, 1, 30)).list.map((item) => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ image: (item.thumbnail || item.image) as string,
|
|
|
|
|
+ desc: item.desc || '',
|
|
|
|
|
+ title: item.title,
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|