文档
测试

查询城市天气信息

GET
/user/v1/getCityInfo

接口描述

查询用户保存城市信息

响应参数

参数名
类型
描述
必填
code
int
返回结果码 1000-成功 非1000-未成功
必填
data
object
返回结果对象
必填
attentionCities
array
特别关注的城市对象列表
必填
cities
array
数据列表
必填
adCode
string
区域代码
必填
cityId
string
城市id
必填
cityZh
string
城市名称
必填
countryZh
string
国家名称
必填
lat
string
纬度
必填
leaderZh
string
上级城市名称
必填
lng
string
经度
必填
provinceZh
string
省份名称
必填
temMax
string
当日最高气温
必填
temMin
string
当日最低气温
必填
type
int
类型 1-定位城市 2-保存城市 3-特别关注城市
必填
wea
string
当前天气情况
必填
weaImg
string
当前天气图标
必填
positionCities
array
定位城市对象列表(对象属性如上)
必填
adCode
string
示例:310110
必填
cityId
string
示例:101021700
必填
cityZh
string
示例:杨浦
必填
countryZh
string
示例:中国
必填
id
int
示例:1676
必填
lat
string
示例:31.270755
必填
leaderZh
string
示例:上海市
必填
lng
string
示例:121.522797
必填
provinceZh
string
示例:上海市
必填
temMax
string
示例:34
必填
temMin
string
示例:27
必填
type
int
示例:1
必填
wea
string
示例:阴
必填
weaImg
string
示例:brokenclouds
必填
cityIds
array
城市id列表
必填
marsFlag
boolean
是否有火星城市
必填
marsWeather
object
火星城市当天天气对象
必填
adCode
string
区域id
必填
cityId
string
城市id
必填
cityZh
string
城市名称
必填
countryZh
string
国家名称
必填
date
string
日期
必填
leaderZh
string
上级城市
必填
pressure
string
大气压
必填
provinceZh
string
省份名称
必填
solar
int
太阳日
必填
sunRise
string
日出时间
必填
sunSet
string
日落时间
必填
temMax
string
最高气温
必填
temMin
string
最低气温
必填
temAvg
string
火星表面平均温度
必填
earthDay
string
地球每天时长
必填
marsDay
string
火星每天时长
必填
marsWeekWeather
array
火星城市7天天气对象 (对象属性如上)
必填
adCode
string
示例:M0001
必填
cityId
string
示例:M0001
必填
cityZh
string
示例:盖尔环形山(火星)
必填
countryZh
string
示例:火星
必填
date
string
示例:2021-07-20
必填
leaderZh
string
示例:火星
必填
pressure
string
示例:859
必填
provinceZh
string
示例:火星
必填
solar
int
示例:3183
必填
sunRise
string
示例:05:59
必填
sunSet
string
示例:17:42
必填
temMax
string
示例:-79
必填
temMin
string
最低温度
必填
temAvg
string
火星表面平均温度
必填
earthDay
string
地球每天时长
必填
marsDay
string
火星每天时长
必填
message
string
返回结果信息
必填

说明 / 示例

