|
|
@@ -156,18 +156,26 @@
|
|
|
<VillageUserRankList :list="villageUserRankListLoader.content.value ?? []" />
|
|
|
|
|
|
<!-- 魅力乡源 -->
|
|
|
- <HomeTitle title="魅力乡源" showMore>
|
|
|
+ <HomeTitle title="魅力乡源" showMore @moreClicked="handleGoCollect()">
|
|
|
<template #right>
|
|
|
- <BackgroundImageButton
|
|
|
- backgroundImage="https://xy.wenlvti.net/app_static/images/village/TagActive.png"
|
|
|
- :backgroundCutBorder="[10, 10, 10, 10]"
|
|
|
- :backgroundCutBorderSize="[10, 10, 10, 10]"
|
|
|
+ <Touchable
|
|
|
:padding="[15, 20]"
|
|
|
- :innerStyle="{ marginRight: '20rpx' }"
|
|
|
+ :innerStyle="{
|
|
|
+ marginRight: '20rpx'
|
|
|
+ }"
|
|
|
+ borderStyle="solid"
|
|
|
+ borderColor="border.secondary"
|
|
|
+ borderWidth="1px"
|
|
|
+ backgroundColor="background.quaternary"
|
|
|
+ radius="radius.md"
|
|
|
+ direction="row"
|
|
|
+ center
|
|
|
+ gap="gap.sm"
|
|
|
+ @click="handleGoCollect()"
|
|
|
>
|
|
|
<Icon name="https://xy.wenlvti.net/app_static/images/village/IconHistory.png" :size="30" />
|
|
|
- <Text text="共编村史" fontConfig="contentText" color="white" />
|
|
|
- </BackgroundImageButton>
|
|
|
+ <Text text="共编村史" fontConfig="contentText" />
|
|
|
+ </Touchable>
|
|
|
</template>
|
|
|
</HomeTitle>
|
|
|
<ProvideVar :vars="{
|
|
|
@@ -200,7 +208,7 @@
|
|
|
<GridItem title="乡源荣光" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeHornor.png" touchable />
|
|
|
<GridItem title="乡源好物" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeGoods.png" touchable />
|
|
|
<GridItem title="乡源树" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeTree.png" touchable />
|
|
|
- <GridItem title="共编村史" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeIndustry.png" touchable />
|
|
|
+ <GridItem title="政贤连心" icon="https://xy.wenlvti.net/app_static/images/village/IconGovAffairs.png" touchable />
|
|
|
<GridItem title="互动游戏" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeGame.png" touchable />
|
|
|
</Grid>
|
|
|
</ProvideVar>
|
|
|
@@ -214,8 +222,12 @@
|
|
|
:backgroundCutBorderSize="[10, 10, 10, 10]"
|
|
|
:padding="[15, 20]"
|
|
|
:innerStyle="{ marginRight: '20rpx' }"
|
|
|
+ direction="row"
|
|
|
+ center
|
|
|
+ gap="gap.sm"
|
|
|
@click="handleGoPublish()"
|
|
|
>
|
|
|
+ <Icon name="https://xy.wenlvti.net/app_static/images/village/IconLargeHistory.png" :size="30" />
|
|
|
<Text text="去发布" fontConfig="contentText" color="white" />
|
|
|
</BackgroundImageButton>
|
|
|
</template>
|
|
|
@@ -281,8 +293,10 @@ import LightVillageApi from '@/api/light/LightVillageApi';
|
|
|
import SimplePageListLoader from '@/components/loader/SimplePageListLoader.vue';
|
|
|
import Construction from '@/common/components/Construction.vue';
|
|
|
import VillageApi from '@/api/inhert/VillageApi';
|
|
|
+import { useUserTools } from '@/common/composeabe/UserTools';
|
|
|
|
|
|
const authStore = useAuthStore();
|
|
|
+const { getIsVolunteer } = useUserTools();
|
|
|
const { requireLogin } = useReqireLogin();
|
|
|
const villageStore = useVillageStore();
|
|
|
const { isFollowed, onFollow, onUnFollow } = useFollow();
|
|
|
@@ -337,19 +351,14 @@ watch(rankActiveTag, () => {
|
|
|
const meIsVolunteer = ref(false);
|
|
|
const myJoinedVillagesLoader = useSimpleDataLoader(async () => {
|
|
|
try {
|
|
|
- try {
|
|
|
- await VillageApi.getVolunteerInfo();
|
|
|
- meIsVolunteer.value = true;
|
|
|
- } catch (error) {
|
|
|
- meIsVolunteer.value = false;
|
|
|
+ meIsVolunteer.value = await getIsVolunteer();
|
|
|
+ if (!meIsVolunteer.value)
|
|
|
return [];
|
|
|
- }
|
|
|
return await VillageApi.getClaimedVallageList();
|
|
|
} catch (error) {
|
|
|
return [];
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
const isJoined = computed(() => {
|
|
|
return myJoinedVillagesLoader.content.value?.some(p => p.id === villageStore.currentVillage?.id) ?? false;
|
|
|
});
|
|
|
@@ -376,18 +385,17 @@ function handleGoJoin() {
|
|
|
function handleGoNew() {
|
|
|
navTo('/pages/home/light/help/new');
|
|
|
}
|
|
|
-function handleGoCollect(taskName: string) {
|
|
|
- navTo('/pages/dig/forms/task', {
|
|
|
+function handleGoCollect(taskName?: string) {
|
|
|
+ navTo('/pages/dig/forms/list', {
|
|
|
villageId: villageStore.currentVillage?.id ?? undefined,
|
|
|
taskName: taskName,
|
|
|
- taskPid: -1,
|
|
|
});
|
|
|
}
|
|
|
function handleGoPublish() {
|
|
|
if (!authStore.isLogged) {
|
|
|
confirm({
|
|
|
title: '提示',
|
|
|
- content: '登录后就可以发布村落贴图了',
|
|
|
+ content: '登录后就可以发布村社贴图了',
|
|
|
confirmText: '去登录',
|
|
|
}).then((res) => {
|
|
|
if (res) {
|