feat(project): align store delivery pages with live APIs and geocode status
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user