|
@@ -22,37 +22,35 @@
|
|
|
gap="gap.xl"
|
|
gap="gap.xl"
|
|
|
position="absolute"
|
|
position="absolute"
|
|
|
inset="0"
|
|
inset="0"
|
|
|
- padding="space.xl"
|
|
|
|
|
center
|
|
center
|
|
|
- backgroundColor="mask.default"
|
|
|
|
|
>
|
|
>
|
|
|
- <Text fontConfig="importantTitle" textAlign="center">您选择的地区还未开通亮乡源数据,可联系客服开通</Text>
|
|
|
|
|
- <button open-type="contact" class="remove-button-style">
|
|
|
|
|
- <FlexCol padding="space.md" radius="radius.lg" center backgroundColor="white">
|
|
|
|
|
- <Text fontConfig="primaryTitle">联系客服</Text>
|
|
|
|
|
- </FlexCol>
|
|
|
|
|
- </button>
|
|
|
|
|
|
|
+ <FlexCol center gap="gap.md" padding="padding.md" backgroundColor="white" radius="radius.md">
|
|
|
|
|
+ <Text fontConfig="importantTitle" textAlign="center">您选择的地区还未开通亮乡源数据,可联系客服开通</Text>
|
|
|
|
|
+ <button open-type="contact" class="remove-button-style">
|
|
|
|
|
+ <FlexCol padding="space.md" radius="radius.lg" center backgroundColor="white">
|
|
|
|
|
+ <Text fontConfig="primaryTitle">联系客服</Text>
|
|
|
|
|
+ </FlexCol>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </FlexCol>
|
|
|
</FlexCol>
|
|
</FlexCol>
|
|
|
<FlexCol v-if="mapLoader.error.value"
|
|
<FlexCol v-if="mapLoader.error.value"
|
|
|
gap="gap.md"
|
|
gap="gap.md"
|
|
|
position="absolute"
|
|
position="absolute"
|
|
|
- inset="0"
|
|
|
|
|
- padding="space.xl"
|
|
|
|
|
|
|
+ inset="0"
|
|
|
center
|
|
center
|
|
|
- backgroundColor="mask.default"
|
|
|
|
|
>
|
|
>
|
|
|
- <Icon name="warning" size="44" color="red" />
|
|
|
|
|
- <Text textAlign="center" :text="mapLoader.error.value" />
|
|
|
|
|
|
|
+ <FlexCol center gap="gap.md" padding="padding.md" backgroundColor="white" radius="radius.md">
|
|
|
|
|
+ <Icon name="warning" size="44" color="red" />
|
|
|
|
|
+ <Text textAlign="center" :text="mapLoader.error.value" />
|
|
|
|
|
+ </FlexCol>
|
|
|
</FlexCol>
|
|
</FlexCol>
|
|
|
<FlexCol v-else-if="mapLoader.status.value === 'loading'"
|
|
<FlexCol v-else-if="mapLoader.status.value === 'loading'"
|
|
|
gap="gap.md"
|
|
gap="gap.md"
|
|
|
position="absolute"
|
|
position="absolute"
|
|
|
inset="0"
|
|
inset="0"
|
|
|
- padding="space.xl"
|
|
|
|
|
- center
|
|
|
|
|
- backgroundColor="mask.default"
|
|
|
|
|
|
|
+ center
|
|
|
>
|
|
>
|
|
|
- <ActivityIndicator :size="44" />
|
|
|
|
|
|
|
+ <ActivityIndicator :size="64" />
|
|
|
</FlexCol>
|
|
</FlexCol>
|
|
|
|
|
|
|
|
<SimpleDropDownPicker
|
|
<SimpleDropDownPicker
|
|
@@ -97,7 +95,6 @@ import { navTo } from '@/components/utils/PageAction';
|
|
|
import { waitTimeOut } from '@imengyu/imengyu-utils';
|
|
import { waitTimeOut } from '@imengyu/imengyu-utils';
|
|
|
import { useSimpleDataLoader } from '@/components/composeabe/loader/SimpleDataLoader';
|
|
import { useSimpleDataLoader } from '@/components/composeabe/loader/SimpleDataLoader';
|
|
|
import LightVillageApi, { VillageListItem } from '@/api/light/LightVillageApi';
|
|
import LightVillageApi, { VillageListItem } from '@/api/light/LightVillageApi';
|
|
|
-import type { MapMarker } from '@/types/Map';
|
|
|
|
|
import AppCofig, { isDev } from '@/common/config/AppCofig';
|
|
import AppCofig, { isDev } from '@/common/config/AppCofig';
|
|
|
import SimpleDropDownPicker from '@/common/components/SimpleDropDownPicker.vue';
|
|
import SimpleDropDownPicker from '@/common/components/SimpleDropDownPicker.vue';
|
|
|
import NButton from '@/components/basic/Button.vue';
|
|
import NButton from '@/components/basic/Button.vue';
|
|
@@ -106,6 +103,7 @@ import Text from '@/components/basic/Text.vue';
|
|
|
import CommonContent from '@/api/CommonContent';
|
|
import CommonContent from '@/api/CommonContent';
|
|
|
import Icon from '@/components/basic/Icon.vue';
|
|
import Icon from '@/components/basic/Icon.vue';
|
|
|
import ActivityIndicator from '@/components/basic/ActivityIndicator.vue';
|
|
import ActivityIndicator from '@/components/basic/ActivityIndicator.vue';
|
|
|
|
|
+import type { MapMarker } from '@/types/Map';
|
|
|
|
|
|
|
|
const instance = getCurrentInstance();
|
|
const instance = getCurrentInstance();
|
|
|
const mapCtx = uni.createMapContext('prevMap', instance);
|
|
const mapCtx = uni.createMapContext('prevMap', instance);
|
|
@@ -248,8 +246,11 @@ function onSelectedRegion(regionId: number) {
|
|
|
emit('regionChanged', regionId);
|
|
emit('regionChanged', regionId);
|
|
|
}
|
|
}
|
|
|
function setCurrentRegion(regionName: string) {
|
|
function setCurrentRegion(regionName: string) {
|
|
|
- selectedRegion.value = regionLoader.content.value?.find(p => p.name == regionName)?.id ||
|
|
|
|
|
- regionLoader.content.value?.[0]?.id || undefined;
|
|
|
|
|
|
|
+ const region = regionLoader.content.value?.find(p => p.name == regionName)?.id ||
|
|
|
|
|
+ regionLoader.content.value?.[0]?.id || undefined;
|
|
|
|
|
+ if (region === selectedRegion.value)
|
|
|
|
|
+ return;
|
|
|
|
|
+ selectedRegion.value = region;
|
|
|
emit('regionChanged', selectedRegion.value);
|
|
emit('regionChanged', selectedRegion.value);
|
|
|
mapLoader.reload();
|
|
mapLoader.reload();
|
|
|
}
|
|
}
|
|
@@ -257,7 +258,6 @@ function setCurrentRegion(regionName: string) {
|
|
|
watch(() => props.city, async (newVal) => {
|
|
watch(() => props.city, async (newVal) => {
|
|
|
await regionLoader.reload();
|
|
await regionLoader.reload();
|
|
|
setCurrentRegion(newVal || '');
|
|
setCurrentRegion(newVal || '');
|
|
|
- await mapLoader.reload();
|
|
|
|
|
}, { immediate: true });
|
|
}, { immediate: true });
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
@@ -293,7 +293,6 @@ onMounted(async () => {
|
|
|
clear: false,
|
|
clear: false,
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
- await regionLoader.reload();
|
|
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|