简要描述:

请求域名:

  • http://xx.com

请求URL:

POST:plugin.agent-enquiry.Frontend.controllers.list.get-area

参数:

参数名 是否必须 类型 说明
parent_id int 父ID,省就给0

返回示例:

正确时返回:

{
  "result": 1,
  "msg": "成功",
  "data": [
    {
      "id": 110000,
      "areaname": "北京",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 120000,
      "areaname": "天津",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": [
        {
          "id": 8,
          "province_id": 120000,
          "status": 1,
          "status_name": "通过",
          "level_name": "无效",
          "rate": null
        }
      ]
    },
    {
      "id": 130000,
      "areaname": "河北省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 140000,
      "areaname": "山西省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [
        {
          "id": 19,
          "uniacid": 6,
          "tag_id": 49,
          "area_id": 140000,
          "level": 1,
          "created_at": "2020-09-10 10:52:00",
          "updated_at": "2020-09-10 10:52:00",
          "belongs_to_tag": {
            "id": 49,
            "uniacid": 6,
            "bg_color": "",
            "words_color": "",
            "created_at": "2020-09-10 10:52:00",
            "updated_at": "2020-09-10 10:52:00"
          }
        }
      ],
      "has_many_province_agents": [
        {
          "id": 20,
          "province_id": 140000,
          "status": 1,
          "status_name": "通过",
          "level_name": "无效",
          "rate": null
        }
      ]
    },
    {
      "id": 150000,
      "areaname": "内蒙古自治区",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 210000,
      "areaname": "辽宁省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [
        {
          "id": 22,
          "uniacid": 6,
          "tag_id": 50,
          "area_id": 210000,
          "level": 1,
          "created_at": "2020-09-10 10:52:50",
          "updated_at": "2020-09-10 10:52:50",
          "belongs_to_tag": {
            "id": 50,
            "uniacid": 6,
            "bg_color": "",
            "words_color": "",
            "created_at": "2020-09-10 10:52:50",
            "updated_at": "2020-09-10 10:52:50"
          }
        }
      ],
      "has_many_province_agents": []
    },
    {
      "id": 220000,
      "areaname": "吉林省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 230000,
      "areaname": "黑龙江省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 310000,
      "areaname": "上海",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 320000,
      "areaname": "江苏省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 330000,
      "areaname": "浙江省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 340000,
      "areaname": "安徽省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 350000,
      "areaname": "福建省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 360000,
      "areaname": "江西省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 370000,
      "areaname": "山东省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 410000,
      "areaname": "河南省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 420000,
      "areaname": "湖北省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 430000,
      "areaname": "湖南省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": [
        {
          "id": 10,
          "province_id": 430000,
          "status": 1,
          "status_name": "通过",
          "level_name": "无效",
          "rate": null
        }
      ]
    },
    {
      "id": 440000,
      "areaname": "广东省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": [
        {
          "id": 9,
          "province_id": 440000,
          "status": 1,
          "status_name": "通过",
          "level_name": "无效",
          "rate": null
        },
        {
          "id": 11,
          "province_id": 440000,
          "status": 1,
          "status_name": "通过",
          "level_name": "无效",
          "rate": null
        },
        {
          "id": 12,
          "province_id": 440000,
          "status": 1,
          "status_name": "通过",
          "level_name": "无效",
          "rate": null
        },
        {
          "id": 13,
          "province_id": 440000,
          "status": 1,
          "status_name": "通过",
          "level_name": "无效",
          "rate": null
        },
        {
          "id": 14,
          "province_id": 440000,
          "status": 1,
          "status_name": "通过",
          "level_name": "无效",
          "rate": null
        },
        {
          "id": 15,
          "province_id": 440000,
          "status": 1,
          "status_name": "通过",
          "level_name": "无效",
          "rate": null
        },
        {
          "id": 17,
          "province_id": 440000,
          "status": 1,
          "status_name": "通过",
          "level_name": "无效",
          "rate": null
        },
        {
          "id": 18,
          "province_id": 440000,
          "status": 1,
          "status_name": "通过",
          "level_name": "无效",
          "rate": null
        }
      ]
    },
    {
      "id": 450000,
      "areaname": "广西壮族自治区",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 460000,
      "areaname": "海南省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 500000,
      "areaname": "重庆",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 510000,
      "areaname": "四川省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 520000,
      "areaname": "贵州省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 530000,
      "areaname": "云南省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 540000,
      "areaname": "西藏自治区",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 610000,
      "areaname": "陕西省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 620000,
      "areaname": "甘肃省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 630000,
      "areaname": "青海省",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 640000,
      "areaname": "宁夏回族自治区",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 650000,
      "areaname": "新疆维吾尔自治区",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 710000,
      "areaname": "台湾",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 810000,
      "areaname": "香港特别行政区",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    },
    {
      "id": 820000,
      "areaname": "澳门特别行政区",
      "parentid": 0,
      "level": 1,
      "children": [],
      "has_many_tag": [],
      "has_many_province_agents": []
    }
  ]
}

返回参数说明:

参数名 类型 说明
result int 0:失败,1:成功
msg string 提示消息
data array 返回数据

返回参数 data 说明:

参数名 类型 说明
id string 城市ID,parent_id 传这个值!
areaname string 区域名称
level string 省市区街道 1234
has_many_tag array 标签区域关联
has_many_province_agents array 代理(这个参数里面有值就显示人头)

返回参数 data.has_many_tag.bleongs_to_tag 说明:

参数名 类型 说明
bg_color array 背景色
words_color array 文字色

备注:

1:data.has_many_tag的值是个数组,但是他最多只有一个元素,循环第一项即可,注意数组取值

1:data.has_many_tag.bleongs_to_tag下的两个颜色,没有这个参数,或者这个参数为空都是默认颜色,有值才显示颜色!

2:data.has_many_province_agents 为省的时候,判断这个参数(传给我的parent_id level是0) data.has_many_city_agents 为市的时候,判断这个参数(传给我的parent_id level是1) data.has_many_district_agents 为区的时候,判断这个参数(传给我的parent_id level是2) data.has_many_street_agents 为街道的时候,判断这个参数(传给我的parent_id level是3)