Files
boluo-app-main/src/types/location.ts
2025-11-03 22:18:39 +08:00

36 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

export interface Coordinate {
latitude: number; // 纬度,浮点数,范围为-90~90负数表示南纬
longitude: number; // 经度,范围为-180~180负数表示西经
}
// 地区代码参考https://github.com/youzan/vant/blob/main/packages/vant-area-data/src/index.ts
export interface LocationInfo extends Coordinate {
id?: string; // 城市id,数据id 后端用来关联数据,没有业务意义
provinceCode: string; // provinceCode ,省代码, 比如广东省=440000
provinceDesc?: string; // 省中文描述,比如广东省
cityCode: string; // 城市代码,比如广州市=440100
cityDesc?: string; // 城市中文描述,比如广州市
countyCode?: string; // 区代码,比如白云区=440111
countyDes?: string; // 区描述,比如白云区
address?: string; // 详细地址,比如广东省广州市白云区 xxx 路 xxx 号
}
// 请求接口
export interface GetCityCodeRequest {
latitude: number; // 纬度,浮点数,范围为-90~90负数表示南纬
longitude: number; // 经度,范围为-180~180负数表示西经
}
export interface CityConfigListItem {
id: number;
staffId: number;
staffName: string;
cityName: string;
cityCode: string;
groupLink: string;
created: string;
updated: string;
price: number | null;
sendCount: number | null;
}