|
|
@@ -14,66 +14,68 @@
|
|
|
>
|
|
|
|
|
|
<!-- 标题 -->
|
|
|
- <FlexRow justify="space-between" align="flex-end" width="100%">
|
|
|
+ <FlexRow justify="space-between" gap="gap.lg" wrap align="flex-end" width="100%">
|
|
|
<FlexRow gap="gap.md">
|
|
|
<Text
|
|
|
- :text="villageInfoLoader.content.value?.title"
|
|
|
+ :text="title"
|
|
|
:lines="1"
|
|
|
:fontSize="40"
|
|
|
- :maxWidth="240"
|
|
|
wordBreak="break-all"
|
|
|
fontConfig="primaryTitle"
|
|
|
/>
|
|
|
- <IconButton icon="cascades" :size="40" @click="shareQRDialog?.show()" />
|
|
|
</FlexRow>
|
|
|
- <FlexRow center gap="gap.lg">
|
|
|
- <BubbleTip
|
|
|
- v-model:show="showFollowTip"
|
|
|
- content="关注我,方便下次进入"
|
|
|
- @contentClick="isFollowed ? undefined : onFollow()"
|
|
|
- @close="handleCloseFollowTip"
|
|
|
- >
|
|
|
- <Button
|
|
|
- icon="https://xy.wenlvti.net/app_static/images/village/IconJoin.png"
|
|
|
+ <FlexRow flex="1" justify="space-between" align="center" gap="gap.lg">
|
|
|
+ <IconButton icon="cascades" :size="40" @click="shareQRDialog?.show()" />
|
|
|
+ <FlexRow align="center" gap="gap.lg">
|
|
|
+ <BubbleTip
|
|
|
+ v-model:show="showFollowTip"
|
|
|
+ content="关注我,方便下次进入"
|
|
|
+ @contentClick="isFollowed ? undefined : onFollow()"
|
|
|
+ @close="handleCloseFollowTip"
|
|
|
+ >
|
|
|
+ <Button
|
|
|
+ :icon="isFollowed ? 'success' : 'https://xy.wenlvti.net/app_static/images/village/IconJoin.png'"
|
|
|
+ radius="radius.lgr"
|
|
|
+ :text="isFollowed ? (title.length < 5 ? '已关注' : '') : '关注'"
|
|
|
+ :padding="[15, 10]"
|
|
|
+ :iconProps="{ size: 38 }"
|
|
|
+ @click="isFollowed ? onUnFollow() : onFollow()"
|
|
|
+ />
|
|
|
+ </BubbleTip>
|
|
|
+ <FlexRow
|
|
|
+ v-if="isJoined"
|
|
|
+ gap="gap.md"
|
|
|
radius="radius.lgr"
|
|
|
- @click="isFollowed ? onUnFollow() : onFollow()"
|
|
|
+ backgroundColor="background.tertiary"
|
|
|
>
|
|
|
- {{ isFollowed ? '已关注' : '关注' }}
|
|
|
- </Button>
|
|
|
- </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"
|
|
|
+ <Avatar
|
|
|
+ :src="authStore.userInfo?.avatar"
|
|
|
+ :size="65"
|
|
|
+ defaultAvatar="https://xy.wenlvti.net/app_static/images/mine/DefaultAvatar.png"
|
|
|
+ />
|
|
|
+ <FlexCol position="relative" gap="gap.sm" :padding="[0,30,0,0]">
|
|
|
+ <FlexRow align="center" :gap="10">
|
|
|
+ <Text :text="displayMyName" fontSize="23" :lines="1" :maxWidth="150" fontConfig="lightImportantTitle" />
|
|
|
+ <Button
|
|
|
+ v-if="isStaff"
|
|
|
+ :innerStyle="{ position: 'absolute', right: 0, top: 0, transform: 'translate(5%,-50%)' }"
|
|
|
+ text="管理" size="mini" radius="radius.md" type="danger"
|
|
|
+ @click="staffInfoRef?.show()"
|
|
|
+ />
|
|
|
+ </FlexRow>
|
|
|
+ <IconButton icon="edit-filling" size="26" @click="changeNickRef?.show()">
|
|
|
+ <Text text="改昵称" :wrap="false" fontSize="22" fontConfig="subText" />
|
|
|
+ </IconButton>
|
|
|
+ </FlexCol>
|
|
|
+ </FlexRow>
|
|
|
+ <Button
|
|
|
+ v-else
|
|
|
+ icon="https://xy.wenlvti.net/app_static/images/village/IconFollow.png"
|
|
|
+ radius="radius.lgr"
|
|
|
+ text="加入"
|
|
|
+ @click="handleGoJoin()"
|
|
|
/>
|
|
|
- <FlexCol position="relative" gap="gap.sm" :padding="[0,30,0,0]">
|
|
|
- <FlexRow align="center" :gap="10">
|
|
|
- <Text :text="displayMyName" fontSize="23" :lines="1" :maxWidth="150" fontConfig="lightImportantTitle" />
|
|
|
- <Button
|
|
|
- v-if="isStaff"
|
|
|
- :innerStyle="{ position: 'absolute', right: 0, top: 0, transform: 'translate(5%,-50%)' }"
|
|
|
- text="管理" size="mini" radius="radius.md" type="danger"
|
|
|
- @click="staffInfoRef?.show()"
|
|
|
- />
|
|
|
- </FlexRow>
|
|
|
- <IconButton icon="edit-filling" size="26" @click="changeNickRef?.show()">
|
|
|
- <Text text="改昵称" fontSize="22" fontConfig="subText" />
|
|
|
- </IconButton>
|
|
|
- </FlexCol>
|
|
|
</FlexRow>
|
|
|
- <Button
|
|
|
- v-else
|
|
|
- icon="https://xy.wenlvti.net/app_static/images/village/IconFollow.png"
|
|
|
- radius="radius.lgr"
|
|
|
- text="加入"
|
|
|
- @click="handleGoJoin()"
|
|
|
- />
|
|
|
</FlexRow>
|
|
|
</FlexRow>
|
|
|
|
|
|
@@ -110,10 +112,9 @@
|
|
|
radius="radius.lgr"
|
|
|
:padding="[10, 30]"
|
|
|
backgroundColor="white"
|
|
|
+ text="升级村社"
|
|
|
@click="upgradeRef?.show()"
|
|
|
- >
|
|
|
- 升级村社
|
|
|
- </Button>
|
|
|
+ />
|
|
|
</FlexRow>
|
|
|
</FlexRow>
|
|
|
|
|
|
@@ -305,6 +306,7 @@
|
|
|
<ChangeNickDialog
|
|
|
v-if="villageStore.currentVillage"
|
|
|
:villageId="villageStore.currentVillage.id"
|
|
|
+ :currentNick="displayMyName"
|
|
|
ref="changeNickRef"
|
|
|
/>
|
|
|
<StaffInfoDialog
|
|
|
@@ -451,9 +453,8 @@ const villageInfoLoader = useSimpleDataLoader(async () => {
|
|
|
latitude: village?.latitude || 0,
|
|
|
};
|
|
|
});
|
|
|
-const isLight = computed(() => {
|
|
|
- return villageStore.currentVillage?.isLight ?? false;
|
|
|
-});
|
|
|
+const isLight = computed(() => villageStore.currentVillage?.isLight ?? false);
|
|
|
+const title = computed(() => villageInfoLoader.content.value?.title || '');
|
|
|
const extraInfoInList = computed(() => villageStore.myJoinedVillages.find(v => v.id === villageStore.currentVillage?.id));
|
|
|
const displayMyName = computed(() => extraInfoInList.value?.villageNickname || authStore.userInfo?.nickname || authStore.userInfo?.username || '暂无昵称');
|
|
|
const staffInfo = computed(() => extraInfoInList.value ? {
|