|
|
@@ -15,22 +15,23 @@
|
|
|
<Button
|
|
|
icon="https://xy.wenlvti.net/app_static/images/home/IconSwitch.png"
|
|
|
:text="villageStore.currentVillage?.name || '未选择村社'"
|
|
|
- :textColor="topTab === 'village' ? 'text.titleLight' : 'text.content'"
|
|
|
+ textColor="text.titleLight"
|
|
|
size="medium"
|
|
|
@click="showMyFollowPopup = true"
|
|
|
/>
|
|
|
</BubbleTip>
|
|
|
<Button
|
|
|
- :textColor="topTab === 'around' ? 'text.titleLight' : 'text.content'"
|
|
|
- text="优秀村社"
|
|
|
+ icon="map"
|
|
|
+ textColor="text.content"
|
|
|
+ text="周边村社"
|
|
|
size="medium"
|
|
|
- @click="topTab = 'around'"
|
|
|
+ @click="handleGoAround"
|
|
|
/>
|
|
|
</FlexRow>
|
|
|
</FlexCol>
|
|
|
<Height :height="40" />
|
|
|
<template v-if="delayShow">
|
|
|
- <FlexCol v-if="topTab === 'village' && villageStore.currentVillage" gap="gap.md">
|
|
|
+ <FlexCol v-if="villageStore.currentVillage" gap="gap.md">
|
|
|
<FlexRow center :padding="[0,30]">
|
|
|
<HomeLargeTitle title="村社名片" :active="tab === 'card'" @click="tab = 'card'" />
|
|
|
<Width :width="30" />
|
|
|
@@ -53,7 +54,7 @@
|
|
|
/>
|
|
|
<Height :height="150" />
|
|
|
</FlexCol>
|
|
|
- <FlexCol v-else-if="topTab === 'village'" gap="gap.md">
|
|
|
+ <FlexCol v-else gap="gap.md">
|
|
|
<FlexCol center :padding="[60,0]" gap="gap.md">
|
|
|
<Image src="https://xy.wenlvti.net/app_static/images/home/BadgeNew.png" :width="320" mode="widthFix" />
|
|
|
<Text text="还未选择一个村社" fontConfig="primaryTitle" />
|
|
|
@@ -62,6 +63,7 @@
|
|
|
<Height :height="20" />
|
|
|
<FlexRow gap="gap.lg">
|
|
|
<FrameButton text="去认领村社" @click="handleGoSuscribe" primary />
|
|
|
+ <FrameButton text="查看附近村社" @click="handleGoAround" />
|
|
|
</FlexRow>
|
|
|
</FlexCol>
|
|
|
<Around
|
|
|
@@ -69,10 +71,6 @@
|
|
|
@selectVillage="onSelectVillage"
|
|
|
/>
|
|
|
</FlexCol>
|
|
|
- <Around
|
|
|
- v-else
|
|
|
- @selectVillage="onSelectVillage"
|
|
|
- />
|
|
|
</template>
|
|
|
<LoadingPage v-else />
|
|
|
<Height :height="200" />
|
|
|
@@ -124,8 +122,8 @@ import MemoryTimeOut from '@/components/composeabe/MemoryTimeOut';
|
|
|
import LoadingPage from '@/components/display/loading/LoadingPage.vue';
|
|
|
import { navTo } from '@/components/utils/PageAction';
|
|
|
import { useRequireLogin } from '@/common/composeabe/RequireLogin';
|
|
|
+import { useStorageVar } from '@/components/composeabe/StorageVar';
|
|
|
|
|
|
-const topTab = ref<'village' | 'around'>('village');
|
|
|
const tab = ref('card');
|
|
|
const delayShow = ref(false);
|
|
|
const delayShowAround = ref(false);
|
|
|
@@ -144,7 +142,7 @@ const props = withDefaults(defineProps<{
|
|
|
}>(), {
|
|
|
showSwitch: false,
|
|
|
});
|
|
|
-const emit = defineEmits(['goHome']);
|
|
|
+const emit = defineEmits(['goHome', 'goMap']);
|
|
|
|
|
|
const showFollowTipTimeout = new MemoryTimeOut('FollowTip', 1000 * 3600 * 30);//30h
|
|
|
const showFollowTip = ref(false);
|
|
|
@@ -163,17 +161,17 @@ function handleCloseFollowTip(open: boolean) {
|
|
|
function handleGoSuscribe() {
|
|
|
requireLogin(() => navTo('/pages/home/light/create-village'), '登录后才能加入村社哦');
|
|
|
}
|
|
|
+function handleGoAround() {
|
|
|
+ emit('goMap')
|
|
|
+}
|
|
|
|
|
|
function onSelectVillage(village: VillageListItem) {
|
|
|
- topTab.value = 'village';
|
|
|
villageStore.setCurrentVillage(village);
|
|
|
uni.pageScrollTo({ scrollTop: 0 });
|
|
|
showMyFollowPopup.value = false;
|
|
|
}
|
|
|
|
|
|
watch(() => villageStore.currentVillage?.id, (newVal) => {
|
|
|
- if (newVal && topTab.value === 'around')
|
|
|
- topTab.value = 'village';
|
|
|
tab.value = 'card';
|
|
|
handleTestGoTree();
|
|
|
handleShowFollowTip();
|