|
|
@@ -95,10 +95,14 @@
|
|
|
</Button>
|
|
|
</FlexRow>
|
|
|
|
|
|
- <HomeTitle title="乡村排名" showMore />
|
|
|
+ <HomeTitle title="乡村排名" showMore @moreClicked="navTo('/pages/home/village/rank/village', {
|
|
|
+ regionId: currentRegion ?? undefined,
|
|
|
+ })" />
|
|
|
<VillageRankList :list="villageRankListLoader.content.value ?? []" />
|
|
|
|
|
|
- <HomeTitle title="志愿者排名" showMore :lightCount="3" />
|
|
|
+ <HomeTitle title="志愿者排名" showMore :lightCount="3" @moreClicked="navTo('/pages/home/village/rank/volunteer', {
|
|
|
+ regionId: currentRegion ?? undefined,
|
|
|
+ })" />
|
|
|
<VillageUserRankList :list="villageUserRankListLoader.content.value ?? []" />
|
|
|
|
|
|
<HomeTitle title="精选记忆" showMore />
|
|
|
@@ -150,6 +154,10 @@ import { useTheme } from '@/components/theme/ThemeDefine';
|
|
|
import { useSimpleDataLoader } from '@/components/composeabe/loader/SimpleDataLoader';
|
|
|
import { useStorageVar } from '@/components/composeabe/StorageVar';
|
|
|
import { useVillageStore } from '@/store/village';
|
|
|
+import { useGetCurrentLocation } from './composeabe/GetCurrentLocation';
|
|
|
+import { useSimplePageListLoader } from '@/components/composeabe/loader/SimplePageListLoader';
|
|
|
+import { ArrayUtils } from '@imengyu/imengyu-utils';
|
|
|
+import { toast } from '@/components/utils/DialogAction';
|
|
|
import { navTo } from '@/components/utils/PageAction';
|
|
|
import Image from '@/components/basic/Image.vue';
|
|
|
import Loadmore from '@/components/display/loading/Loadmore.vue';
|
|
|
@@ -161,26 +169,20 @@ import Button from '@/components/basic/Button.vue';
|
|
|
import HomeTitle from '@/common/components/parts/HomeTitle.vue';
|
|
|
import VillageRankList from './components/VillageRankList.vue';
|
|
|
import VillageUserRankList from './components/VillageUserRankList.vue';
|
|
|
-import VillageInfoApi from '@/api/inhert/VillageInfoApi';
|
|
|
import MasonryGrid from '@/components/layout/masonry/MasonryGrid.vue';
|
|
|
import MasonryGridItem from '@/components/layout/masonry/MasonryGridItem.vue';
|
|
|
import IndexCommonImageItem from '@/common/components/parts/IndexCommonImageItem.vue';
|
|
|
import Popup from '@/components/dialog/Popup.vue';
|
|
|
import CitySelect from './components/CitySelect.vue';
|
|
|
import VillageMyFollow from './components/VillageMyFollow.vue';
|
|
|
-import type { CityItem } from '@/api/map/MapApi';
|
|
|
import MapApi from '@/api/map/MapApi';
|
|
|
import LightMap from './components/LightMap.vue';
|
|
|
import NoticeBar from '@/components/display/NoticeBar.vue';
|
|
|
import StatusBarSpace from '@/components/layout/space/StatusBarSpace.vue';
|
|
|
-import type { VillageListItem } from '@/api/inhert/VillageApi';
|
|
|
import FollowVillageApi from '@/api/light/FollowVillageApi';
|
|
|
-import { useGetCurrentLocation } from './composeabe/GetCurrentLocation';
|
|
|
-import { toast } from '@/components/utils/DialogAction';
|
|
|
import LightVillageApi from '@/api/light/LightVillageApi';
|
|
|
-import CommonContent from '@/api/CommonContent';
|
|
|
-import { useSimplePageListLoader } from '@/components/composeabe/loader/SimplePageListLoader';
|
|
|
-import { ArrayUtils } from '@imengyu/imengyu-utils';
|
|
|
+import type { CityItem } from '@/api/map/MapApi';
|
|
|
+import type { VillageListItem } from '@/api/inhert/VillageApi';
|
|
|
|
|
|
const emit = defineEmits(['goVillage']);
|
|
|
|
|
|
@@ -293,7 +295,13 @@ onMounted(async () => {
|
|
|
}
|
|
|
const res = await FollowVillageApi.getFollowVillageList({ page: 1, pageSize: 200 });
|
|
|
villageStore.setMyFollowVillages(res.list);
|
|
|
- if (res.list.length > 0)
|
|
|
- villageStore.setCurrentVillage(res.list[0]);
|
|
|
+ if (res.list.length > 0) {
|
|
|
+ const currentVillage = villageStore.loadCurrentVillage();
|
|
|
+ if (currentVillage) {
|
|
|
+ villageStore.setCurrentVillage(res.list.find(p => p.id === currentVillage) as VillageListItem);
|
|
|
+ } else {
|
|
|
+ villageStore.setCurrentVillage(res.list[0]);
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
</script>
|