172 lines
5.6 KiB
Markdown
172 lines
5.6 KiB
Markdown
#### 1、返回广告列表信息
|
||
|
||
##### 接口地址
|
||
|
||
|
||
|
||
##### 返回格式:json
|
||
|
||
##### 请求方式:get
|
||
|
||
##### 请求示范
|
||
|
||
|
||
http://spread-test.kingsome.cn/webapp/index.php?c=Ops&a=getAdList&body={"gameid":"10034","locationid":1001}
|
||
http://spread-test.kingsome.cn/webapp/index.php?c=Ops&a=getAdList&body={"gameid":"1003","area":1}
|
||
##### 请求参数说明
|
||
|
||
| 名称 | 类型 | 必填 | 说明 |
|
||
| --------- | ---- | ---- | ---------------------------------- |
|
||
| c | string | 是 | OPS通用接口标志 |
|
||
| a | string | 是 | 方法定义 当前为getAdList |
|
||
| body | string | 是 | 参数体,JSON格式,gameid,channelid,locationid作为key |
|
||
|
||
##### 返回参数说明
|
||
|
||
| 名称 | 类型 | 必填 | 说明 |
|
||
| ---- | ---- | ---- | -------- |
|
||
| errcode | int | 是 | 返回状态 |
|
||
| errmsg | string | 是 | 错误信息 |
|
||
| ad_title | string | 是 | 广告标题 |
|
||
| ad_body | string | 是 | 广告正文 |
|
||
| ad_image | string | 是 | 广告图片 |
|
||
| ad_sort | int | 是 | 播放优先级 |
|
||
| adid | int | 是 | 广告标志ID,用途数据上传统计 |
|
||
| name | string | 是 | 广告名称 |
|
||
| jump_status | int | 是 | 跳转状态,1=跳转,0=不跳 |
|
||
| jump_param | string | 是 | 跳转参数 |
|
||
| area | string | 是 | 区域(第一元素:1=首页,2=游戏中,3=结算页,4=关闭,第二元素:X轴第三元素:Y轴,其中X,Y取值范围(0,15))如(1,0,0)代表首页左上 |
|
||
| type | int | 是 | 类型(1=icon,2=banner,3=浮窗) |
|
||
| mode | int | 是 | 广告单播或轮播模式(1=单播,2=轮播) |
|
||
| ad_property | string | 是 | 广告属性描述 |
|
||
|
||
|
||
##### 返回示例
|
||
{
|
||
"errcode": 0,
|
||
"errmsg": "",
|
||
"message": {
|
||
"totoal": 1,
|
||
"result": [
|
||
{
|
||
"ad_body": "",
|
||
"ad_image": "https://resource.kingsome.cn/ad/b63dd2ca-dad5-11e9-9ea2-525400ddcafb_png",
|
||
"ad_property": "{\"is_shake\":0,\"is_hot\":0,\"is_new\":0,\"is_recommend\":0,\"appid\":\"wxdb103a128e118619\",\"jump_param\":\"yx2nyabgm8\",\"played\":0}",
|
||
"ad_sort": "0",
|
||
"ad_title": "",
|
||
"area": "3,8,12,0,32",
|
||
"channelid": "6001",
|
||
"companyid": "0",
|
||
"createtime": "2019-09-20 10:42:42",
|
||
"id": "1258",
|
||
"jump_param": "",
|
||
"jump_status": "1",
|
||
"ld_property": "{\"title\":\"底部横向滚动\",\"show_name\":\"\",\"bg_img\":\"\",\"has_dot\":false,\"is_shake\":false,\"is_hide\":true,\"is_show_name\":false,\"related\":[],\"scale\":1}",
|
||
"locationid": "1073",
|
||
"mode": "1",
|
||
"name": "首页icon轮播+底部横向滚动6",
|
||
"type": "6",
|
||
"x": "8",
|
||
"x_offset": "0",
|
||
"y": "12",
|
||
"y_offset": "32"
|
||
},
|
||
]
|
||
}
|
||
}
|
||
|
||
#### 2、广告播放上报
|
||
|
||
##### 接口地址
|
||
|
||
http://spread-test.kingsome.cn/webapp/index.php
|
||
|
||
##### 返回格式:json
|
||
|
||
##### 请求方式:get
|
||
|
||
##### 请求示范
|
||
|
||
上传列表压缩过程
|
||
'''
|
||
let aidStr = JSON.stringify(aids);
|
||
let url = `${__getUrl()}?c=Ops&a=upAdRecording&adid=${encodeURIComponent(aidStr)}`
|
||
'''
|
||
|
||
https://spread-test.kingsome.cn/webapp/index.php?c=Ops&a=upAdRecording&adid=%5B%221040%22%2C%221035%22%2C%221039%22%2C%221036%22%2C%221038%22%2C%221037%22%5D
|
||
|
||
##### 请求参数说明
|
||
|
||
| 名称 | 类型 | 必填 | 说明 |
|
||
| --------- | ---- | ---- | ---------------------------------- |
|
||
| c | string | 是 | OPS通用接口标志 |
|
||
| a | string | 是 | 方法定义 upAdRecording |
|
||
| adid | int | 是 | 广告ID |
|
||
|
||
##### 返回参数说明
|
||
|
||
| 名称 | 类型 | 必填 | 说明 |
|
||
| ---- | ---- | ---- | -------- |
|
||
| errcode | int | 是 | 返回状态 |
|
||
| errmsg | string | 是 | 错误信息 |
|
||
| message | string | 是 | 返回信息 |
|
||
|
||
|
||
|
||
##### 返回示例
|
||
{
|
||
"errcode": 0,
|
||
"errmsg": "",
|
||
"message": "1002 incr success!"
|
||
}
|
||
|
||
#### 3、广告跳转内容上报
|
||
|
||
##### 接口地址
|
||
|
||
http://spread-test.kingsome.cn/webapp/index.php
|
||
|
||
##### 返回格式:json
|
||
|
||
##### 请求方式:post
|
||
|
||
##### 请求示范
|
||
body= {
|
||
"gameid": 1001,
|
||
"locationid": 1078,
|
||
"uid": "miles.peng",
|
||
"ad_channel": "ssfd1",
|
||
"adid": 2234
|
||
}
|
||
|
||
https://spread-test.kingsome.cn/webapp/index.php?c=Ops&a=upJumpRecording
|
||
|
||
##### 请求参数说明
|
||
|
||
| 名称 | 类型 | 必填 | 说明 |
|
||
| --------- | ---- | ---- | ---------------------------------- |
|
||
| c | string | 是 | OPS通用接口标志 |
|
||
| a | string | 是 | 方法定义 upJumpRecording |
|
||
| gameid | int | 是 | 游戏ID |
|
||
| locationid | int | 是 | 广告位置ID |
|
||
| uid | int | 是 | 用户ID或微信openid |
|
||
| ad_channel | int | 是 | 广告特征码 见上ad_property.jump_param |
|
||
| adid | int | 是 | 广告ID |
|
||
|
||
|
||
##### 返回参数说明
|
||
|
||
| 名称 | 类型 | 必填 | 说明 |
|
||
| ---- | ---- | ---- | -------- |
|
||
| errcode | int | 是 | 返回状态 |
|
||
| errmsg | string | 是 | 错误信息 |
|
||
| message | string | 是 | 返回信息 |
|
||
|
||
|
||
|
||
##### 返回示例
|
||
{
|
||
"errcode": 0,
|
||
"errmsg": ""
|
||
}
|