查询可用国家地区信息。
GET /client/ip/dynamics/getLocationList
| 参数名 | 类型 | 描述 |
| x-merchant-token | String | 商户令牌 |
| x-merchant-code | String | 商户代码 |
| Content-Type | String | application/json |
| 参数名 | 必选 | 类型 | 描述 |
| accountId | 是 | Long | 用户账号ID |
{
"total": 15420,
"rows": [
{
"countryCode": "AD",
"countryName": "安道尔公国",
"stateCode": "encamp",
"cityCode": "encamp"
},
{
"countryCode": "AE",
"countryName": "阿联酋",
"stateCode": "abudhabi",
"cityCode": "abudhabi"
}
],
"code": 200,
"msg": "查询成功"
}
// 使用 fetch 查询地区
fetch('/client/ip/dynamics/getLocationList?accountId=123', {
method: 'GET',
headers: {
'x-merchant-token': 'your_token',
'x-merchant-code': 'your_code',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data));
| 参数名 | 类型 | 描述 |
| countryCode | String | 国家代码 |
| countryName | String | 国家名称 |
| stateCode | String | 州/省代码 |
| cityCode | String | 城市代码 |