feat: first commit
This commit is contained in:
22
src/types/location.ts
Normal file
22
src/types/location.ts
Normal file
@ -0,0 +1,22 @@
|
||||
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,负数表示西经
|
||||
}
|
||||
Reference in New Issue
Block a user