|
@@ -33,13 +33,31 @@
|
|
|
{{ isFollowed ? '已关注' : '关注' }}
|
|
{{ isFollowed ? '已关注' : '关注' }}
|
|
|
</Button>
|
|
</Button>
|
|
|
</BubbleTip>
|
|
</BubbleTip>
|
|
|
|
|
+ <FlexRow
|
|
|
|
|
+ v-if="isJoined"
|
|
|
|
|
+ gap="gap.md"
|
|
|
|
|
+ radius="radius.lgr"
|
|
|
|
|
+ backgroundColor="background.tertiary"
|
|
|
|
|
+ >
|
|
|
|
|
+ <Avatar
|
|
|
|
|
+ :src="authStore.userInfo?.avatar"
|
|
|
|
|
+ :size="65"
|
|
|
|
|
+ defaultAvatar="https://xy.wenlvti.net/app_static/images/mine/DefaultAvatar.png"
|
|
|
|
|
+ />
|
|
|
|
|
+ <FlexCol gap="gap.sm" :padding="[0,30,0,0]">
|
|
|
|
|
+ <Text :text="displayMyName" fontSize="23" :lines="1" :maxWidth="200" fontConfig="lightImportantTitle" />
|
|
|
|
|
+ <IconButton icon="edit-filling" size="26" @click="changeNickRef?.show()">
|
|
|
|
|
+ <Text text="改昵称" fontSize="22" fontConfig="subText" />
|
|
|
|
|
+ </IconButton>
|
|
|
|
|
+ </FlexCol>
|
|
|
|
|
+ </FlexRow>
|
|
|
<Button
|
|
<Button
|
|
|
|
|
+ v-else
|
|
|
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"
|
|
|
|
|
+ text="加入"
|
|
|
@click="handleGoJoin()"
|
|
@click="handleGoJoin()"
|
|
|
- >
|
|
|
|
|
- {{ isJoined ? '已加入' : '加入' }}
|
|
|
|
|
- </Button>
|
|
|
|
|
|
|
+ />
|
|
|
</FlexRow>
|
|
</FlexRow>
|
|
|
</FlexRow>
|
|
</FlexRow>
|
|
|
|
|
|
|
@@ -61,7 +79,7 @@
|
|
|
<FlexRow align="center">
|
|
<FlexRow align="center">
|
|
|
<FlexCol gap="gap.md">
|
|
<FlexCol gap="gap.md">
|
|
|
<Text :text="`${villageInfoLoader.content.value?.levelText || '默认级别'}`" fontConfig="secondText" />
|
|
<Text :text="`${villageInfoLoader.content.value?.levelText || '默认级别'}`" fontConfig="secondText" />
|
|
|
- <Text :text="`存储空间内存:${villageInfoLoader.content.value?.sizeText || 0}`" fontConfig="secondText" />
|
|
|
|
|
|
|
+ <Text :text="`存储空间内存:${villageInfoLoader.content.value?.sizeText || ''}`" fontConfig="secondText" />
|
|
|
</FlexCol>
|
|
</FlexCol>
|
|
|
</FlexRow>
|
|
</FlexRow>
|
|
|
<FlexRow align="center" gap="gap.md">
|
|
<FlexRow align="center" gap="gap.md">
|
|
@@ -263,6 +281,11 @@
|
|
|
v-if="villageStore.currentVillage"
|
|
v-if="villageStore.currentVillage"
|
|
|
:villageId="villageStore.currentVillage.id"
|
|
:villageId="villageStore.currentVillage.id"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <ChangeNickDialog
|
|
|
|
|
+ v-if="villageStore.currentVillage"
|
|
|
|
|
+ :villageId="villageStore.currentVillage.id"
|
|
|
|
|
+ ref="changeNickRef"
|
|
|
|
|
+ />
|
|
|
<Popup
|
|
<Popup
|
|
|
:show="showUnLight"
|
|
:show="showUnLight"
|
|
|
:zIndex="100"
|
|
:zIndex="100"
|
|
@@ -304,8 +327,10 @@ import { useSimpleDataLoader } from '@/components/composeabe/loader/SimpleDataLo
|
|
|
import { useVillageStore } from '@/store/village';
|
|
import { useVillageStore } from '@/store/village';
|
|
|
import { useRequireLogin } from '@/common/composeabe/RequireLogin';
|
|
import { useRequireLogin } from '@/common/composeabe/RequireLogin';
|
|
|
import { useFollow } from '../composeabe/Follow';
|
|
import { useFollow } from '../composeabe/Follow';
|
|
|
-import { ArrayUtils, assertNotNull, waitTimeOut } from '@imengyu/imengyu-utils';
|
|
|
|
|
|
|
+import { useGetNotice } from '../composeabe/GetNotice';
|
|
|
|
|
+import { assertNotNull, FormatUtils, waitTimeOut } from '@imengyu/imengyu-utils';
|
|
|
import { navTo } from '@/components/utils/PageAction';
|
|
import { navTo } from '@/components/utils/PageAction';
|
|
|
|
|
+import { confirm } from '@/components/dialog/CommonRoot';
|
|
|
import HomeTitle from '@/common/components/parts/HomeTitle.vue';
|
|
import HomeTitle from '@/common/components/parts/HomeTitle.vue';
|
|
|
import Icon from '@/components/basic/Icon.vue';
|
|
import Icon from '@/components/basic/Icon.vue';
|
|
|
import Text from '@/components/basic/Text.vue';
|
|
import Text from '@/components/basic/Text.vue';
|
|
@@ -331,13 +356,18 @@ import Button from '@/components/basic/Button.vue';
|
|
|
import BubbleTip from '@/components/feedback/BubbleTip.vue';
|
|
import BubbleTip from '@/components/feedback/BubbleTip.vue';
|
|
|
import MemoryTimeOut from '@/components/composeabe/MemoryTimeOut';
|
|
import MemoryTimeOut from '@/components/composeabe/MemoryTimeOut';
|
|
|
import TextEllipsis from '@/components/display/TextEllipsis.vue';
|
|
import TextEllipsis from '@/components/display/TextEllipsis.vue';
|
|
|
-import { confirm, toast } from '@/components/dialog/CommonRoot';
|
|
|
|
|
-import { useGetNotice } from '../composeabe/GetNotice';
|
|
|
|
|
import OfficialApi from '@/api/light/OfficialApi';
|
|
import OfficialApi from '@/api/light/OfficialApi';
|
|
|
import FrameButton from '@/common/components/FrameButton.vue';
|
|
import FrameButton from '@/common/components/FrameButton.vue';
|
|
|
import Width from '@/components/layout/space/Width.vue';
|
|
import Width from '@/components/layout/space/Width.vue';
|
|
|
import Popup from '@/components/dialog/Popup.vue';
|
|
import Popup from '@/components/dialog/Popup.vue';
|
|
|
import Image from '@/components/basic/Image.vue';
|
|
import Image from '@/components/basic/Image.vue';
|
|
|
|
|
+import Avatar from '@/components/display/Avatar.vue';
|
|
|
|
|
+import ChangeNickDialog from '../dialogs/ChangeNickDialog.vue';
|
|
|
|
|
+
|
|
|
|
|
+const emit = defineEmits<{
|
|
|
|
|
+ (e: 'goTree'): void;
|
|
|
|
|
+ (e: 'goJoin'): void;
|
|
|
|
|
+}>();
|
|
|
|
|
|
|
|
const authStore = useAuthStore();
|
|
const authStore = useAuthStore();
|
|
|
const { getIsVolunteer } = useUserTools();
|
|
const { getIsVolunteer } = useUserTools();
|
|
@@ -351,9 +381,6 @@ const { onPublishSuccess } = useOfficialAccount(() => {
|
|
|
});
|
|
});
|
|
|
const villageStore = useVillageStore();
|
|
const villageStore = useVillageStore();
|
|
|
const { isFollowed, onFollow, onUnFollow } = useFollow();
|
|
const { isFollowed, onFollow, onUnFollow } = useFollow();
|
|
|
-const isLight = computed(() => {
|
|
|
|
|
- return villageStore.currentVillage?.isLight ?? false;
|
|
|
|
|
-});
|
|
|
|
|
const { getIsJoinedVillage } = useUserTools();
|
|
const { getIsJoinedVillage } = useUserTools();
|
|
|
const isOfficialEmpty = ref(false);
|
|
const isOfficialEmpty = ref(false);
|
|
|
const isJoined = ref(false);
|
|
const isJoined = ref(false);
|
|
@@ -375,7 +402,7 @@ const villageInfoLoader = useSimpleDataLoader(async () => {
|
|
|
title: village?.name || '',
|
|
title: village?.name || '',
|
|
|
desc: village?.desc || '',
|
|
desc: village?.desc || '',
|
|
|
address: village?.address,
|
|
address: village?.address,
|
|
|
- sizeText: village?.storageLimit || 0,
|
|
|
|
|
|
|
+ sizeText: `${FormatUtils.formatSize(village?.storageUsed || 0)}已用/${FormatUtils.formatSize(village?.storageLimit || 0)}空间`,
|
|
|
level: village?.level.toString() || '',
|
|
level: village?.level.toString() || '',
|
|
|
levelText: village?.levelText || '',
|
|
levelText: village?.levelText || '',
|
|
|
rankText: village?.rank.toString() || '',
|
|
rankText: village?.rank.toString() || '',
|
|
@@ -387,12 +414,13 @@ const villageInfoLoader = useSimpleDataLoader(async () => {
|
|
|
latitude: village?.latitude || 0,
|
|
latitude: village?.latitude || 0,
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
-const emit = defineEmits<{
|
|
|
|
|
- (e: 'goTree'): void;
|
|
|
|
|
- (e: 'goJoin'): void;
|
|
|
|
|
-}>();
|
|
|
|
|
-
|
|
|
|
|
|
|
+const isLight = computed(() => {
|
|
|
|
|
+ return villageStore.currentVillage?.isLight ?? false;
|
|
|
|
|
+});
|
|
|
|
|
+const displayMyName = computed(() => {
|
|
|
|
|
+ const villageInfoInList = villageStore.myJoinedVillages.find(v => v.id === villageStore.currentVillage?.id);
|
|
|
|
|
+ return villageInfoInList?.villageNickname || authStore.userInfo?.nickname || authStore.userInfo?.username || '暂无昵称';
|
|
|
|
|
+});
|
|
|
|
|
|
|
|
const rankActiveTag = ref('文化积分');
|
|
const rankActiveTag = ref('文化积分');
|
|
|
const listActiveTag = ref('广场');
|
|
const listActiveTag = ref('广场');
|
|
@@ -404,7 +432,7 @@ const villageUserRankListLoader = useSimpleDataLoader(async () => {
|
|
|
}))
|
|
}))
|
|
|
.map((item, i) => ({
|
|
.map((item, i) => ({
|
|
|
id: item.id,
|
|
id: item.id,
|
|
|
- image: item.image ?? '',
|
|
|
|
|
|
|
+ image: item.avatar ?? '',
|
|
|
title: item.name,
|
|
title: item.name,
|
|
|
rank: i + 1,
|
|
rank: i + 1,
|
|
|
score: item.points,
|
|
score: item.points,
|
|
@@ -533,6 +561,7 @@ const { currentNoticeContent, noticeListLoader } = useGetNotice(() => villageSto
|
|
|
|
|
|
|
|
const upgradeRef = ref<InstanceType<typeof UpgradeDialog>>();
|
|
const upgradeRef = ref<InstanceType<typeof UpgradeDialog>>();
|
|
|
const villageGalleryRef = ref<InstanceType<typeof VillageGallery>>();
|
|
const villageGalleryRef = ref<InstanceType<typeof VillageGallery>>();
|
|
|
|
|
+const changeNickRef = ref<InstanceType<typeof ChangeNickDialog>>();
|
|
|
|
|
|
|
|
watch(() => villageStore.currentVillage, async () => {
|
|
watch(() => villageStore.currentVillage, async () => {
|
|
|
await waitTimeOut(100);
|
|
await waitTimeOut(100);
|