|
@@ -19,13 +19,20 @@
|
|
|
<Text :text="villageInfoLoader.content.value?.title" fontConfig="primaryTitle" />
|
|
<Text :text="villageInfoLoader.content.value?.title" fontConfig="primaryTitle" />
|
|
|
</FlexCol>
|
|
</FlexCol>
|
|
|
<FlexRow center gap="gap.lg">
|
|
<FlexRow center gap="gap.lg">
|
|
|
- <Button
|
|
|
|
|
- icon="https://xy.wenlvti.net/app_static/images/village/IconJoin.png"
|
|
|
|
|
- radius="radius.lgr"
|
|
|
|
|
- @click="isFollowed ? onUnFollow() : onFollow()"
|
|
|
|
|
|
|
+ <BubbleTip
|
|
|
|
|
+ v-model:show="showFollowTip"
|
|
|
|
|
+ content="关注我,方便下次进入"
|
|
|
|
|
+ @contentClick="isFollowed ? undefined : onFollow()"
|
|
|
|
|
+ @close="handleCloseFollowTip"
|
|
|
>
|
|
>
|
|
|
- {{ isFollowed ? '已关注' : '关注' }}
|
|
|
|
|
- </Button>
|
|
|
|
|
|
|
+ <Button
|
|
|
|
|
+ icon="https://xy.wenlvti.net/app_static/images/village/IconJoin.png"
|
|
|
|
|
+ radius="radius.lgr"
|
|
|
|
|
+ @click="isFollowed ? onUnFollow() : onFollow()"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ isFollowed ? '已关注' : '关注' }}
|
|
|
|
|
+ </Button>
|
|
|
|
|
+ </BubbleTip>
|
|
|
<Button
|
|
<Button
|
|
|
icon="https://xy.wenlvti.net/app_static/images/village/IconFollow.png"
|
|
icon="https://xy.wenlvti.net/app_static/images/village/IconFollow.png"
|
|
|
radius="radius.lgr"
|
|
radius="radius.lgr"
|
|
@@ -272,6 +279,9 @@ import WxButton from '@/components/basic/WxButton.vue';
|
|
|
import Height from '@/components/layout/space/Height.vue';
|
|
import Height from '@/components/layout/space/Height.vue';
|
|
|
import IconButton from '@/components/basic/IconButton.vue';
|
|
import IconButton from '@/components/basic/IconButton.vue';
|
|
|
import Button from '@/components/basic/Button.vue';
|
|
import Button from '@/components/basic/Button.vue';
|
|
|
|
|
+import BubbleBox from '@/components/feedback/BubbleBox.vue';
|
|
|
|
|
+import BubbleTip from '@/components/feedback/BubbleTip.vue';
|
|
|
|
|
+import MemoryTimeOut from '@/components/composeabe/MemoryTimeOut';
|
|
|
|
|
|
|
|
const authStore = useAuthStore();
|
|
const authStore = useAuthStore();
|
|
|
const { getIsVolunteer } = useUserTools();
|
|
const { getIsVolunteer } = useUserTools();
|
|
@@ -289,6 +299,7 @@ const villageInfoLoader = useSimpleDataLoader(async () => {
|
|
|
} catch {
|
|
} catch {
|
|
|
isJoined.value = false;
|
|
isJoined.value = false;
|
|
|
}
|
|
}
|
|
|
|
|
+ handleShowFollowTip();
|
|
|
return {
|
|
return {
|
|
|
title: village?.name || '',
|
|
title: village?.name || '',
|
|
|
desc: village?.desc || '',
|
|
desc: village?.desc || '',
|
|
@@ -335,6 +346,19 @@ const villageUserRankListLoader = useSimpleDataLoader(async () => {
|
|
|
return res
|
|
return res
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+const showFollowTipTimeout = new MemoryTimeOut('FollowTip', 1000 * 3600);//1h
|
|
|
|
|
+const showFollowTip = ref(false);
|
|
|
|
|
+
|
|
|
|
|
+function handleShowFollowTip() {
|
|
|
|
|
+ if (!isFollowed.value && showFollowTipTimeout.isTimeout()) {
|
|
|
|
|
+ showFollowTip.value = true;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+function handleCloseFollowTip() {
|
|
|
|
|
+ showFollowTipTimeout.recordTime();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
watch(rankActiveTag, () => {
|
|
watch(rankActiveTag, () => {
|
|
|
villageUserRankListLoader.reload();
|
|
villageUserRankListLoader.reload();
|
|
|
});
|
|
});
|
|
@@ -394,8 +418,9 @@ watch(() => villageStore.currentVillage, () => {
|
|
|
|
|
|
|
|
defineExpose({
|
|
defineExpose({
|
|
|
onPageBack: (name: string, data: Record<string, unknown>) => {
|
|
onPageBack: (name: string, data: Record<string, unknown>) => {
|
|
|
- if (name === 'refreshVillageGrallery' && data.needRefresh) {
|
|
|
|
|
|
|
+ if (name === 'refreshVillageGrallery') {
|
|
|
villageGalleryRef.value?.refresh();
|
|
villageGalleryRef.value?.refresh();
|
|
|
|
|
+
|
|
|
} else if (name === 'showVillageUpgrade') {
|
|
} else if (name === 'showVillageUpgrade') {
|
|
|
upgradeRef.value?.show();
|
|
upgradeRef.value?.show();
|
|
|
}
|
|
}
|