getCityInfo ^5.0.0
根据百度地图得到的城市名称获取城市的信息,比如该城市对应的气象局对应的ID
#请求参数
| Prop |
Type |
Required |
Default |
Description |
param |
Object |
Y |
{} 属性: cityName: |
请求参数 |
#接口调用示例
this.$bridge
.getCityInfo(param)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
#返回参数
| 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 |
错误消息(如有) |