feat(project): align store delivery pages with live APIs and geocode status

This commit is contained in:
2026-02-19 17:15:19 +08:00
parent 435626ca55
commit 3b96b3f92d
62 changed files with 6813 additions and 250 deletions

View File

@@ -8,6 +8,8 @@ import type { PolygonZoneDto } from '#/api/store-delivery';
import { Button, Card, Empty, Popconfirm } from 'ant-design-vue';
import { countPolygonsInGeoJson } from '../composables/delivery-page/geojson';
interface Props {
formatCurrency: (value: number) => string;
isSaving: boolean;
@@ -21,6 +23,10 @@ const emit = defineEmits<{
(event: 'delete', zoneId: string): void;
(event: 'edit', zone: PolygonZoneDto): void;
}>();
function getPolygonCount(geoJson: string) {
return countPolygonsInGeoJson(geoJson);
}
</script>
<template>
@@ -54,6 +60,9 @@ const emit = defineEmits<{
:style="{ background: zone.color }"
></span>
{{ zone.name }}
<span class="zone-shape-count">
{{ getPolygonCount(zone.polygonGeoJson) }}
</span>
</td>
<td>{{ props.formatCurrency(zone.deliveryFee) }}</td>
<td>{{ props.formatCurrency(zone.minOrderAmount) }}</td>