|
@@ -102,7 +102,7 @@
|
|
|
<Button
|
|
<Button
|
|
|
icon="https://xy.wenlvti.net/app_static/images/home/IconLight.png"
|
|
icon="https://xy.wenlvti.net/app_static/images/home/IconLight.png"
|
|
|
radius="radius.lg" :padding="[10, 30]"
|
|
radius="radius.lg" :padding="[10, 30]"
|
|
|
- @click="requireLogin(async () => navTo('/pages/home/light/submit-map', { city: currentCity }), '登录后才能点亮村社哦!')"
|
|
|
|
|
|
|
+ @click="handleLightVillage"
|
|
|
>
|
|
>
|
|
|
点亮村社
|
|
点亮村社
|
|
|
</Button>
|
|
</Button>
|
|
@@ -170,6 +170,8 @@
|
|
|
>
|
|
>
|
|
|
<VillageMyFollow @goDetails="goDetails" />
|
|
<VillageMyFollow @goDetails="goDetails" />
|
|
|
</Popup>
|
|
</Popup>
|
|
|
|
|
+
|
|
|
|
|
+ <IntroClamTip ref="introClamTipRef" @apply="handleLightVillage" />
|
|
|
</FlexCol>
|
|
</FlexCol>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -180,6 +182,10 @@ import { useSimpleDataLoader } from '@/components/composeabe/loader/SimpleDataLo
|
|
|
import { useStorageVar } from '@/components/composeabe/StorageVar';
|
|
import { useStorageVar } from '@/components/composeabe/StorageVar';
|
|
|
import { useVillageStore } from '@/store/village';
|
|
import { useVillageStore } from '@/store/village';
|
|
|
import { useGetCurrentLocation } from './composeabe/GetCurrentLocation';
|
|
import { useGetCurrentLocation } from './composeabe/GetCurrentLocation';
|
|
|
|
|
+import { useAuthStore } from '@/store/auth';
|
|
|
|
|
+import { useReqireLogin } from '@/common/composeabe/RequireLogin';
|
|
|
|
|
+import { useOfficialAccount } from './composeabe/OfficialAccount';
|
|
|
|
|
+import { useUserTools } from '@/common/composeabe/UserTools';
|
|
|
import { ArrayUtils, waitTimeOut } from '@imengyu/imengyu-utils';
|
|
import { ArrayUtils, waitTimeOut } from '@imengyu/imengyu-utils';
|
|
|
import { toast } from '@/components/utils/DialogAction';
|
|
import { toast } from '@/components/utils/DialogAction';
|
|
|
import { navTo } from '@/components/utils/PageAction';
|
|
import { navTo } from '@/components/utils/PageAction';
|
|
@@ -199,19 +205,12 @@ import MapApi from '@/api/map/MapApi';
|
|
|
import LightMap from './components/LightMap.vue';
|
|
import LightMap from './components/LightMap.vue';
|
|
|
import NoticeBar from '@/components/display/NoticeBar.vue';
|
|
import NoticeBar from '@/components/display/NoticeBar.vue';
|
|
|
import StatusBarSpace from '@/components/layout/space/StatusBarSpace.vue';
|
|
import StatusBarSpace from '@/components/layout/space/StatusBarSpace.vue';
|
|
|
-import FollowVillageApi from '@/api/light/FollowVillageApi';
|
|
|
|
|
import LightVillageApi, { VillageListItem } from '@/api/light/LightVillageApi';
|
|
import LightVillageApi, { VillageListItem } from '@/api/light/LightVillageApi';
|
|
|
import type { CityItem } from '@/api/map/MapApi';
|
|
import type { CityItem } from '@/api/map/MapApi';
|
|
|
-import SimplePageListLoader from '@/components/loader/SimplePageListLoader.vue';
|
|
|
|
|
-import { useAuthStore } from '@/store/auth';
|
|
|
|
|
-import { useReqireLogin } from '@/common/composeabe/RequireLogin';
|
|
|
|
|
-import Avatar from '@/components/display/Avatar.vue';
|
|
|
|
|
-import Text from '@/components/basic/Text.vue';
|
|
|
|
|
-import BackgroundBox from '@/components/display/block/BackgroundBox.vue';
|
|
|
|
|
-import Construction from '@/common/components/Construction.vue';
|
|
|
|
|
import Width from '@/components/layout/space/Width.vue';
|
|
import Width from '@/components/layout/space/Width.vue';
|
|
|
-import { useOfficialAccount } from './composeabe/OfficialAccount';
|
|
|
|
|
import OfficialAccountPublishWrap from '@/common/components/OfficialAccountPublishWrap.vue';
|
|
import OfficialAccountPublishWrap from '@/common/components/OfficialAccountPublishWrap.vue';
|
|
|
|
|
+import IntroClamTip from './village/dialogs/IntroClamTip.vue';
|
|
|
|
|
+import MemoryTimeOut from '@/components/composeabe/MemoryTimeOut';
|
|
|
|
|
|
|
|
const emit = defineEmits(['goVillage']);
|
|
const emit = defineEmits(['goVillage']);
|
|
|
const { onPublishSuccess } = useOfficialAccount();
|
|
const { onPublishSuccess } = useOfficialAccount();
|
|
@@ -219,10 +218,12 @@ const authStore = useAuthStore();
|
|
|
const villageStore = useVillageStore();
|
|
const villageStore = useVillageStore();
|
|
|
const themeContext = useTheme();
|
|
const themeContext = useTheme();
|
|
|
const { requireLogin } = useReqireLogin();
|
|
const { requireLogin } = useReqireLogin();
|
|
|
|
|
+const { getIsVolunteer } = useUserTools();
|
|
|
const searchKeywords = ref('');
|
|
const searchKeywords = ref('');
|
|
|
const showCityPopup = ref(false);
|
|
const showCityPopup = ref(false);
|
|
|
const showMyFollowPopup = ref(false);
|
|
const showMyFollowPopup = ref(false);
|
|
|
-
|
|
|
|
|
|
|
+const introClamTipRef = ref();
|
|
|
|
|
+const introClamTipTimeout = new MemoryTimeOut('IntroClamTip', 1000 * 3600 * 30);//30h
|
|
|
|
|
|
|
|
const currentRegion = ref<number | null>(null);
|
|
const currentRegion = ref<number | null>(null);
|
|
|
const { value: currentCity } = useStorageVar('currentCityName', '');
|
|
const { value: currentCity } = useStorageVar('currentCityName', '');
|
|
@@ -324,8 +325,22 @@ function handleGoAI() {
|
|
|
navTo('/pages/chat/index');
|
|
navTo('/pages/chat/index');
|
|
|
}, '暂时需要登录后才能使用AI助手');
|
|
}, '暂时需要登录后才能使用AI助手');
|
|
|
}
|
|
}
|
|
|
|
|
+async function handleLightVillage() {
|
|
|
|
|
+ requireLogin(async () => navTo('/pages/home/light/submit-map', { city: currentCity }), '登录后才能点亮村社哦!');
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
async function loadInfo() {
|
|
async function loadInfo() {
|
|
|
|
|
+
|
|
|
|
|
+ //如果不是志愿者,则显示认领村庄提示
|
|
|
|
|
+ const isVolunteer = await getIsVolunteer();
|
|
|
|
|
+ if (!isVolunteer) {
|
|
|
|
|
+ if (introClamTipTimeout.isTimeout()) {
|
|
|
|
|
+ introClamTipRef.value?.show();
|
|
|
|
|
+ introClamTipTimeout.recordTime();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //加载我的关注村庄
|
|
|
await villageStore.loadMyFollowVillages();
|
|
await villageStore.loadMyFollowVillages();
|
|
|
if (villageStore.myFollowVillages.length > 0) {
|
|
if (villageStore.myFollowVillages.length > 0) {
|
|
|
const currentVillage = villageStore.loadCurrentVillage();
|
|
const currentVillage = villageStore.loadCurrentVillage();
|
|
@@ -339,6 +354,7 @@ async function loadInfo() {
|
|
|
|
|
|
|
|
watch(() => authStore.isLogged, async (newVal) => {
|
|
watch(() => authStore.isLogged, async (newVal) => {
|
|
|
if (newVal) {
|
|
if (newVal) {
|
|
|
|
|
+ introClamTipTimeout.reset();
|
|
|
await loadInfo();
|
|
await loadInfo();
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|