fix: 配送地图地理编码改为后端接口
This commit is contained in:
@@ -27,6 +27,7 @@ export interface PolygonZoneDto {
|
||||
id: string;
|
||||
minOrderAmount: number;
|
||||
name: string;
|
||||
polygonGeoJson: string;
|
||||
priority: number;
|
||||
}
|
||||
|
||||
@@ -46,6 +47,10 @@ export interface DeliveryGeneralSettingsDto {
|
||||
export interface StoreDeliverySettingsDto {
|
||||
generalSettings: DeliveryGeneralSettingsDto;
|
||||
mode: DeliveryMode;
|
||||
/** 半径配送中心点纬度 */
|
||||
radiusCenterLatitude: null | number;
|
||||
/** 半径配送中心点经度 */
|
||||
radiusCenterLongitude: null | number;
|
||||
polygonZones: PolygonZoneDto[];
|
||||
radiusTiers: RadiusTierDto[];
|
||||
storeId: string;
|
||||
@@ -60,6 +65,13 @@ export interface CopyStoreDeliverySettingsParams {
|
||||
targetStoreIds: string[];
|
||||
}
|
||||
|
||||
/** 地址地理编码结果 */
|
||||
export interface StoreDeliveryGeocodeDto {
|
||||
address: string;
|
||||
latitude: null | number;
|
||||
longitude: null | number;
|
||||
}
|
||||
|
||||
/** 获取门店配送设置 */
|
||||
export async function getStoreDeliverySettingsApi(storeId: string) {
|
||||
return requestClient.get<StoreDeliverySettingsDto>('/store/delivery', {
|
||||
@@ -80,3 +92,10 @@ export async function copyStoreDeliverySettingsApi(
|
||||
) {
|
||||
return requestClient.post('/store/delivery/copy', data);
|
||||
}
|
||||
|
||||
/** 地址地理编码(后端签名代理) */
|
||||
export async function geocodeStoreDeliveryAddressApi(address: string) {
|
||||
return requestClient.get<StoreDeliveryGeocodeDto>('/store/delivery/geocode', {
|
||||
params: { address },
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user