文档
测试

地区接口

POST
laiba.bxwhl.com/api/index/getRegion

请求参数

参数名
类型
描述
必填
pid
string
上级ID (0代表省份 ,传送哪个ID展示哪个ID下的所有城市或地区, 若要获取所有地址 参数填写 ‘all’)
必填

说明 / 示例

```json { "code": 1, "msg": "获取成功", "data": [ { "id": 3326, //id "pid": 3325, //上级id "shortname": "台北", //名称 "name": "台北市", //名称 "merger_name": "中国,台湾省,台北市", "level": 2, "pinyin": "taipei", "code": "02", "zip_code": "1", "first": "T", "lng": "121.565170", "lat": "25.037798" }, { "id": 3339, "pid": 3325, "shortname": "高雄", "name": "高雄市", "merger_name": "中国,台湾省,高雄市", "level": 2, "pinyin": "kaohsiung", "code": "07", "zip_code": "8", "first": "G", "lng": "120.311922", "lat": "22.620856" }, { "id": 3378, "pid": 3325, "shortname": "基隆", "name": "基隆市", "merger_name": "中国,台湾省,基隆市", "level": 2, "pinyin": "keelung", "code": "02", "zip_code": "2", "first": "J", "lng": "121.746248", "lat": "25.130741" }, { "id": 3386, "pid": 3325, "shortname": "台中", "name": "台中市", "merger_name": "中国,台湾省,台中市", "level": 2, "pinyin": "taichung", "code": "04", "zip_code": "4", "first": "T", "lng": "120.679040", "lat": "24.138620" }, { "id": 3416, "pid": 3325, "shortname": "台南", "name": "台南市", "merger_name": "中国,台湾省,台南市", "level": 2, "pinyin": "tainan", "code": "06", "zip_code": "7", "first": "T", "lng": "120.279363", "lat": "23.172478" }, { "id": 3454, "pid": 3325, "shortname": "新竹", "name": "新竹市", "merger_name": "中国,台湾省,新竹市", "level": 2, "pinyin": "hsinchu", "code": "03", "zip_code": "3", "first": "X", "lng": "120.968798", "lat": "24.806738" }, { "id": 3458, "pid": 3325, "shortname": "嘉义", "name": "嘉义市", "merger_name": "中国,台湾省,嘉义市", "level": 2, "pinyin": "chiayi", "code": "05", "zip_code": "6", "first": "J", "lng": "120.452538", "lat": "23.481568" }, { "id": 3461, "pid": 3325, "shortname": "新北", "name": "新北市", "merger_name": "中国,台湾省,新北市", "level": 2, "pinyin": "newtaipei", "code": "02", "zip_code": "2", "first": "X", "lng": "121.465746", "lat": "25.012366" }, { "id": 3491, "pid": 3325, "shortname": "宜兰", "name": "宜兰县", "merger_name": "中国,台湾省,宜兰县", "level": 2, "pinyin": "yilan", "code": "03", "zip_code": "2", "first": "Y", "lng": "121.500000", "lat": "24.600000" }, { "id": 3504, "pid": 3325, "shortname": "桃园", "name": "桃园县", "merger_name": "中国,台湾省,桃园县", "level": 2, "pinyin": "taoyuan", "code": "03", "zip_code": "3", "first": "T", "lng": "121.083000", "lat": "25.000000" }, { "id": 3518, "pid": 3325, "shortname": "新竹", "name": "新竹县", "merger_name": "中国,台湾省,新竹县", "level": 2, "pinyin": "hsinchu", "code": "03", "zip_code": "3", "first": "X", "lng": "121.160000", "lat": "24.600000" }, { "id": 3532, "pid": 3325, "shortname": "苗栗", "name": "苗栗县", "merger_name": "中国,台湾省,苗栗县", "level": 2, "pinyin": "miaoli", "code": "037", "zip_code": "3", "first": "M", "lng": "120.750000", "lat": "24.500000" }, { "id": 3551, "pid": 3325, "shortname": "彰化", "name": "彰化县", "merger_name": "中国,台湾省,彰化县", "level": 2, "pinyin": "changhua", "code": "04", "zip_code": "5", "first": "Z", "lng": "120.416000", "lat": "24.000000" }, { "id": 3578, "pid": 3325, "shortname": "南投", "name": "南投县", "merger_name": "中国,台湾省,南投县", "level": 2, "pinyin": "nantou", "code": "049", "zip_code": "5", "first": "N", "lng": "120.830000", "lat": "23.830000" }, { "id": 3592, "pid": 3325, "shortname": "云林", "name": "云林县", "merger_name": "中国,台湾省,云林县", "level": 2, "pinyin": "yunlin", "code": "05", "zip_code": "6", "first": "Y", "lng": "120.250000", "lat": "23.750000" }, { "id": 3613, "pid": 3325, "shortname": "嘉义", "name": "嘉义县", "merger_name": "中国,台湾省,嘉义县", "level": 2, "pinyin": "chiayi", "code": "05", "zip_code": "6", "first": "J", "lng": "120.300000", "lat": "23.500000" }, { "id": 3632, "pid": 3325, "shortname": "屏东", "name": "屏东县", "merger_name": "中国,台湾省,屏东县", "level": 2, "pinyin": "pingtung", "code": "08", "zip_code": "9", "first": "P", "lng": "120.487928", "lat": "22.682802" }, { "id": 3666, "pid": 3325, "shortname": "台东", "name": "台东县", "merger_name": "中国,台湾省,台东县", "level": 2, "pinyin": "taitung", "code": "089", "zip_code": "9", "first": "T", "lng": "120.916000", "lat": "23.000000" }, { "id": 3683, "pid": 3325, "shortname": "花莲", "name": "花莲县", "merger_name": "中国,台湾省,花莲县", "level": 2, "pinyin": "hualien", "code": "03", "zip_code": "9", "first": "H", "lng": "121.300000", "lat": "23.830000" }, { "id": 3697, "pid": 3325, "shortname": "澎湖", "name": "澎湖县", "merger_name": "中国,台湾省,澎湖县", "level": 2, "pinyin": "penghu", "code": "06", "zip_code": "8", "first": "P", "lng": "119.566417", "lat": "23.569733" }, { "id": 3704, "pid": 3325, "shortname": "金门", "name": "金门县", "merger_name": "中国,台湾省,金门县", "level": 2, "pinyin": "jinmen", "code": "082", "zip_code": "8", "first": "J", "lng": "118.317089", "lat": "24.432706" }, { "id": 3711, "pid": 3325, "shortname": "连江", "name": "连江县", "merger_name": "中国,台湾省,连江县", "level": 2, "pinyin": "lienchiang", "code": "0836", "zip_code": "2", "first": "L", "lng": "119.539704", "lat": "26.197364" } ] }