{ "code": 1000, "data": { "attentionCities": [], "cities": [ { "adCode": "440100", "cityId": "101280101", "cityZh": "广州", "countryZh": "中国", "id": 1674, "lat": "23.125178", "leaderZh": "广州市", "lng": "113.280637", "provinceZh": "广东省", "temMax": "33", "temMin": "25", "type": 2, "wea": "中雨", "weaImg": "rainy" }, { "adCode": "440100", "cityId": "101280101", "cityZh": "广州", "countryZh": "中国", "id": 1675, "lat": "23.125178", "leaderZh": "广州市", "lng": "113.280637", "provinceZh": "广东省", "temMax": "33", "temMin": "25", "type": 2, "wea": "中雨", "weaImg": "rainy" }, { "adCode": "532901", "cityId": "101290230", "cityZh": "大理市", "countryZh": "中国", "id": 2409, "lat": "25.589449", "leaderZh": "大理白族自治州", "lng": "100.225668", "provinceZh": "云南省", "temMax": "24", "temMin": "16", "type": 2, "wea": "中雨", "weaImg": "rainy" }, { "adCode": "540100", "cityId": "101140101", "cityZh": "拉萨", "countryZh": "中国", "id": 2410, "lat": "29.660361", "leaderZh": "拉萨市", "lng": "91.132212", "provinceZh": "西藏自治区", "temMax": "22", "temMin": "10", "type": 2, "wea": "多云", "weaImg": "fewclouds_day" }, { "adCode": "110100", "cityId": "101010100", "cityZh": "北京", "countryZh": "中国", "id": 2411, "lat": "39.904989", "leaderZh": "北京市", "lng": "116.405285", "provinceZh": "北京市", "temMax": "28", "temMin": "22", "type": 2, "wea": "多云", "weaImg": "fewclouds_day" }, { "adCode": "411681", "cityId": "101181407", "cityZh": "项城", "countryZh": "中国", "id": 2412, "lat": "33.443085", "leaderZh": "周口市", "lng": "114.899521", "provinceZh": "河南省", "temMax": "32", "temMin": "25", "type": 2, "wea": "多云", "weaImg": "fewclouds_day" } ], "cityIds": [ "101280101", "101280101", "101290230", "101140101", "101010100", "101181407", "M0001" ], "marsFlag": true, "marsWeather": { "adCode": "M0001", "cityId": "M0001", "cityZh": "盖尔环形山(火星)", "countryZh": "火星", "date": "2021-07-20", "leaderZh": "火星", "pressure": "859", "provinceZh": "火星", "solar": 3183, "sunRise": "05:59", "sunSet": "17:42", "temMax": "-79" }, "marsWeekWeather": [ { "adCode": "M0001", "cityId": "M0001", "cityZh": "盖尔环形山(火星)", "countryZh": "火星", "date": "2021-07-20", "leaderZh": "火星", "pressure": "859", "provinceZh": "火星", "solar": 3183, "sunRise": "05:59", "sunSet": "17:42", "temMax": "-79" }, { "adCode": "M0001", "cityId": "M0001", "cityZh": "盖尔环形山(火星)", "countryZh": "火星", "date": "2021-07-19", "leaderZh": "火星", "pressure": "859", "provinceZh": "火星", "solar": 3182, "sunRise": "05:59", "sunSet": "17:42", "temMax": "-80" }, { "adCode": "M0001", "cityId": "M0001", "cityZh": "盖尔环形山(火星)", "countryZh": "火星", "date": "2021-07-18", "leaderZh": "火星", "pressure": "859", "provinceZh": "火星", "solar": 3181, "sunRise": "05:59", "sunSet": "17:42", "temMax": "-80" }, { "adCode": "M0001", "cityId": "M0001", "cityZh": "盖尔环形山(火星)", "countryZh": "火星", "date": "2021-07-17", "leaderZh": "火星", "pressure": "860", "provinceZh": "火星", "solar": 3180, "sunRise": "06:00", "sunSet": "17:43", "temMax": "-78" }, { "adCode": "M0001", "cityId": "M0001", "cityZh": "盖尔环形山(火星)", "countryZh": "火星", "date": "2021-07-16", "leaderZh": "火星", "pressure": "860", "provinceZh": "火星", "solar": 3179, "sunRise": "06:00", "sunSet": "17:43", "temMax": "-79" }, { "adCode": "M0001", "cityId": "M0001", "cityZh": "盖尔环形山(火星)", "countryZh": "火星", "date": "2021-07-15", "leaderZh": "火星", "pressure": "862", "provinceZh": "火星", "solar": 3178, "sunRise": "06:00", "sunSet": "17:43", "temMax": "-80" }, { "adCode": "M0001", "cityId": "M0001", "cityZh": "盖尔环形山(火星)", "countryZh": "火星", "date": "2021-07-14", "leaderZh": "火星", "pressure": "861", "provinceZh": "火星", "solar": 3177, "sunRise": "06:00", "sunSet": "17:44", "temMax": "-79" } ], "positionCities": [ { "adCode": "310110", "cityId": "101021700", "cityZh": "杨浦", "countryZh": "中国", "id": 1676, "lat": "31.270755", "leaderZh": "上海市", "lng": "121.522797", "provinceZh": "上海市", "temMax": "34", "temMin": "27", "type": 1, "wea": "阴", "weaImg": "brokenclouds" } ] }, "message": "" }