|
@@ -1,150 +1,53 @@
|
|
|
<template>
|
|
<template>
|
|
|
<FlexCol :gap="20" :padding="30" :innerStyle="{
|
|
<FlexCol :gap="20" :padding="30" :innerStyle="{
|
|
|
- marginTop: '-100px',
|
|
|
|
|
- backgroundImage: 'url(https://mn.wenlvti.net/app_static/xiangyuan/images/home/HomeBackground.jpg)',
|
|
|
|
|
|
|
+ marginTop: '-130px',
|
|
|
|
|
+ backgroundImage: 'url(/static/images/home/BannerHome.png)',
|
|
|
backgroundSize: '100% auto',
|
|
backgroundSize: '100% auto',
|
|
|
backgroundRepeat: 'no-repeat',
|
|
backgroundRepeat: 'no-repeat',
|
|
|
backgroundPosition: 'top center',
|
|
backgroundPosition: 'top center',
|
|
|
- backgroundColor: '#7bda82',
|
|
|
|
|
|
|
+ backgroundColor: themeContext.resolveThemeColor('background.primary'),
|
|
|
}">
|
|
}">
|
|
|
- <Height height="100px" />
|
|
|
|
|
- <FlexCol :gap="4" align="center">
|
|
|
|
|
- <Image src="https://mncdn.wenlvti.net/app_static/xiangyuan/images/home/ButtonTitle.png" width="430rpx" mode="widthFix" />
|
|
|
|
|
- <Image src="https://mn.wenlvti.net/app_static/xiangyuan/images/home/ButtonSubTitle.png" width="290rpx" mode="widthFix" />
|
|
|
|
|
- </FlexCol>
|
|
|
|
|
- <Box icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/home/icon-pin-distance.png" :padding="false">
|
|
|
|
|
- <LightMap
|
|
|
|
|
- @getedCurrentLonlat="getedCurrentLonlat"
|
|
|
|
|
|
|
+ <Height height="200px" />
|
|
|
|
|
+ <FlexCol :gap="20" align="center">
|
|
|
|
|
+ <SearchBar v-model="searchKeywords" placeholder="搜索" :innerStyle="{
|
|
|
|
|
+ backgroundColor: 'white',
|
|
|
|
|
+ borderRadius: '20rpx',
|
|
|
|
|
+ borderWidth: '1px',
|
|
|
|
|
+ borderStyle: 'solid',
|
|
|
|
|
+ borderColor: themeContext.resolveThemeColor('primary'),
|
|
|
|
|
+ width: '650rpx',
|
|
|
|
|
+ }" />
|
|
|
|
|
+ <Image
|
|
|
|
|
+ src="/static/images/home/BannerIndex.png"
|
|
|
|
|
+ width="700rpx"
|
|
|
|
|
+ mode="widthFix"
|
|
|
|
|
+ :innerStyle="{
|
|
|
|
|
+ borderRadius: '20rpx',
|
|
|
|
|
+ clipPath: 'ellipse(100% 90% at 50% 0%)'
|
|
|
|
|
+ }"
|
|
|
/>
|
|
/>
|
|
|
- <FlexRow justify="space-between" :padding="[10, 16]">
|
|
|
|
|
- <ImageButton src="https://mn.wenlvti.net/app_static/xiangyuan/images/home/ButtonMainAction.png" :width="215" mode="widthFix" @click="goCommonContentList({ modelId: 18, mainBodyColumnId: 361, autoJumpFirst: true })" />
|
|
|
|
|
- <ImageButton src="https://mn.wenlvti.net/app_static/xiangyuan/images/home/ButtonMainLight.png" :width="215" mode="widthFix" @click="navTo('/pages/home/light/submit-map', { latitude: currentLonlat.latitude, longitude: currentLonlat.longitude })" />
|
|
|
|
|
- <ImageButton src="https://mn.wenlvti.net/app_static/xiangyuan/images/home/ButtonMainSupport.png" :width="215" mode="widthFix" @click="goCommonContentList({ modelId: 18, mainBodyColumnId: 362, autoJumpFirst: true })" />
|
|
|
|
|
- </FlexRow>
|
|
|
|
|
- </Box>
|
|
|
|
|
|
|
+ </FlexCol>
|
|
|
|
|
+
|
|
|
|
|
+ <VillageMiniMap
|
|
|
|
|
+ @getedCurrentLonlat="getedCurrentLonlat"
|
|
|
|
|
+ />
|
|
|
|
|
+ <FlexRow justify="space-between" :padding="[10, 16]">
|
|
|
|
|
+ <Button icon="/static/images/home/IconSwitch.png" :radius="40" :padding="[10, 30]" :iconProps="{ innerStyle: { marginRight: '10rpx' }}">切换城市</Button>
|
|
|
|
|
+ <Button icon="/static/images/home/IconSwitch.png" :radius="40" :padding="[10, 30]" :iconProps="{ innerStyle: { marginRight: '10rpx' }}">我的关注</Button>
|
|
|
|
|
+ <Button icon="/static/images/home/IconLight.png" :radius="40" :padding="[10, 30]" :iconProps="{ innerStyle: { marginRight: '10rpx' }}">点亮村社</Button>
|
|
|
|
|
+ </FlexRow>
|
|
|
|
|
+
|
|
|
|
|
+ <HomeTitle title="乡村排名" showMore />
|
|
|
|
|
+ <VillageRankList />
|
|
|
|
|
+
|
|
|
|
|
+ <HomeTitle title="志愿者排名" showMore :lightCount="3" />
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <HomeTitle title="精选记忆" showMore />
|
|
|
|
|
+
|
|
|
|
|
|
|
|
- <Box title="资讯动态" icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/home/icon-compass.png" showMore @moreClicked="goCommonContentList({
|
|
|
|
|
- title: '资讯动态',
|
|
|
|
|
- modelId: 18,
|
|
|
|
|
- mainBodyColumnId: 363,
|
|
|
|
|
- })">
|
|
|
|
|
- <SimplePageContentLoader :loader="newsLoader">
|
|
|
|
|
- <FlexCol :gap="25">
|
|
|
|
|
- <Touchable
|
|
|
|
|
- v-for="(item, i) in newsLoader.content.value"
|
|
|
|
|
- :key="i"
|
|
|
|
|
- justify="space-between"
|
|
|
|
|
- align="center"
|
|
|
|
|
- direction="row"
|
|
|
|
|
- @click="goCommonContentDetail(item.id)"
|
|
|
|
|
- >
|
|
|
|
|
- <FlexCol flex="1" :gap="20">
|
|
|
|
|
- <Text :text="item.title" fontConfig="h5" />
|
|
|
|
|
- <Text :text="item.desc" fontConfig="subText" />
|
|
|
|
|
- </FlexCol>
|
|
|
|
|
- <Width :width="25" />
|
|
|
|
|
- <Image
|
|
|
|
|
- :src="item.image"
|
|
|
|
|
- :failedImage="AppCofig.defaultImage"
|
|
|
|
|
- :width="170"
|
|
|
|
|
- :height="120"
|
|
|
|
|
- :radius="15"
|
|
|
|
|
- mode="aspectFill"
|
|
|
|
|
- />
|
|
|
|
|
- </Touchable>
|
|
|
|
|
- </FlexCol>
|
|
|
|
|
- </SimplePageContentLoader>
|
|
|
|
|
- </Box>
|
|
|
|
|
|
|
|
|
|
- <Box title="周边文化遗产" icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/home/icon-compass.png" @moreClicked="goCommonContentList({
|
|
|
|
|
- modelId: 1,
|
|
|
|
|
- latitude: currentLonlat.latitude,
|
|
|
|
|
- longitude: currentLonlat.longitude,
|
|
|
|
|
- isNearby: true,
|
|
|
|
|
- })">
|
|
|
|
|
- <SimplePageContentLoader :loader="recommendedNearbySitesLoader">
|
|
|
|
|
- <FlexRow wrap :gap="25">
|
|
|
|
|
- <Touchable
|
|
|
|
|
- v-for="(item, i) in recommendedNearbySitesLoader.content.value"
|
|
|
|
|
- :key="i"
|
|
|
|
|
- direction="column"
|
|
|
|
|
- backgroundColor="white"
|
|
|
|
|
- :innerStyle="{
|
|
|
|
|
- flexBasis: '43%',
|
|
|
|
|
- }"
|
|
|
|
|
- :padding="13"
|
|
|
|
|
- :radius="15"
|
|
|
|
|
- >
|
|
|
|
|
- <!-- @click="goCommonContentDetail(item.id)" -->
|
|
|
|
|
- <Text :text="item.title" fontConfig="h5" />
|
|
|
|
|
- <Text :text="`距离您约 ${item.distance}`" fontConfig="subText" />
|
|
|
|
|
- <!-- <FlexCol flex="1" :gap="20">
|
|
|
|
|
- </FlexCol>
|
|
|
|
|
- <Width :width="25" />
|
|
|
|
|
- <Image
|
|
|
|
|
- :src="item.image"
|
|
|
|
|
- :failedImage="AppCofig.defaultImage"
|
|
|
|
|
- :width="170"
|
|
|
|
|
- :height="120"
|
|
|
|
|
- :radius="15"
|
|
|
|
|
- mode="aspectFill"
|
|
|
|
|
- /> -->
|
|
|
|
|
- </Touchable>
|
|
|
|
|
- </FlexRow>
|
|
|
|
|
- </SimplePageContentLoader>
|
|
|
|
|
- </Box>
|
|
|
|
|
- <!-- <Box title="线上史馆展示" icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/home/icon-ancient-gate.png">
|
|
|
|
|
- <SimplePageContentLoader :loader="recommendLoader">
|
|
|
|
|
- <FlexRow justify="space-between" align="center" wrap :gap="25">
|
|
|
|
|
- <Touchable
|
|
|
|
|
- v-for="(item, i) in recommendLoader.content.value"
|
|
|
|
|
- :key="i"
|
|
|
|
|
- :gap="20"
|
|
|
|
|
- flex="0 0 48%"
|
|
|
|
|
- align="center"
|
|
|
|
|
- direction="column"
|
|
|
|
|
- @click="goVillageDetails(item)"
|
|
|
|
|
- >
|
|
|
|
|
- <Image
|
|
|
|
|
- :src="item.thumbnail || item.image"
|
|
|
|
|
- width="100%"
|
|
|
|
|
- height="200rpx"
|
|
|
|
|
- :radius="15"
|
|
|
|
|
- mode="aspectFill"
|
|
|
|
|
- />
|
|
|
|
|
- <Text :text="item.title" />
|
|
|
|
|
- </Touchable>
|
|
|
|
|
- </FlexRow>
|
|
|
|
|
- </SimplePageContentLoader>
|
|
|
|
|
- </Box> -->
|
|
|
|
|
- <Box title="精彩推荐" icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/home/icon-compass.png" showMore @moreClicked="$emit('goDiscover')">
|
|
|
|
|
- <SimplePageContentLoader :loader="discoverLoader">
|
|
|
|
|
- <FlexCol :gap="25">
|
|
|
|
|
- <Touchable
|
|
|
|
|
- v-for="(item, i) in discoverLoader.content.value"
|
|
|
|
|
- :key="i"
|
|
|
|
|
- justify="space-between"
|
|
|
|
|
- align="center"
|
|
|
|
|
- direction="row"
|
|
|
|
|
- @click="goDiscoverDetails(item)"
|
|
|
|
|
- >
|
|
|
|
|
- <FlexCol flex="1" :gap="20">
|
|
|
|
|
- <Text :text="item.title" fontConfig="h5" />
|
|
|
|
|
- <Text :text="item.desc" fontConfig="subText" />
|
|
|
|
|
- </FlexCol>
|
|
|
|
|
- <Width :width="25" />
|
|
|
|
|
- <Image
|
|
|
|
|
- :src="item.image"
|
|
|
|
|
- :failedImage="AppCofig.defaultImage"
|
|
|
|
|
- :width="170"
|
|
|
|
|
- :height="120"
|
|
|
|
|
- :radius="15"
|
|
|
|
|
- mode="aspectFill"
|
|
|
|
|
- />
|
|
|
|
|
- </Touchable>
|
|
|
|
|
- </FlexCol>
|
|
|
|
|
- </SimplePageContentLoader>
|
|
|
|
|
- </Box>
|
|
|
|
|
<Loadmore status="nomore" />
|
|
<Loadmore status="nomore" />
|
|
|
<Height :height="150" />
|
|
<Height :height="150" />
|
|
|
</FlexCol>
|
|
</FlexCol>
|
|
@@ -152,6 +55,8 @@
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import { navTo } from '@/components/utils/PageAction';
|
|
import { navTo } from '@/components/utils/PageAction';
|
|
|
|
|
+import { goCommonContentDetail, goCommonContentList } from '../article/common/CommonContent';
|
|
|
|
|
+import { useTheme } from '@/components/theme/ThemeDefine';
|
|
|
import { useSimpleDataLoader } from '@/common/composeabe/SimpleDataLoader';
|
|
import { useSimpleDataLoader } from '@/common/composeabe/SimpleDataLoader';
|
|
|
import { ref } from 'vue';
|
|
import { ref } from 'vue';
|
|
|
import VillageApi from '@/api/inhert/VillageApi';
|
|
import VillageApi from '@/api/inhert/VillageApi';
|
|
@@ -167,18 +72,18 @@ import FlexCol from '@/components/layout/FlexCol.vue';
|
|
|
import FlexRow from '@/components/layout/FlexRow.vue';
|
|
import FlexRow from '@/components/layout/FlexRow.vue';
|
|
|
import Height from '@/components/layout/space/Height.vue';
|
|
import Height from '@/components/layout/space/Height.vue';
|
|
|
import Width from '@/components/layout/space/Width.vue';
|
|
import Width from '@/components/layout/space/Width.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 LightMap from '../components/LightMap.vue';
|
|
|
|
|
-import ImageButton from '@/components/basic/ImageButton.vue';
|
|
|
|
|
import CommonContent, { GetContentListParams } from '@/api/CommonContent';
|
|
import CommonContent, { GetContentListParams } from '@/api/CommonContent';
|
|
|
import UnmoveableContent from '@/api/inheritor/UnmoveableContent';
|
|
import UnmoveableContent from '@/api/inheritor/UnmoveableContent';
|
|
|
-import { goCommonContentDetail, goCommonContentList } from '../article/common/CommonContent';
|
|
|
|
|
-import { toast } from '@/components/utils/DialogAction';
|
|
|
|
|
|
|
+import SearchBar from '@/components/form/SearchBar.vue';
|
|
|
|
|
+import VillageMiniMap from './components/VillageMiniMap.vue';
|
|
|
|
|
+import Button from '@/components/basic/Button.vue';
|
|
|
|
|
+import HomeTitle from '@/common/components/parts/HomeTitle.vue';
|
|
|
|
|
+import VillageRankList from './components/VillageRankList.vue';
|
|
|
|
|
+
|
|
|
|
|
+const themeContext = useTheme();
|
|
|
|
|
|
|
|
const currentLonlat = ref<{ longitude: number, latitude: number }>({ longitude: 0, latitude: 0 });
|
|
const currentLonlat = ref<{ longitude: number, latitude: number }>({ longitude: 0, latitude: 0 });
|
|
|
-const isLightMode = ref(false);
|
|
|
|
|
|
|
+const searchKeywords = ref('');
|
|
|
|
|
|
|
|
function getedCurrentLonlat(lonlat: { longitude: number, latitude: number }) {
|
|
function getedCurrentLonlat(lonlat: { longitude: number, latitude: number }) {
|
|
|
currentLonlat.value = lonlat;
|
|
currentLonlat.value = lonlat;
|