|
|
@@ -163,89 +163,11 @@
|
|
|
/>
|
|
|
</view>
|
|
|
|
|
|
- <FlexCol padding="padding.md">
|
|
|
- <SimplePageListLoader v-if="recommendTabCurrent === 0" :loader="recommendLoader">
|
|
|
- <MasonryGrid :items="recommendLoader.list.value" itemKey="id">
|
|
|
- <template #default="{ item }">
|
|
|
- <IndexCommonImageItem
|
|
|
- :width="354"
|
|
|
- :image="item.image"
|
|
|
- :title="item.title"
|
|
|
- :desc="item.content ?? ''"
|
|
|
- :userName="item.villageVolunteerName ?? ''"
|
|
|
- :userAvatar="item.villageVolunteerAvatar"
|
|
|
- :likes="item.likeNum"
|
|
|
- :isLike="item.likeType === 1"
|
|
|
- @click="handleGoRecommendDetails(item)"
|
|
|
- />
|
|
|
- </template>
|
|
|
- </MasonryGrid>
|
|
|
- </SimplePageListLoader>
|
|
|
- <SimplePageListLoader v-else-if="recommendTabCurrent === 1" :loader="goodsLoader">
|
|
|
- <FlexRow wrap justify="space-around" gap="gap.sm">
|
|
|
- <BoxMid
|
|
|
- v-for="good in goodsLoader.list.value" :key="good.id"
|
|
|
- :innerStyle="{
|
|
|
- width: 'calc(50% - 70rpx)',
|
|
|
- }"
|
|
|
- >
|
|
|
- <Touchable direction="column" gap="gap.lg" @click="handleGoRecommendDetails(good)">
|
|
|
- <Image
|
|
|
- :src="good.image"
|
|
|
- :radius="20"
|
|
|
- width="100%"
|
|
|
- height="300rpx"
|
|
|
- mode="aspectFill"
|
|
|
- />
|
|
|
- <Text :text="good.title" fontConfig="titleText" />
|
|
|
- <FlexRow align="center" gap="gap.md">
|
|
|
- <Avatar
|
|
|
- :src="good.villageVolunteerAvatar"
|
|
|
- :size="40"
|
|
|
- defaultAvatar="https://xy.wenlvti.net/app_static/images/mine/DefaultAvatar.png"
|
|
|
- />
|
|
|
- <Text :text="`发布人: ${good.villageVolunteerName}`" fontConfig="contentText" />
|
|
|
- </FlexRow>
|
|
|
- </Touchable>
|
|
|
- </BoxMid>
|
|
|
- <FlexCol v-if="goodsLoader.list.value && goodsLoader.list.value.length % 2 !== 0" width="calc(50%)" />
|
|
|
- </FlexRow>
|
|
|
- </SimplePageListLoader>
|
|
|
- <SimplePageListLoader v-else-if="recommendTabCurrent === 2" :loader="travelLoader">
|
|
|
- <FlexRow wrap justify="space-between" gap="gap.sm">
|
|
|
- <IndexCommonImageItem
|
|
|
- v-for="item in travelLoader.list.value" :key="item.id"
|
|
|
- :width="354"
|
|
|
- fixHeight
|
|
|
- :image="item.image"
|
|
|
- :title="item.title"
|
|
|
- :desc="item.content ?? ''"
|
|
|
- :userName="item.villageVolunteerName ?? ''"
|
|
|
- :userAvatar="item.villageVolunteerAvatar"
|
|
|
- :likes="item.likeNum"
|
|
|
- :isLike="item.likeType === 1"
|
|
|
- @click="handleGoRecommendDetails(item)"
|
|
|
- />
|
|
|
- </FlexRow>
|
|
|
- </SimplePageListLoader>
|
|
|
- <SimplePageListLoader v-else-if="recommendTabCurrent === 3" :loader="culturalLoader">
|
|
|
- <FlexRow wrap justify="space-between" gap="gap.sm">
|
|
|
- <IndexCommonImageItem
|
|
|
- v-for="item in culturalLoader.list.value" :key="item.id"
|
|
|
- :width="354"
|
|
|
- fixHeight
|
|
|
- :image="item.image"
|
|
|
- :title="item.title"
|
|
|
- :desc="item.content ?? ''"
|
|
|
- :userName="item.villageVolunteerName ?? ''"
|
|
|
- :userAvatar="item.villageVolunteerAvatar"
|
|
|
- :likes="item.likeNum"
|
|
|
- :isLike="item.likeType === 1"
|
|
|
- @click="handleGoRecommendDetails(item)"
|
|
|
- />
|
|
|
- </FlexRow>
|
|
|
- </SimplePageListLoader>
|
|
|
-
|
|
|
+ <FlexCol :padding="30">
|
|
|
+ <RecommendTab v-if="recommendTabCurrent === 0" @goDetails="handleGoRecommendDetails" />
|
|
|
+ <GoodsTab v-else-if="recommendTabCurrent === 1" @goDetails="handleGoRecommendDetails" />
|
|
|
+ <TravelTab v-else-if="recommendTabCurrent === 2" @goDetails="handleGoRecommendDetails" />
|
|
|
+ <CulturalTab v-else-if="recommendTabCurrent === 3" @goDetails="handleGoRecommendDetails" />
|
|
|
</FlexCol>
|
|
|
|
|
|
<Height :height="200" />
|
|
|
@@ -287,13 +209,11 @@ import { useGetCurrentLocation } from './composeabe/GetCurrentLocation';
|
|
|
import { useAuthStore } from '@/store/auth';
|
|
|
import { useRequireLogin } from '@/common/composeabe/RequireLogin';
|
|
|
import { useUserTools } from '@/common/composeabe/UserTools';
|
|
|
-import { useSimplePageListLoader } from '@/components/composeabe/loader/SimplePageListLoader';
|
|
|
import { useGetNotice } from './village/composeabe/GetNotice';
|
|
|
import { waitTimeOut } from '@imengyu/imengyu-utils';
|
|
|
import { toast, loading, hideLoading, confirm } from '@/components/utils/DialogAction';
|
|
|
import { navTo } from '@/components/utils/PageAction';
|
|
|
import { injectAppConfiguration } from '@/api/system/useAppConfiguration';
|
|
|
-import { CollectableModulesIdMap } from '@/common/data/CollectableModulesIdMap';
|
|
|
import Image from '@/components/basic/Image.vue';
|
|
|
import FlexCol from '@/components/layout/FlexCol.vue';
|
|
|
import FlexRow from '@/components/layout/FlexRow.vue';
|
|
|
@@ -311,25 +231,22 @@ import NoticeBar from '@/components/display/NoticeBar.vue';
|
|
|
import StatusBarSpace from '@/components/layout/space/StatusBarSpace.vue';
|
|
|
import LightVillageApi, { VillageListItem, type VillageMapItem } from '@/api/light/LightVillageApi';
|
|
|
import Width from '@/components/layout/space/Width.vue';
|
|
|
-import IndexCommonImageItem from '@/common/components/parts/IndexCommonImageItem.vue';
|
|
|
import IntroClamTip from './village/dialogs/IntroClamTip.vue';
|
|
|
import MemoryTimeOut from '@/components/composeabe/MemoryTimeOut';
|
|
|
import ImageSwiper from '@/common/components/parts/ImageSwiper.vue';
|
|
|
-import VillageInfoApi, { type CommonInfoModel } from '@/api/inhert/VillageInfoApi';
|
|
|
-import SimplePageListLoader from '@/components/loader/SimplePageListLoader.vue';
|
|
|
+import { type CommonInfoModel } from '@/api/inhert/VillageInfoApi';
|
|
|
import PostIndex from './village/dialogs/PostIndex.vue';
|
|
|
import FrameButton from '@/common/components/FrameButton.vue';
|
|
|
import type { RegionItem } from '@/api/map/RegionApi';
|
|
|
import BubbleTip from '@/components/feedback/BubbleTip.vue';
|
|
|
import BannerApi from '@/api/system/Banner';
|
|
|
import Tabs from '@/components/nav/Tabs.vue';
|
|
|
-import BoxMid from '@/common/components/box/BoxMid.vue';
|
|
|
-import Touchable from '@/components/feedback/Touchable.vue';
|
|
|
-import Text from '@/components/basic/Text.vue';
|
|
|
-import Avatar from '@/components/display/Avatar.vue';
|
|
|
-import MasonryGrid from '@/components/layout/masonry/MasonryGrid.vue';
|
|
|
import { DynamicColor, statusBarHeight } from '@/components/theme/ThemeTools';
|
|
|
import SimpleTransition from '@/components/anim/SimpleTransition.vue';
|
|
|
+import RecommendTab from './recommend/RecommendTab.vue';
|
|
|
+import GoodsTab from './recommend/GoodsTab.vue';
|
|
|
+import TravelTab from './recommend/TravelTab.vue';
|
|
|
+import CulturalTab from './recommend/CulturalTab.vue';
|
|
|
|
|
|
const props = defineProps({
|
|
|
currentScrollTop: {
|
|
|
@@ -425,42 +342,6 @@ const recommendTabs = ref([
|
|
|
value: 3,
|
|
|
},
|
|
|
]);
|
|
|
-const recommendLoader = useSimplePageListLoader(20, async (page, pageSize) => {
|
|
|
- return await VillageInfoApi.getListForDiscover({ page, pageSize });
|
|
|
-}, true);
|
|
|
-const goodsLoader = useSimplePageListLoader(20, async (page, pageSize) => {
|
|
|
- return await VillageInfoApi.getListForDiscover({
|
|
|
- page,
|
|
|
- pageSize,
|
|
|
- collectModuleId: CollectableModulesIdMap['goods'],
|
|
|
- });
|
|
|
-}, false);
|
|
|
-const travelLoader = useSimplePageListLoader(20, async (page, pageSize) => {
|
|
|
- return await VillageInfoApi.getMiltListForDiscover({
|
|
|
- page,
|
|
|
- pageSize,
|
|
|
- collectModuleIds: [
|
|
|
- CollectableModulesIdMap['travel_guide'],
|
|
|
- CollectableModulesIdMap['route'],
|
|
|
- CollectableModulesIdMap['environment'],
|
|
|
- CollectableModulesIdMap['relic'],
|
|
|
- CollectableModulesIdMap['spots'],
|
|
|
-
|
|
|
- ],
|
|
|
- });
|
|
|
-}, true);
|
|
|
-const culturalLoader = useSimplePageListLoader(20, async (page, pageSize) => {
|
|
|
- return await VillageInfoApi.getMiltListForDiscover({
|
|
|
- page,
|
|
|
- pageSize,
|
|
|
- collectModuleIds: [
|
|
|
- CollectableModulesIdMap['cultural'],
|
|
|
- CollectableModulesIdMap['folk_culture'],
|
|
|
- CollectableModulesIdMap['story'],
|
|
|
- ],
|
|
|
- });
|
|
|
-}, true);
|
|
|
-
|
|
|
const stickyStyle = themeContext.useThemeStyle({
|
|
|
position: 'sticky',
|
|
|
top: (statusBarHeight - 10) + 'px',
|