- 获取开屏广告或动画
接口版本:
版本号 | 制定人 | 制定日期 | 修订日期 |
---|---|---|---|
1.0.0 | Henry | 2019-05-03 |
请求URL:
请求方式:
- POST或GET
请求头:
无
请求参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
page | 是 | string | 所在页面,如index为首页,about关于我们,alert弹窗广告,shop商城,push为推送广告 |
location | 是 | string | 页面位置,如top,button,left,right,center |
返回示例:
正确时返回:
{
“status”: 200,
“msg”: “查询成功”,
“data”: [
{
“id”: 14,
“image”: “banner/5dee17dea9c3c.png”,
“url”: “https://tool.union-home.cn",
“img_type”: “local”,
“type”: “jump”,
“create_at”: 1575618531,
“update_at”: 1575967933,
“uid”: 1,
“flag”: 1,
“need_login”: 1,
“page”: “my”,
“location”: “top”,
“is_company”: 1,
“is_self_support”: 1,
“overdue”:112784545
},
{
“id”: 16,
“image”: “banner/5df1ea3fecdf7.jpg”,
“url”: “www.daidu.com",
“img_type”: “local”,
“type”: “self”,
“create_at”: 1576135231,
“update_at”: null,
“uid”: 1,
“flag”: 1,
“need_login”: 1,
“page”: “my”,
“location”: “top”,
“is_company”: 1,
“is_self_support”: 1,
“overdue”:112784545
}
]
}
错误时返回:
{
“status”: 201,
“msg”: “请携带广告页面”
}
错误时返回2:
{
“status”: 202,
“msg”: “请携带广告位置”
}
错误时返回3:
{
“status”: 203,
“msg”: “暂无数据”
}
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
status | int | 状态,成功为200,其他都为失败 |
msg | string | 提示信息 |
data | object | 内容 |
id | int | 数据库自增id |
image | string | 视频或图片路径 |
url | string | 点击跳转路径 |
img_type | string | 区别是本地上传还是远程文件,本地上传为local 远程为 ssh |
type | string | 调转类型,jump=跳转,self=APP自带 |
need_login | int | 是否需要登录,1=需要,0=不需要 |
page | string | 属于那个页面 |
location | string | 出现的位置 上下左右中 top button left right center |
is_company | int | 是否是 公司内部 1 为内部 0 外部 |
is_self_support | int | 是否自营,1=自营,2=第三方 |
overdue | int | 广告过期时间 |
其他参数可不用理会 |
备注:
- 无