|
|
@@ -1,353 +1,356 @@
|
|
|
<template>
|
|
|
- <DynamicX
|
|
|
- :page="page"
|
|
|
- :injectScriptGlobal="pageScriptGlobal"
|
|
|
- >
|
|
|
- <template #default="{ page, context }">
|
|
|
-
|
|
|
- <DynamicXNodeChild :node="page">
|
|
|
- <template #nodeRender="{ node }">
|
|
|
-
|
|
|
- <FlexCol v-if="node.type === 'Card:Basic'" gap="gap.md">
|
|
|
- <!-- 标题 -->
|
|
|
- <FlexRow justify="space-between" gap="gap.lg" wrap align="center" width="100%">
|
|
|
- <FlexRow gap="gap.md">
|
|
|
- <Text
|
|
|
- :text="title"
|
|
|
- :lines="1"
|
|
|
- :fontSize="40"
|
|
|
- wordBreak="break-all"
|
|
|
- fontConfig="primaryTitle"
|
|
|
- />
|
|
|
- </FlexRow>
|
|
|
- <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"
|
|
|
- >
|
|
|
+ <SimplePageContentLoader :loader="pageThemeLoader">
|
|
|
+ <DynamicX
|
|
|
+ v-if="pageThemeLoader.content.value"
|
|
|
+ :page="pageThemeLoader.content.value"
|
|
|
+ :injectScriptGlobal="pageScriptGlobal"
|
|
|
+ >
|
|
|
+ <template #default="{ page, context }">
|
|
|
+
|
|
|
+ <DynamicXNodeChild :node="page">
|
|
|
+ <template #nodeRender="{ node }">
|
|
|
+
|
|
|
+ <FlexCol v-if="node.type === 'Card:Basic'" gap="gap.md">
|
|
|
+ <!-- 标题 -->
|
|
|
+ <FlexRow justify="space-between" gap="gap.lg" wrap align="center" width="100%">
|
|
|
+ <FlexRow gap="gap.md">
|
|
|
+ <Text
|
|
|
+ :text="title"
|
|
|
+ :lines="1"
|
|
|
+ :fontSize="40"
|
|
|
+ wordBreak="break-all"
|
|
|
+ fontConfig="primaryTitle"
|
|
|
+ />
|
|
|
+ </FlexRow>
|
|
|
+ <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"
|
|
|
+ backgroundColor="background.tertiary"
|
|
|
+ >
|
|
|
+ <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
|
|
|
- :icon="isFollowed ? 'success' : 'https://xy.wenlvti.net/app_static/images/village/IconJoin.png'"
|
|
|
+ v-else
|
|
|
+ icon="https://xy.wenlvti.net/app_static/images/village/IconFollow.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"
|
|
|
- backgroundColor="background.tertiary"
|
|
|
- >
|
|
|
- <Avatar
|
|
|
- :src="authStore.userInfo?.avatar"
|
|
|
- :size="65"
|
|
|
- defaultAvatar="https://xy.wenlvti.net/app_static/images/mine/DefaultAvatar.png"
|
|
|
+ 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="改昵称" :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()"
|
|
|
- />
|
|
|
</FlexRow>
|
|
|
</FlexRow>
|
|
|
- </FlexRow>
|
|
|
-
|
|
|
- <!-- 简介 -->
|
|
|
- <TextEllipsis
|
|
|
- fontConfig="secondText"
|
|
|
- :outerProps="{ direction: 'row', width: '490rpx' }"
|
|
|
- :lines="1"
|
|
|
- :expandable="(villageInfoLoader.content.value?.desc as string || '').length > 20"
|
|
|
- :text="(villageInfoLoader.content.value?.desc as string) || '暂无简介,欢迎您来编写完善!'"
|
|
|
- wordBreak="break-all"
|
|
|
- @expand="descOpen = true;"
|
|
|
- @collapse="descOpen = false;"
|
|
|
- />
|
|
|
-
|
|
|
- </FlexCol>
|
|
|
- <template v-else-if="node.type === 'Card:Level'">
|
|
|
-
|
|
|
- <!-- 状态与申请 -->
|
|
|
- <FlexRow
|
|
|
- backgroundColor="background.tertiary"
|
|
|
- radius="radius.md"
|
|
|
- padding="space.md"
|
|
|
- justify="space-between"
|
|
|
- >
|
|
|
- <FlexRow align="center">
|
|
|
- <FlexCol gap="gap.md">
|
|
|
- <FlexRow gap="gap.lg" align="center">
|
|
|
- <Icon v-if="villageInfoLoader.content.value?.vipLevel === 4" name="https://xy.wenlvti.net/app_static/images/village/IconGov.png" :size="70" />
|
|
|
- <Text :text="`${villageInfoLoader.content.value?.vipLevelText || '默认级别'}`" fontConfig="secondText" />
|
|
|
- </FlexRow>
|
|
|
- <Text v-if="villageInfoLoader.content.value?.sizeLimit" :text="`存储空间:${villageInfoLoader.content.value?.sizeText || ''}`" :fontSize="22" fontConfig="secondText" />
|
|
|
- <Text v-else text="无限存储空间" :fontSize="22" fontConfig="secondText" />
|
|
|
- </FlexCol>
|
|
|
- </FlexRow>
|
|
|
- <FlexRow align="center" gap="gap.md">
|
|
|
- <IconButton icon="help-filling" @click="navTo('/pages/article/details', { id: 7021, modelId: 18, showRecommend: false })" />
|
|
|
- <Button
|
|
|
- v-if="(villageInfoLoader.content.value?.vipLevel || 0) < 4"
|
|
|
- icon="https://xy.wenlvti.net/app_static/images/village/IconUser.png"
|
|
|
- radius="radius.lgr"
|
|
|
- :padding="[10, 30]"
|
|
|
- backgroundColor="white"
|
|
|
- text="升级村社"
|
|
|
- @click="upgradeRef?.show()"
|
|
|
- />
|
|
|
- </FlexRow>
|
|
|
- </FlexRow>
|
|
|
-
|
|
|
- </template>
|
|
|
- <template v-else-if="node.type === 'Card:Gallery'">
|
|
|
-
|
|
|
- <!-- 图片 -->
|
|
|
- <VillageGallery
|
|
|
- v-if="villageInfoLoader.content.value"
|
|
|
- ref="villageGalleryRef"
|
|
|
- :villageId="villageStore.currentVillage?.id ?? 0"
|
|
|
- @goGallery="handleGoGallery"
|
|
|
- />
|
|
|
|
|
|
- </template>
|
|
|
- <template v-else-if="node.type === 'Card:AddressAndMap'">
|
|
|
-
|
|
|
- <!-- 地图 -->
|
|
|
- <VillageMiniMap
|
|
|
- v-if="villageInfoLoader.content.value"
|
|
|
- :lonlat="{
|
|
|
- longitude: villageInfoLoader.content.value.longitude,
|
|
|
- latitude: villageInfoLoader.content.value.latitude
|
|
|
- }"
|
|
|
- :currentNoticeContent="currentNoticeContent"
|
|
|
- >
|
|
|
- <FlexRow position="absolute" :inset="{ l: 13, r: 13, b: 13 }" center :zIndex="100">
|
|
|
- <FlexRow align="center" gap="gap.sm" backgroundColor="background.tertiary" radius="radius.lg" padding="padding.sm">
|
|
|
- <Icon name="https://xy.wenlvti.net/app_static/images/village/IconMap.png" size="fontSize.md" />
|
|
|
- <Text :text="villageInfoLoader.content.value?.address" :maxWidth="550" fontConfig="contentText" fontSize="fontSize.sm" />
|
|
|
+ <!-- 简介 -->
|
|
|
+ <TextEllipsis
|
|
|
+ fontConfig="secondText"
|
|
|
+ :outerProps="{ direction: 'row', width: '490rpx' }"
|
|
|
+ :lines="1"
|
|
|
+ :expandable="(villageInfoLoader.content.value?.desc as string || '').length > 20"
|
|
|
+ :text="(villageInfoLoader.content.value?.desc as string) || '暂无简介,欢迎您来编写完善!'"
|
|
|
+ wordBreak="break-all"
|
|
|
+ @expand="descOpen = true;"
|
|
|
+ @collapse="descOpen = false;"
|
|
|
+ />
|
|
|
+
|
|
|
+ </FlexCol>
|
|
|
+ <template v-else-if="node.type === 'Card:Level'">
|
|
|
+
|
|
|
+ <!-- 状态与申请 -->
|
|
|
+ <FlexRow
|
|
|
+ backgroundColor="background.tertiary"
|
|
|
+ radius="radius.md"
|
|
|
+ padding="space.md"
|
|
|
+ justify="space-between"
|
|
|
+ >
|
|
|
+ <FlexRow align="center">
|
|
|
+ <FlexCol gap="gap.md">
|
|
|
+ <FlexRow gap="gap.lg" align="center">
|
|
|
+ <Icon v-if="villageInfoLoader.content.value?.vipLevel === 4" name="https://xy.wenlvti.net/app_static/images/village/IconGov.png" :size="70" />
|
|
|
+ <Text :text="`${villageInfoLoader.content.value?.vipLevelText || '默认级别'}`" fontConfig="secondText" />
|
|
|
+ </FlexRow>
|
|
|
+ <Text v-if="villageInfoLoader.content.value?.sizeLimit" :text="`存储空间:${villageInfoLoader.content.value?.sizeText || ''}`" :fontSize="22" fontConfig="secondText" />
|
|
|
+ <Text v-else text="无限存储空间" :fontSize="22" fontConfig="secondText" />
|
|
|
+ </FlexCol>
|
|
|
+ </FlexRow>
|
|
|
+ <FlexRow align="center" gap="gap.md">
|
|
|
+ <IconButton icon="help-filling" @click="navTo('/pages/article/details', { id: 7021, modelId: 18, showRecommend: false })" />
|
|
|
+ <Button
|
|
|
+ v-if="(villageInfoLoader.content.value?.vipLevel || 0) < 4"
|
|
|
+ icon="https://xy.wenlvti.net/app_static/images/village/IconUser.png"
|
|
|
+ radius="radius.lgr"
|
|
|
+ :padding="[10, 30]"
|
|
|
+ backgroundColor="white"
|
|
|
+ text="升级村社"
|
|
|
+ @click="upgradeRef?.show()"
|
|
|
+ />
|
|
|
</FlexRow>
|
|
|
</FlexRow>
|
|
|
- </VillageMiniMap>
|
|
|
|
|
|
- </template>
|
|
|
- <template v-else-if="node.type === 'Card:Static'">
|
|
|
-
|
|
|
- <!-- 村社状态信息 -->
|
|
|
- <FlexRow justify="space-between" align="center">
|
|
|
- <FlexRow center gap="gap.lg" flexBasis="50%">
|
|
|
- <Text text="村社排名" fontConfig="contentText" />
|
|
|
- <Text text="No." fontConfig="lightTitle" />
|
|
|
- <Text :text="villageInfoLoader.content.value?.rankText" fontConfig="primaryTitle" />
|
|
|
- </FlexRow>
|
|
|
- <FlexRow center gap="gap.lg" flexBasis="50%">
|
|
|
- <Text text="村社等级" fontConfig="contentText" />
|
|
|
- <Text :text="`${villageInfoLoader.content.value?.level}级`" fontConfig="primaryTitle" />
|
|
|
+ </template>
|
|
|
+ <template v-else-if="node.type === 'Card:Gallery'">
|
|
|
+
|
|
|
+ <!-- 图片 -->
|
|
|
+ <VillageGallery
|
|
|
+ v-if="villageInfoLoader.content.value"
|
|
|
+ ref="villageGalleryRef"
|
|
|
+ :villageId="villageStore.currentVillage?.id ?? 0"
|
|
|
+ @goGallery="handleGoGallery"
|
|
|
+ />
|
|
|
+
|
|
|
+ </template>
|
|
|
+ <template v-else-if="node.type === 'Card:AddressAndMap'">
|
|
|
+
|
|
|
+ <!-- 地图 -->
|
|
|
+ <VillageMiniMap
|
|
|
+ v-if="villageInfoLoader.content.value"
|
|
|
+ :lonlat="{
|
|
|
+ longitude: villageInfoLoader.content.value.longitude,
|
|
|
+ latitude: villageInfoLoader.content.value.latitude
|
|
|
+ }"
|
|
|
+ :currentNoticeContent="currentNoticeContent"
|
|
|
+ >
|
|
|
+ <FlexRow position="absolute" :inset="{ l: 13, r: 13, b: 13 }" center :zIndex="100">
|
|
|
+ <FlexRow align="center" gap="gap.sm" backgroundColor="background.tertiary" radius="radius.lg" padding="padding.sm">
|
|
|
+ <Icon name="https://xy.wenlvti.net/app_static/images/village/IconMap.png" size="fontSize.md" />
|
|
|
+ <Text :text="villageInfoLoader.content.value?.address" :maxWidth="550" fontConfig="contentText" fontSize="fontSize.sm" />
|
|
|
+ </FlexRow>
|
|
|
+ </FlexRow>
|
|
|
+ </VillageMiniMap>
|
|
|
+
|
|
|
+ </template>
|
|
|
+ <template v-else-if="node.type === 'Card:Static'">
|
|
|
+
|
|
|
+ <!-- 村社状态信息 -->
|
|
|
+ <FlexRow justify="space-between" align="center">
|
|
|
+ <FlexRow center gap="gap.lg" flexBasis="50%">
|
|
|
+ <Text text="村社排名" fontConfig="contentText" />
|
|
|
+ <Text text="No." fontConfig="lightTitle" />
|
|
|
+ <Text :text="villageInfoLoader.content.value?.rankText" fontConfig="primaryTitle" />
|
|
|
+ </FlexRow>
|
|
|
+ <FlexRow center gap="gap.lg" flexBasis="50%">
|
|
|
+ <Text text="村社等级" fontConfig="contentText" />
|
|
|
+ <Text :text="`${villageInfoLoader.content.value?.level}级`" fontConfig="primaryTitle" />
|
|
|
+ </FlexRow>
|
|
|
</FlexRow>
|
|
|
- </FlexRow>
|
|
|
-
|
|
|
- <Height height="gap.md" />
|
|
|
-
|
|
|
- <FlexRow backgroundColor="background.tertiary" radius="radius.md" :padding="[30, 20]">
|
|
|
- <Touchable direction="column" center gap="gap.sm" flexBasis="25%" @click="navTo('/pages/home/village/task/index')">
|
|
|
- <Text text="乡源光" fontConfig="secondText" fontSize="fontSize.sm" />
|
|
|
- <Text :text="villageInfoLoader.content.value?.light || '0'" fontConfig="importantTitle" />
|
|
|
- <Button type="text" size="mini" text="做任务" @click="navTo('/pages/home/village/task/index')" />
|
|
|
- </Touchable>
|
|
|
- <Divider type="vertical" />
|
|
|
- <FlexCol center gap="gap.sm" flexBasis="25%">
|
|
|
- <Touchable direction="column" center @click="navTo('/pages/home/village/volunteer/list', { villageId: villageStore.currentVillage?.id ?? undefined })">
|
|
|
- <Text text="乡源人数" fontConfig="contentText" fontSize="fontSize.sm" />
|
|
|
- <Text :text="villageInfoLoader.content.value?.memberCount|| '0'" fontConfig="importantTitle" />
|
|
|
+
|
|
|
+ <Height height="gap.md" />
|
|
|
+
|
|
|
+ <FlexRow backgroundColor="background.tertiary" radius="radius.md" :padding="[30, 20]">
|
|
|
+ <Touchable direction="column" center gap="gap.sm" flexBasis="25%" @click="navTo('/pages/home/village/task/index')">
|
|
|
+ <Text text="乡源光" fontConfig="secondText" fontSize="fontSize.sm" />
|
|
|
+ <Text :text="villageInfoLoader.content.value?.light || '0'" fontConfig="importantTitle" />
|
|
|
+ <Button type="text" size="mini" text="做任务" @click="navTo('/pages/home/village/task/index')" />
|
|
|
</Touchable>
|
|
|
- <WxButton openType="share">
|
|
|
- <Button type="text" size="mini" text="邀请加入" @click="navTo('/pages/home/village/task/index')" />
|
|
|
- </WxButton>
|
|
|
- </FlexCol>
|
|
|
- <Divider type="vertical" />
|
|
|
- <Touchable direction="column" center gap="gap.sm" flexBasis="25%" @click="navTo('/pages/home/village/follow/list', {
|
|
|
- villageId: villageStore.currentVillage?.id ?? undefined,
|
|
|
- })">
|
|
|
- <Text text="关注人数" fontConfig="contentText" fontSize="fontSize.sm" />
|
|
|
- <Text :text="villageInfoLoader.content.value?.followerCount|| '0'" fontConfig="importantTitle" />
|
|
|
- <Height :size="36" />
|
|
|
- </Touchable>
|
|
|
- <Divider type="vertical" />
|
|
|
- <Button
|
|
|
- :padding="0"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- textColor="text.title"
|
|
|
- rightIcon="arrow-right"
|
|
|
- @click="handleGoNew()"
|
|
|
- >
|
|
|
- <FlexCol>
|
|
|
- <Text text="新手" fontConfig="contentText" />
|
|
|
- <Text text="上路" fontConfig="contentText" />
|
|
|
+ <Divider type="vertical" />
|
|
|
+ <FlexCol center gap="gap.sm" flexBasis="25%">
|
|
|
+ <Touchable direction="column" center @click="navTo('/pages/home/village/volunteer/list', { villageId: villageStore.currentVillage?.id ?? undefined })">
|
|
|
+ <Text text="乡源人数" fontConfig="contentText" fontSize="fontSize.sm" />
|
|
|
+ <Text :text="villageInfoLoader.content.value?.memberCount|| '0'" fontConfig="importantTitle" />
|
|
|
+ </Touchable>
|
|
|
+ <WxButton openType="share">
|
|
|
+ <Button type="text" size="mini" text="邀请加入" @click="navTo('/pages/home/village/task/index')" />
|
|
|
+ </WxButton>
|
|
|
</FlexCol>
|
|
|
- </Button>
|
|
|
- </FlexRow>
|
|
|
-
|
|
|
- </template>
|
|
|
- <template v-else-if="node.type === 'Block:Rank'">
|
|
|
-
|
|
|
- <!-- 排行榜 -->
|
|
|
- <HomeTitle
|
|
|
- :title="node.props?.title"
|
|
|
- showMore
|
|
|
- @moreClicked="navTo('/pages/home/village/rank/volunteer', {
|
|
|
- villageId: villageStore.currentVillage?.id ?? undefined,
|
|
|
- })"
|
|
|
- />
|
|
|
- <Height height="gap.md" />
|
|
|
- <VillageUserRankList
|
|
|
- :list="villageUserRankListLoader.content.value ?? []"
|
|
|
- scoreSuffix="文化积分"
|
|
|
- @goDetails="navTo('/pages/home/village/volunteer/detail', { id: $event.id })"
|
|
|
- />
|
|
|
-
|
|
|
- </template>
|
|
|
- <template v-else-if="node.type === 'Block:Collect'">
|
|
|
-
|
|
|
- <!-- 魅力乡源 -->
|
|
|
- <HomeTitle
|
|
|
- :title="node.props?.title"
|
|
|
- showMore
|
|
|
- @moreClicked="handleGoCollect()"
|
|
|
- >
|
|
|
- <template #right>
|
|
|
- <FlexRow align="center" gap="gap.md">
|
|
|
- <FrameButton
|
|
|
- text="管理"
|
|
|
- size="small"
|
|
|
- primary
|
|
|
- @click="handleGoDigManage()"
|
|
|
- />
|
|
|
- <FrameButton
|
|
|
- text="共编村史"
|
|
|
- icon="https://xy.wenlvti.net/app_static/images/village/IconHistory.png"
|
|
|
- size="small"
|
|
|
- @click="handleGoCollect()"
|
|
|
- />
|
|
|
- <Width :size="15" />
|
|
|
- </FlexRow>
|
|
|
- </template>
|
|
|
- </HomeTitle>
|
|
|
- <Height height="gap.md" />
|
|
|
- <ProvideVar :vars="{
|
|
|
- GridItemIconSize: 90,
|
|
|
- GridItemBackgroundColor: 'transparent',
|
|
|
- GridItemPaddingHorizontal: 0,
|
|
|
- GridItemPaddingVertical: 8,
|
|
|
- }">
|
|
|
- <Grid :borderGrid="false" :mainAxisCount="4">
|
|
|
- <GridItem title="村社概况" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeIntrod.png" touchable @click="handleGoCollect(11, '村社概况')" />
|
|
|
- <GridItem title="自然风光" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeEnvirounment.png" touchable @click="handleGoCollect(13, '自然风光')" />
|
|
|
- <GridItem title="历史沿革" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeHistory.png" touchable @click="handleGoCollect(2, '历史沿革')" />
|
|
|
- <GridItem title="特色产业" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeIndustry.png" touchable @click="handleGoCollect(9, '特色产业' )" />
|
|
|
- <GridItem title="文艺活动" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeActivity.png" touchable @click="handleGoCollect(12, '文艺活动')" />
|
|
|
- <GridItem title="非遗展示" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeShow.png" touchable @click="handleGoCollect(10, '非遗展示')" />
|
|
|
- <GridItem title="民俗风采" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeFolkloreVibe.png" touchable @click="handleGoCollect(8, '民俗风采')" />
|
|
|
- <GridItem title="历史人物" icon="https://xy.wenlvti.net/app_static/images/village/IconGoods.png" touchable @click="handleGoCollect(7, '历史人物')" />
|
|
|
- </Grid>
|
|
|
- </ProvideVar>
|
|
|
-
|
|
|
- </template>
|
|
|
- <template v-else-if="node.type === 'Block:Games'">
|
|
|
-
|
|
|
- <!-- 活力乡源 -->
|
|
|
- <HomeTitle :title="node.props?.title" />
|
|
|
- <Height height="gap.md" />
|
|
|
- <ProvideVar :vars="{
|
|
|
- GridItemIconSize: 90,
|
|
|
- GridItemBackgroundColor: 'transparent',
|
|
|
- GridItemPaddingHorizontal: 0,
|
|
|
- GridItemPaddingVertical: 8,
|
|
|
- }">
|
|
|
- <Grid :borderGrid="false" :mainAxisCount="4">
|
|
|
- <GridItem
|
|
|
- v-for="item in node.props?.items"
|
|
|
- :key="item.title"
|
|
|
- :title="item.title"
|
|
|
- :icon="item.icon"
|
|
|
- touchable
|
|
|
- @click="() => context.getScriptEngine().execute(item.handler, node.getNodeScriptContext?.())"
|
|
|
- />
|
|
|
- </Grid>
|
|
|
- </ProvideVar>
|
|
|
-
|
|
|
- </template>
|
|
|
- <template v-else-if="node.type === 'Block:Official'">
|
|
|
+ <Divider type="vertical" />
|
|
|
+ <Touchable direction="column" center gap="gap.sm" flexBasis="25%" @click="navTo('/pages/home/village/follow/list', {
|
|
|
+ villageId: villageStore.currentVillage?.id ?? undefined,
|
|
|
+ })">
|
|
|
+ <Text text="关注人数" fontConfig="contentText" fontSize="fontSize.sm" />
|
|
|
+ <Text :text="villageInfoLoader.content.value?.followerCount|| '0'" fontConfig="importantTitle" />
|
|
|
+ <Height :size="36" />
|
|
|
+ </Touchable>
|
|
|
+ <Divider type="vertical" />
|
|
|
+ <Button
|
|
|
+ :padding="0"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ textColor="text.title"
|
|
|
+ rightIcon="arrow-right"
|
|
|
+ @click="handleGoNew()"
|
|
|
+ >
|
|
|
+ <FlexCol>
|
|
|
+ <Text text="新手" fontConfig="contentText" />
|
|
|
+ <Text text="上路" fontConfig="contentText" />
|
|
|
+ </FlexCol>
|
|
|
+ </Button>
|
|
|
+ </FlexRow>
|
|
|
|
|
|
- <!-- 文脉乡源 -->
|
|
|
- <HomeTitle :title="node.props?.title">
|
|
|
- <template #right>
|
|
|
- <FlexRow align="center" gap="gap.md">
|
|
|
- <BubbleTip
|
|
|
- v-model:show="showManageTip"
|
|
|
- position="bottom"
|
|
|
- crossPosition="right"
|
|
|
- arrowOffsetX="180rpx"
|
|
|
- content="村社贴图太乱?点这里整理"
|
|
|
- @contentClick="handleCloseManageTip(true)"
|
|
|
- @close="handleCloseManageTip(false)"
|
|
|
- >
|
|
|
+ </template>
|
|
|
+ <template v-else-if="node.type === 'Block:Rank'">
|
|
|
+
|
|
|
+ <!-- 排行榜 -->
|
|
|
+ <HomeTitle
|
|
|
+ :title="node.props?.title"
|
|
|
+ showMore
|
|
|
+ @moreClicked="navTo('/pages/home/village/rank/volunteer', {
|
|
|
+ villageId: villageStore.currentVillage?.id ?? undefined,
|
|
|
+ })"
|
|
|
+ />
|
|
|
+ <Height height="gap.md" />
|
|
|
+ <VillageUserRankList
|
|
|
+ :list="villageUserRankListLoader.content.value ?? []"
|
|
|
+ scoreSuffix="文化积分"
|
|
|
+ @goDetails="navTo('/pages/home/village/volunteer/detail', { id: $event.id })"
|
|
|
+ />
|
|
|
+
|
|
|
+ </template>
|
|
|
+ <template v-else-if="node.type === 'Block:Collect'">
|
|
|
+
|
|
|
+ <!-- 魅力乡源 -->
|
|
|
+ <HomeTitle
|
|
|
+ :title="node.props?.title"
|
|
|
+ showMore
|
|
|
+ @moreClicked="handleGoCollect()"
|
|
|
+ >
|
|
|
+ <template #right>
|
|
|
+ <FlexRow align="center" gap="gap.md">
|
|
|
<FrameButton
|
|
|
text="管理"
|
|
|
size="small"
|
|
|
primary
|
|
|
- @click="handleGoOfficalManage()"
|
|
|
+ @click="handleGoDigManage()"
|
|
|
+ />
|
|
|
+ <FrameButton
|
|
|
+ text="共编村史"
|
|
|
+ icon="https://xy.wenlvti.net/app_static/images/village/IconHistory.png"
|
|
|
+ size="small"
|
|
|
+ @click="handleGoCollect()"
|
|
|
/>
|
|
|
- </BubbleTip>
|
|
|
- <FrameButton
|
|
|
- text="乡源AI帮你写"
|
|
|
- size="small"
|
|
|
- icon="https://xy.wenlvti.net/app_static/images/village/IconLargeHistory.png"
|
|
|
- @click="handleGoPublish()"
|
|
|
+ <Width :size="15" />
|
|
|
+ </FlexRow>
|
|
|
+ </template>
|
|
|
+ </HomeTitle>
|
|
|
+ <Height height="gap.md" />
|
|
|
+ <ProvideVar :vars="{
|
|
|
+ GridItemIconSize: 90,
|
|
|
+ GridItemBackgroundColor: 'transparent',
|
|
|
+ GridItemPaddingHorizontal: 0,
|
|
|
+ GridItemPaddingVertical: 8,
|
|
|
+ }">
|
|
|
+ <Grid :borderGrid="false" :mainAxisCount="4">
|
|
|
+ <GridItem title="村社概况" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeIntrod.png" touchable @click="handleGoCollect(11, '村社概况')" />
|
|
|
+ <GridItem title="自然风光" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeEnvirounment.png" touchable @click="handleGoCollect(13, '自然风光')" />
|
|
|
+ <GridItem title="历史沿革" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeHistory.png" touchable @click="handleGoCollect(2, '历史沿革')" />
|
|
|
+ <GridItem title="特色产业" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeIndustry.png" touchable @click="handleGoCollect(9, '特色产业' )" />
|
|
|
+ <GridItem title="文艺活动" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeActivity.png" touchable @click="handleGoCollect(12, '文艺活动')" />
|
|
|
+ <GridItem title="非遗展示" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeShow.png" touchable @click="handleGoCollect(10, '非遗展示')" />
|
|
|
+ <GridItem title="民俗风采" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeFolkloreVibe.png" touchable @click="handleGoCollect(8, '民俗风采')" />
|
|
|
+ <GridItem title="历史人物" icon="https://xy.wenlvti.net/app_static/images/village/IconGoods.png" touchable @click="handleGoCollect(7, '历史人物')" />
|
|
|
+ </Grid>
|
|
|
+ </ProvideVar>
|
|
|
+
|
|
|
+ </template>
|
|
|
+ <template v-else-if="node.type === 'Block:Games'">
|
|
|
+
|
|
|
+ <!-- 活力乡源 -->
|
|
|
+ <HomeTitle :title="node.props?.title" />
|
|
|
+ <Height height="gap.md" />
|
|
|
+ <ProvideVar :vars="{
|
|
|
+ GridItemIconSize: 90,
|
|
|
+ GridItemBackgroundColor: 'transparent',
|
|
|
+ GridItemPaddingHorizontal: 0,
|
|
|
+ GridItemPaddingVertical: 8,
|
|
|
+ }">
|
|
|
+ <Grid :borderGrid="false" :mainAxisCount="4">
|
|
|
+ <GridItem
|
|
|
+ v-for="item in node.props?.items"
|
|
|
+ :key="item.title"
|
|
|
+ :title="item.title"
|
|
|
+ :icon="item.icon"
|
|
|
+ touchable
|
|
|
+ @click="() => context.getScriptEngine().execute(item.handler, node.getNodeScriptContext?.())"
|
|
|
/>
|
|
|
- </FlexRow>
|
|
|
- </template>
|
|
|
- </HomeTitle>
|
|
|
- <Height height="gap.md" />
|
|
|
- <RoundTags
|
|
|
- v-model:active="listActiveTag"
|
|
|
- :tags="node.props?.tags"
|
|
|
- />
|
|
|
- <Height height="gap.md" />
|
|
|
- <OfficialAccountPublishWrap
|
|
|
- :topic="recommendTagName"
|
|
|
- :path="recommendPath"
|
|
|
- @publishsuccess="onPublishSuccess"
|
|
|
- @empty="isOfficialEmpty=true"
|
|
|
- />
|
|
|
-
|
|
|
+ </Grid>
|
|
|
+ </ProvideVar>
|
|
|
+
|
|
|
+ </template>
|
|
|
+ <template v-else-if="node.type === 'Block:Official'">
|
|
|
+
|
|
|
+ <!-- 文脉乡源 -->
|
|
|
+ <HomeTitle :title="node.props?.title">
|
|
|
+ <template #right>
|
|
|
+ <FlexRow align="center" gap="gap.md">
|
|
|
+ <BubbleTip
|
|
|
+ v-model:show="showManageTip"
|
|
|
+ position="bottom"
|
|
|
+ crossPosition="right"
|
|
|
+ arrowOffsetX="180rpx"
|
|
|
+ content="村社贴图太乱?点这里整理"
|
|
|
+ @contentClick="handleCloseManageTip(true)"
|
|
|
+ @close="handleCloseManageTip(false)"
|
|
|
+ >
|
|
|
+ <FrameButton
|
|
|
+ text="管理"
|
|
|
+ size="small"
|
|
|
+ primary
|
|
|
+ @click="handleGoOfficalManage()"
|
|
|
+ />
|
|
|
+ </BubbleTip>
|
|
|
+ <FrameButton
|
|
|
+ text="乡源AI帮你写"
|
|
|
+ size="small"
|
|
|
+ icon="https://xy.wenlvti.net/app_static/images/village/IconLargeHistory.png"
|
|
|
+ @click="handleGoPublish()"
|
|
|
+ />
|
|
|
+ </FlexRow>
|
|
|
+ </template>
|
|
|
+ </HomeTitle>
|
|
|
+ <Height height="gap.md" />
|
|
|
+ <RoundTags
|
|
|
+ v-model:active="listActiveTag"
|
|
|
+ :tags="tagsLoader.content.value || []"
|
|
|
+ />
|
|
|
+ <Height height="gap.md" />
|
|
|
+ <OfficialAccountPublishWrap
|
|
|
+ :topic="recommendTagName"
|
|
|
+ :path="recommendPath"
|
|
|
+ @publishsuccess="onPublishSuccess"
|
|
|
+ @empty="isOfficialEmpty=true"
|
|
|
+ />
|
|
|
+
|
|
|
+ </template>
|
|
|
</template>
|
|
|
- </template>
|
|
|
- </DynamicXNodeChild>
|
|
|
- </template>
|
|
|
- </DynamicX>
|
|
|
+ </DynamicXNodeChild>
|
|
|
+ </template>
|
|
|
+ </DynamicX>
|
|
|
+ </SimplePageContentLoader>
|
|
|
|
|
|
<UpgradeDialog
|
|
|
ref="upgradeRef"
|
|
|
@@ -418,6 +421,9 @@ import { useGetNotice } from '../composeabe/GetNotice';
|
|
|
import { assertNotNull, FormatUtils, waitTimeOut } from '@imengyu/imengyu-utils';
|
|
|
import { navTo } from '@/components/utils/PageAction';
|
|
|
import { alert, confirm } from '@/components/dialog/CommonRoot';
|
|
|
+import { isDevEnv } from '@/common/config/AppCofig';
|
|
|
+import { defaultTags } from './data/DefaultTag';
|
|
|
+import DefaultCard from './data/DefaultCard.json';
|
|
|
import HomeTitle from '@/common/components/parts/HomeTitle.vue';
|
|
|
import Icon from '@/components/basic/Icon.vue';
|
|
|
import Text from '@/components/basic/Text.vue';
|
|
|
@@ -455,8 +461,7 @@ import ShareQRDialog from '../dialogs/ShareQRDialog.vue';
|
|
|
import DynamicX from '@/components/dynamic/DynamicX.vue';
|
|
|
import type { DynamicXPage } from '@/components/dynamic/DynamicX';
|
|
|
import DynamicXNodeChild from '@/components/dynamic/x/DynamicXNodeChild.vue';
|
|
|
-import Badge from '@/components/display/Badge.vue';
|
|
|
-import { isDevEnv } from '@/common/config/AppCofig';
|
|
|
+import SimplePageContentLoader from '@/components/loader/SimplePageContentLoader.vue';
|
|
|
|
|
|
const emit = defineEmits<{
|
|
|
(e: 'goTree'): void;
|
|
|
@@ -695,156 +700,19 @@ const pageScriptGlobal = reactive({
|
|
|
handleGoDigManage,
|
|
|
handleGoCollect,
|
|
|
getVillageId: () => villageStore.currentVillage?.id ?? 0,
|
|
|
+ getDefaultTags: () => defaultTags,
|
|
|
navTo,
|
|
|
emit,
|
|
|
+
|
|
|
+});
|
|
|
+const pageThemeLoader = useSimpleDataLoader(async () => {
|
|
|
+ //TODO: 加载村社主题
|
|
|
+ return DefaultCard as DynamicXPage;
|
|
|
+});
|
|
|
+const tagsLoader = useSimpleDataLoader(async () => {
|
|
|
+ //TODO: 加载村社话题
|
|
|
+ return defaultTags;
|
|
|
});
|
|
|
-const page : DynamicXPage = {
|
|
|
- name: 'VILLAGE',
|
|
|
- type: 'page',
|
|
|
- nodes: [
|
|
|
- {
|
|
|
- name: 'VILLAGE:CONTENT',
|
|
|
- type: 'flex',
|
|
|
- props: {
|
|
|
- direction: 'column',
|
|
|
- padding: [30,30,0,30],
|
|
|
- gap: "gap.lg"
|
|
|
- },
|
|
|
- nodes: [
|
|
|
- {
|
|
|
- name: 'VILLAGE:CONTENT:Basic',
|
|
|
- type: 'BackgroundBox',
|
|
|
- props: {
|
|
|
- color1: "#eecaa0",
|
|
|
- color2: "white",
|
|
|
- color2Position: "85%",
|
|
|
- color3: "white",
|
|
|
- radius: "radius.lg",
|
|
|
- direction: "column",
|
|
|
- padding: [35,30],
|
|
|
- gap: "gap.lg",
|
|
|
- },
|
|
|
- nodes: [
|
|
|
- {
|
|
|
- type: 'Card:Basic',
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'Card:Level',
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'Card:Gallery',
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'Card:AddressAndMap',
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'flex',
|
|
|
- props: {
|
|
|
- direction: 'row',
|
|
|
- justify: "center" ,
|
|
|
- align: "center",
|
|
|
- gap:"gap.md",
|
|
|
- },
|
|
|
- nodes: [
|
|
|
- {
|
|
|
- type: 'button',
|
|
|
- props: {
|
|
|
- size: "mini",
|
|
|
- icon: "picture",
|
|
|
- text: "村社相册",
|
|
|
- },
|
|
|
- events: {
|
|
|
- click: 'globalContext.handleGoGallery()',
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'button',
|
|
|
- props: {
|
|
|
- size: "mini",
|
|
|
- icon: "edit-filling",
|
|
|
- text: "编辑简介",
|
|
|
- },
|
|
|
- events: {
|
|
|
- click: 'globalContext.handleGoEdit()',
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'button',
|
|
|
- props: {
|
|
|
- size: "mini",
|
|
|
- icon: "fabulous",
|
|
|
- text: "主页换肤",
|
|
|
- },
|
|
|
- events: {
|
|
|
- click: 'globalContext.handleGoSkin()',
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'Card:Static',
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'VILLAGE:CONTENT:Rank',
|
|
|
- type: 'Block:Rank',
|
|
|
- props: {
|
|
|
- title: '排行榜',
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'VILLAGE:CONTENT:Collect',
|
|
|
- type: 'Block:Collect',
|
|
|
- props: {
|
|
|
- title: '魅力乡源',
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'VILLAGE:CONTENT:Games',
|
|
|
- type: 'Block:Games',
|
|
|
- props: {
|
|
|
- title: '活力乡源',
|
|
|
- items: [
|
|
|
- {
|
|
|
- title: '乡源荣光',
|
|
|
- icon: 'https://xy.wenlvti.net/app_static/images/village/IconLargeHornor.png',
|
|
|
- handler: 'globalContext.handleGoCollect(23, \'乡源荣光\')',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '乡源好物',
|
|
|
- icon: 'https://xy.wenlvti.net/app_static/images/village/IconLargeGoods.png',
|
|
|
- handler: 'globalContext.navTo("/pages/home/village/goods/index", { villageId: globalContext.getVillageId() })',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '乡源树',
|
|
|
- icon: 'https://xy.wenlvti.net/app_static/images/village/IconLargeTree.png',
|
|
|
- handler: 'globalContext.emit("goTree")',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '互动游戏',
|
|
|
- icon: 'https://xy.wenlvti.net/app_static/images/village/IconLargeGame.png',
|
|
|
- handler: 'globalContext.navTo("/pages/home/village/games/index")',
|
|
|
- },
|
|
|
- ]
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'VILLAGE:CONTENT:Official',
|
|
|
- type: 'Block:Official',
|
|
|
- props: {
|
|
|
- title: '文脉乡源',
|
|
|
- tags: [
|
|
|
- '广场', '美食', '美景',
|
|
|
- '故事',
|
|
|
- '老手艺', '老物件'
|
|
|
- ]
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-};
|
|
|
|
|
|
watch(() => villageStore.currentVillage, async () => {
|
|
|
await waitTimeOut(100);
|