简要描述:

  • 广告投放区域 {{{可以在[我投放的广告接口一起返回,你看是多写一个接口还是?]}}}

请求URL:

GET/plugin.advert-market.frontend.advert.getPutDistricts

参数:

参数名 是否必须 类型 说明
advert_id int 广告id

返回示例:

正确时返回:

{
	"result": 1,
	"msg": "成功",
	"data": {
		"districts": [{
			"id": 20,
			"advert_id": 1,
			"area_id": 110117,
			"created_at": null,
			"updated_at": null,
			"deleted_at": null,
			"address": {
				"id": 110117,
				"areaname": "平谷区",
				"parentid": 110100,
				"level": 3
			}
		}, {
			"id": 21,
			"advert_id": 1,
			"area_id": 110228,
			"created_at": null,
			"updated_at": null,
			"deleted_at": null,
			"address": {
				"id": 110228,
				"areaname": "密云县",
				"parentid": 110100,
				"level": 3
			}
		}, {
			"id": 22,
			"advert_id": 1,
			"area_id": 110229,
			"created_at": null,
			"updated_at": null,
			"deleted_at": null,
			"address": {
				"id": 110229,
				"areaname": "延庆县",
				"parentid": 110100,
				"level": 3
			}
		}]
	}
}

错误返回

{
	"result": 0,
	"msg": "参数错误",
	"data": []
}

返回参数说明:

参数名 类型 说明
districts arr 投放区域数组
area_id int 区域id
address->areaname str 区域名称