|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<CommonRoot>
|
|
|
- <FlexCol v-if="showSwitch" position="absolute" :left="0" :top="0" :right="0">
|
|
|
+ <FlexCol v-if="showSwitch" position="fixed" :left="0" :top="0" :right="0" :zIndex="200">
|
|
|
<StatusBarSpace />
|
|
|
<FlexRow gap="gap.lg" :padding="30">
|
|
|
<BubbleTip
|
|
|
@@ -30,41 +30,29 @@
|
|
|
</FlexCol>
|
|
|
<Height :height="40" />
|
|
|
<FlexCol v-if="topTab === 'village' && villageStore.currentVillage" gap="gap.md">
|
|
|
- <FlexCol v-if="!isLight" 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" />
|
|
|
- <Text text="等你的加入,快来为家乡建设做贡献吧" fontConfig="contentText" />
|
|
|
- <Height :height="20" />
|
|
|
- <FlexRow gap="gap.lg">
|
|
|
- <FrameButton :text="isFollowed ? '已关注' : '先关注村社'" @click="isFollowed ? onUnFollow() : handleFollow()" />
|
|
|
- <FrameButton text="去申请点亮" @click="handleLight" primary />
|
|
|
- </FlexRow>
|
|
|
- </FlexCol>
|
|
|
- <template v-else>
|
|
|
- <FlexRow center :padding="[0,30]">
|
|
|
- <HomeLargeTitle title="村社名片" :active="tab === 'card'" @click="tab = 'card'" />
|
|
|
- <Width :width="30" />
|
|
|
- <HomeLargeTitle title="乡源树" titleColorAnim :active="tab === 'tree'" @click="tab = 'tree'">
|
|
|
- <template #icon>
|
|
|
- <Image src="https://xy.wenlvti.net/app_static/images/village/TreeIconAmin2.gif" :width="34" :height="50" mode="heightFix" />
|
|
|
- </template>
|
|
|
- </HomeLargeTitle>
|
|
|
- </FlexRow>
|
|
|
- <Card
|
|
|
- v-if="tab === 'card'"
|
|
|
- ref="cardRef"
|
|
|
- @goTree="tab = 'tree'"
|
|
|
- @goJoin="joinDialog?.show()"
|
|
|
- />
|
|
|
- <Tree
|
|
|
- v-if="tab === 'tree'"
|
|
|
- ref="treeRef"
|
|
|
- />
|
|
|
- </template>
|
|
|
+ <FlexRow center :padding="[0,30]">
|
|
|
+ <HomeLargeTitle title="村社名片" :active="tab === 'card'" @click="tab = 'card'" />
|
|
|
+ <Width :width="30" />
|
|
|
+ <HomeLargeTitle title="乡源树" titleColorAnim :active="tab === 'tree'" @click="tab = 'tree'">
|
|
|
+ <template #icon>
|
|
|
+ <Image src="https://xy.wenlvti.net/app_static/images/village/TreeIconAmin2.gif" :width="34" :height="50" mode="heightFix" />
|
|
|
+ </template>
|
|
|
+ </HomeLargeTitle>
|
|
|
+ </FlexRow>
|
|
|
+ <Card
|
|
|
+ v-if="tab === 'card'"
|
|
|
+ ref="cardRef"
|
|
|
+ @goTree="tab = 'tree'"
|
|
|
+ @goJoin="joinDialog?.show()"
|
|
|
+ />
|
|
|
+ <Tree
|
|
|
+ v-if="tab === 'tree'"
|
|
|
+ ref="treeRef"
|
|
|
+ />
|
|
|
<Height :height="150" />
|
|
|
</FlexCol>
|
|
|
<FlexCol v-else-if="topTab === 'village'" gap="gap.md">
|
|
|
- <FlexCol v-if="!isLight" center :padding="[60,0]" 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" />
|
|
|
<Text text="欢迎关注或者认领村社,认领自己家乡参与建设,或四处看看" fontConfig="contentText" />
|
|
|
@@ -87,19 +75,20 @@
|
|
|
round
|
|
|
size="80vh"
|
|
|
>
|
|
|
- <VillageMyFollow @goDetails="onSelectVillage" />
|
|
|
+ <scroll-view scroll-y style="height: 100%">
|
|
|
+ <VillageMyFollow @goDetails="onSelectVillage" />
|
|
|
+ </scroll-view>
|
|
|
</Popup>
|
|
|
<JoinDialog
|
|
|
ref="joinDialog"
|
|
|
v-if="villageStore.currentVillage"
|
|
|
:villageId="villageStore.currentVillage.id"
|
|
|
/>
|
|
|
-
|
|
|
</CommonRoot>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { computed, onMounted, ref, watch } from 'vue';
|
|
|
+import { onMounted, ref, watch } from 'vue';
|
|
|
import { useVillageStore } from '@/store/village';
|
|
|
import { useFollow } from './composeabe/Follow';
|
|
|
import { isDevEnv } from '@/common/config/AppCofig';
|
|
|
@@ -143,17 +132,10 @@ const props = withDefaults(defineProps<{
|
|
|
});
|
|
|
const emit = defineEmits(['goHome']);
|
|
|
|
|
|
-const isLight = computed(() => {
|
|
|
- return villageStore.currentVillage?.isLight ?? false;
|
|
|
-});
|
|
|
-
|
|
|
const showFollowTipTimeout = new MemoryTimeOut('FollowTip', 1000 * 3600 * 30);//30h
|
|
|
const showFollowTip = ref(false);
|
|
|
|
|
|
-function handleFollow() {
|
|
|
- onFollow();
|
|
|
- handleShowFollowTip();
|
|
|
-}
|
|
|
+
|
|
|
function handleShowFollowTip() {
|
|
|
if (showFollowTipTimeout.isTimeout()) {
|
|
|
showFollowTip.value = true;
|
|
|
@@ -165,9 +147,6 @@ function handleCloseFollowTip(open: boolean) {
|
|
|
showMyFollowPopup.value = true;
|
|
|
}
|
|
|
|
|
|
-function handleLight() {
|
|
|
- joinDialog.value?.show();
|
|
|
-}
|
|
|
function handleGoSuscribe() {
|
|
|
emit('goHome');
|
|
|
}
|