|
@@ -1,113 +1,117 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <FlexCol>
|
|
|
|
|
- <FlexCol :padding="30">
|
|
|
|
|
- <HomeLargeTitle title="挖掘" />
|
|
|
|
|
- <ImageSwiper
|
|
|
|
|
- :images="appConfiguration?.banners.dig"
|
|
|
|
|
- width="100%"
|
|
|
|
|
- :height="400"
|
|
|
|
|
- radius="radius.md"
|
|
|
|
|
- :innerStyle="{
|
|
|
|
|
- border: '1px solid #fff',
|
|
|
|
|
- overflow: 'hidden',
|
|
|
|
|
|
|
+ <FlexCol padding="padding.md">
|
|
|
|
|
+ <HomeLargeTitle title="挖掘" />
|
|
|
|
|
+ <ImageSwiper
|
|
|
|
|
+ :images="appConfiguration?.banners.dig"
|
|
|
|
|
+ width="100%"
|
|
|
|
|
+ :height="400"
|
|
|
|
|
+ radius="radius.md"
|
|
|
|
|
+ :innerStyle="{
|
|
|
|
|
+ border: '1px solid #fff',
|
|
|
|
|
+ overflow: 'hidden',
|
|
|
|
|
+ }"
|
|
|
|
|
+ />
|
|
|
|
|
+ <HomeTitle title="我的村社" />
|
|
|
|
|
+ <RequireLogin unLoginMessage="欢迎您成为志愿者!在这之前您需要登录或者注册完善基础信息后才能投稿和查看我认领的村社哦">
|
|
|
|
|
+ <FlexCol
|
|
|
|
|
+ v-if="notVolunteerError"
|
|
|
|
|
+ gap="gap.lg"
|
|
|
|
|
+ padding="padding.md"
|
|
|
|
|
+ center
|
|
|
|
|
+ >
|
|
|
|
|
+ <Image src="https://xy.wenlvti.net/app_static/images/home/BadgeNew.png" :width="320" mode="widthFix" />
|
|
|
|
|
+ <CommonDivider />
|
|
|
|
|
+ <Text
|
|
|
|
|
+ textAlign="center"
|
|
|
|
|
+ text="认领属于你的村庄,参与建设家乡 或者先随便看看,了解更多乡村故事"
|
|
|
|
|
+ fontConfig="contentSpeicalText"
|
|
|
|
|
+ />
|
|
|
|
|
+ <FlexRow justify="space-around" gap="gap.md">
|
|
|
|
|
+ <FrameButton primary text="去认领村庄" @click="navTo('/pages/home/light/submit-map', {
|
|
|
|
|
+ city: currentCity,
|
|
|
|
|
+ })" width="220rpx" />
|
|
|
|
|
+ </FlexRow>
|
|
|
|
|
+ </FlexCol>
|
|
|
|
|
+ <SimplePageContentLoader
|
|
|
|
|
+ v-else
|
|
|
|
|
+ :loader="villageListLoader"
|
|
|
|
|
+ :showEmpty="villageListLoader.content.value?.length == 0"
|
|
|
|
|
+ :emptyView="{
|
|
|
|
|
+ text: '您点亮的村社正在审核中,审核通过后您可以查看和管理',
|
|
|
|
|
+ button: false,
|
|
|
}"
|
|
}"
|
|
|
- />
|
|
|
|
|
- <HomeTitle title="我的村社" />
|
|
|
|
|
- <RequireLogin unLoginMessage="欢迎您成为志愿者!在这之前您需要登录或者注册完善基础信息后才能投稿和查看我认领的村社哦">
|
|
|
|
|
- <FlexCol
|
|
|
|
|
- v-if="notVolunteerError"
|
|
|
|
|
- gap="gap.lg"
|
|
|
|
|
- padding="padding.md"
|
|
|
|
|
- center
|
|
|
|
|
- >
|
|
|
|
|
- <Image src="https://xy.wenlvti.net/app_static/images/home/BadgeNew.png" :width="320" mode="widthFix" />
|
|
|
|
|
- <CommonDivider />
|
|
|
|
|
- <Text
|
|
|
|
|
- textAlign="center"
|
|
|
|
|
- text="认领属于你的村庄,参与建设家乡 或者先随便看看,了解更多乡村故事"
|
|
|
|
|
- fontConfig="contentSpeicalText"
|
|
|
|
|
- />
|
|
|
|
|
- <FlexRow justify="space-around" gap="gap.md">
|
|
|
|
|
- <FrameButton primary text="去认领村庄" @click="navTo('/pages/home/light/submit-map', {
|
|
|
|
|
- city: currentCity,
|
|
|
|
|
- })" width="220rpx" />
|
|
|
|
|
|
|
+ >
|
|
|
|
|
+ <FlexCol :gap="10">
|
|
|
|
|
+ <FlexRow
|
|
|
|
|
+ v-for="item in villageListLoader.content.value"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ radius="radius.md"
|
|
|
|
|
+ :padding="20"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ justify="space-between"
|
|
|
|
|
+ :innerStyle="{
|
|
|
|
|
+ border: '1px solid #fff',
|
|
|
|
|
+ }"
|
|
|
|
|
+ >
|
|
|
|
|
+ <FlexRow align="center" :gap="20">
|
|
|
|
|
+ <Image
|
|
|
|
|
+ mode="aspectFill"
|
|
|
|
|
+ :src="item.image"
|
|
|
|
|
+ round
|
|
|
|
|
+ :width="80"
|
|
|
|
|
+ :height="80"
|
|
|
|
|
+ />
|
|
|
|
|
+ <H3>{{ item.villageName }}</H3>
|
|
|
|
|
+ </FlexRow>
|
|
|
|
|
+ <ButtonGroup direction="row" align="center" :gap="0">
|
|
|
|
|
+ <BubbleBox :items="[
|
|
|
|
|
+ {
|
|
|
|
|
+ icon: 'edit-filling',
|
|
|
|
|
+ text: '管理',
|
|
|
|
|
+ onClick: () => goManagePage(item),
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ icon: 'edit-filling',
|
|
|
|
|
+ text: '采编',
|
|
|
|
|
+ onClick: () => goSubmitDigPage(item),
|
|
|
|
|
+ },
|
|
|
|
|
+ ]">
|
|
|
|
|
+ <Button v-if="authStore.isAdmin" icon="edit-filling" size="small">采编/管理</Button>
|
|
|
|
|
+ </BubbleBox>
|
|
|
|
|
+ <Button v-if="!authStore.isAdmin" icon="edit-filling" size="small" @click="goSubmitDigPage(item)">采编</Button>
|
|
|
|
|
+ <Button type="primary" size="small" icon="edit-filling" @click="goMyDigPage(item)">我的投稿</Button>
|
|
|
|
|
+ </ButtonGroup>
|
|
|
</FlexRow>
|
|
</FlexRow>
|
|
|
</FlexCol>
|
|
</FlexCol>
|
|
|
- <SimplePageContentLoader
|
|
|
|
|
- v-else
|
|
|
|
|
- :loader="villageListLoader"
|
|
|
|
|
- :showEmpty="villageListLoader.content.value?.length == 0"
|
|
|
|
|
- :emptyView="{
|
|
|
|
|
- text: '您点亮的村社正在审核中,审核通过后您可以查看和管理',
|
|
|
|
|
- button: false,
|
|
|
|
|
- }"
|
|
|
|
|
- >
|
|
|
|
|
- <FlexCol :gap="10">
|
|
|
|
|
- <FlexRow
|
|
|
|
|
- v-for="item in villageListLoader.content.value"
|
|
|
|
|
- :key="item.id"
|
|
|
|
|
- radius="radius.md"
|
|
|
|
|
- :padding="20"
|
|
|
|
|
- align="center"
|
|
|
|
|
- justify="space-between"
|
|
|
|
|
- :innerStyle="{
|
|
|
|
|
- border: '1px solid #fff',
|
|
|
|
|
- }"
|
|
|
|
|
- >
|
|
|
|
|
- <FlexRow align="center" :gap="20">
|
|
|
|
|
- <Image
|
|
|
|
|
- mode="aspectFill"
|
|
|
|
|
- :src="item.image"
|
|
|
|
|
- round
|
|
|
|
|
- :width="80"
|
|
|
|
|
- :height="80"
|
|
|
|
|
- />
|
|
|
|
|
- <H3>{{ item.villageName }}</H3>
|
|
|
|
|
- </FlexRow>
|
|
|
|
|
- <ButtonGroup direction="row" align="center" :gap="0">
|
|
|
|
|
- <BubbleBox :items="[
|
|
|
|
|
- {
|
|
|
|
|
- icon: 'edit-filling',
|
|
|
|
|
- text: '管理',
|
|
|
|
|
- onClick: () => goManagePage(item),
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- icon: 'edit-filling',
|
|
|
|
|
- text: '采编',
|
|
|
|
|
- onClick: () => goSubmitDigPage(item),
|
|
|
|
|
- },
|
|
|
|
|
- ]">
|
|
|
|
|
- <Button v-if="authStore.isAdmin" icon="edit-filling" size="small">采编/管理</Button>
|
|
|
|
|
- </BubbleBox>
|
|
|
|
|
- <Button v-if="!authStore.isAdmin" icon="edit-filling" size="small" @click="goSubmitDigPage(item)">采编</Button>
|
|
|
|
|
- <Button type="primary" size="small" icon="edit-filling" @click="goMyDigPage(item)">我的投稿</Button>
|
|
|
|
|
- </ButtonGroup>
|
|
|
|
|
- </FlexRow>
|
|
|
|
|
- </FlexCol>
|
|
|
|
|
- </SimplePageContentLoader>
|
|
|
|
|
- </RequireLogin>
|
|
|
|
|
|
|
+ </SimplePageContentLoader>
|
|
|
|
|
+ </RequireLogin>
|
|
|
|
|
|
|
|
- <Height :height="20" />
|
|
|
|
|
- <HomeTitle v-if="authStore.isLogged" title="我的贡献" />
|
|
|
|
|
- <BoxMid
|
|
|
|
|
- v-if="authStore.isLogged"
|
|
|
|
|
- :padding="[40,20]"
|
|
|
|
|
- direction="row"
|
|
|
|
|
- >
|
|
|
|
|
- <FlexCol :flex="1" :gap="10" center>
|
|
|
|
|
- <Text fontConfig="lightGoldTitle">{{ volunteerInfoLoader.content.value?.points || 0 }}</Text>
|
|
|
|
|
- <Touchable direction="row" align="center" :gap="10" @click="navTo('/pages/dig/about/point')">
|
|
|
|
|
- <Text>文化积分</Text>
|
|
|
|
|
- <Icon icon="help-filling" color="primary" :size="40" />
|
|
|
|
|
- </Touchable>
|
|
|
|
|
- </FlexCol>
|
|
|
|
|
- <FlexCol :flex="1" :gap="10" center>
|
|
|
|
|
- <Text fontConfig="lightGoldTitle">Lv.{{ volunteerInfoLoader.content.value?.level || 1 }}</Text>
|
|
|
|
|
- <Text>等级</Text>
|
|
|
|
|
- </FlexCol>
|
|
|
|
|
- </BoxMid>
|
|
|
|
|
- </FlexCol>
|
|
|
|
|
|
|
+ <Height :height="20" />
|
|
|
|
|
+ <HomeTitle v-if="authStore.isLogged" title="我的贡献" />
|
|
|
|
|
+ <BoxMid
|
|
|
|
|
+ v-if="authStore.isLogged"
|
|
|
|
|
+ :padding="[40,20]"
|
|
|
|
|
+ direction="row"
|
|
|
|
|
+ >
|
|
|
|
|
+ <FlexCol :flex="1" :gap="10" center>
|
|
|
|
|
+ <Text fontConfig="lightGoldTitle">{{ volunteerInfoLoader.content.value?.points || 0 }}</Text>
|
|
|
|
|
+ <Touchable direction="row" align="center" :gap="10" @click="navTo('/pages/dig/about/point')">
|
|
|
|
|
+ <Text>文化积分</Text>
|
|
|
|
|
+ <Icon icon="help-filling" color="primary" :size="40" />
|
|
|
|
|
+ </Touchable>
|
|
|
|
|
+ </FlexCol>
|
|
|
|
|
+ <FlexCol :flex="1" :gap="10" center>
|
|
|
|
|
+ <Text fontConfig="lightGoldTitle">Lv.{{ volunteerInfoLoader.content.value?.level || 1 }}</Text>
|
|
|
|
|
+ <Text>等级</Text>
|
|
|
|
|
+ </FlexCol>
|
|
|
|
|
+ </BoxMid>
|
|
|
|
|
+ <Height :height="300" />
|
|
|
</FlexCol>
|
|
</FlexCol>
|
|
|
|
|
+ <ClamVolunteerDialog
|
|
|
|
|
+ ref="clamVolunteerDialog"
|
|
|
|
|
+ :villageId="clamVolunteerVillageId"
|
|
|
|
|
+ @finish="clamFinish"
|
|
|
|
|
+ />
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
@@ -118,6 +122,7 @@ import { useCollectStore } from '@/store/collect';
|
|
|
import { useSimpleDataLoader } from '@/components/composeabe/loader/SimpleDataLoader';
|
|
import { useSimpleDataLoader } from '@/components/composeabe/loader/SimpleDataLoader';
|
|
|
import { useStorageVar } from '@/components/composeabe/StorageVar';
|
|
import { useStorageVar } from '@/components/composeabe/StorageVar';
|
|
|
import { injectAppConfiguration } from '@/api/system/useAppConfiguration';
|
|
import { injectAppConfiguration } from '@/api/system/useAppConfiguration';
|
|
|
|
|
+import { confirm } from '@/components/dialog/CommonRoot';
|
|
|
import VillageApi, { VillageListItem } from '@/api/inhert/VillageApi';
|
|
import VillageApi, { VillageListItem } from '@/api/inhert/VillageApi';
|
|
|
import RequireLogin from '@/common/components/RequireLogin.vue';
|
|
import RequireLogin from '@/common/components/RequireLogin.vue';
|
|
|
import SimplePageContentLoader from '@/components/loader/SimplePageContentLoader.vue';
|
|
import SimplePageContentLoader from '@/components/loader/SimplePageContentLoader.vue';
|
|
@@ -137,9 +142,9 @@ import FrameButton from '@/common/components/FrameButton.vue';
|
|
|
import CommonDivider from '@/common/components/CommonDivider.vue';
|
|
import CommonDivider from '@/common/components/CommonDivider.vue';
|
|
|
import Touchable from '@/components/feedback/Touchable.vue';
|
|
import Touchable from '@/components/feedback/Touchable.vue';
|
|
|
import Icon from '@/components/basic/Icon.vue';
|
|
import Icon from '@/components/basic/Icon.vue';
|
|
|
-import BackgroundBox from '@/components/display/block/BackgroundBox.vue';
|
|
|
|
|
import ImageSwiper from '@/common/components/parts/ImageSwiper.vue';
|
|
import ImageSwiper from '@/common/components/parts/ImageSwiper.vue';
|
|
|
import BoxMid from '@/common/components/box/BoxMid.vue';
|
|
import BoxMid from '@/common/components/box/BoxMid.vue';
|
|
|
|
|
+import ClamVolunteerDialog from './village/dialogs/ClamVolunteerDialog.vue';
|
|
|
|
|
|
|
|
const authStore = useAuthStore();
|
|
const authStore = useAuthStore();
|
|
|
const collectStore = useCollectStore();
|
|
const collectStore = useCollectStore();
|
|
@@ -172,7 +177,36 @@ watch(() => authStore.isLogged, (newVal) => {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+const clamVolunteerDialog = ref<InstanceType<typeof ClamVolunteerDialog>>();
|
|
|
|
|
+const clamVolunteerVillageId = ref<number>(0);
|
|
|
|
|
+
|
|
|
|
|
+function checkIsVolunteer(item: VillageListItem) {
|
|
|
|
|
+ if (!item.collectFlag) {
|
|
|
|
|
+ confirm({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '您还不是本村志愿者,申请成为志愿者后即可开始采编挖掘',
|
|
|
|
|
+ confirmText: '去申请',
|
|
|
|
|
+ cancelText: '取消',
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res) {
|
|
|
|
|
+ clamVolunteerVillageId.value = item.villageId;
|
|
|
|
|
+ clamVolunteerDialog.value?.show();
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ return true;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function clamFinish() {
|
|
|
|
|
+ volunteerInfoLoader.reload();
|
|
|
|
|
+ rankListLoader.reload();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function goSubmitDigPage(item: VillageListItem) {
|
|
function goSubmitDigPage(item: VillageListItem) {
|
|
|
|
|
+ if (!checkIsVolunteer(item))
|
|
|
|
|
+ return;
|
|
|
|
|
+
|
|
|
navTo('./dig/details', {
|
|
navTo('./dig/details', {
|
|
|
name: item.villageName,
|
|
name: item.villageName,
|
|
|
villageId: item.villageId,
|
|
villageId: item.villageId,
|