# getCityInfo ^5.0.0

根据百度地图得到的城市名称获取城市的信息,比如该城市对应的气象局对应的ID

# 请求参数

Prop Type Required Default Description
param Object Y {}
属性:
cityName:{
Type: String,
Default: N/A,
Description: 城市名称
}
请求参数

# 接口调用示例


this.$bridge
    .getCityInfo(param)
    .then(res => {    
      this.$alert(res)
    })
    .catch(err => {
      this.$toast(err)
    })
1
2
3
4
5
6
7
8
9

# 返回参数

  • 成功时返回
Prop Type Default Description
status Number 0/1 0 成功
chName String N/A 城市名
enName String N/A 城市名(英文)
cityNo String N/A 城市对应气象局的ID
countryName String N/A 国家名
provinceName String N/A 省名
  • 失败时返回
Prop Type Default Description
errorCode Number N/A -1 请求失败
errorMessage String N/A 错误消息(如有)
Last Updated: 10/27/2020, 4:35:43 PM