| Version 49 (modified by dengyurong, 10 years ago) (diff) |
|---|
资讯4.8.2接口文档 (已完成接口开发机可测)
mrobot代理环境说明:
192.168.10.198 端口为 1080 连的是QA测试环境(192.168.74.80)
192.168.10.199 端口为 1080 连的是dev40的开发环境(192.168.75.40)
ps:对于mrobot.pcauto.com.cn/x/前缀的接口,mrobot仅作代理,没有任何逻辑处理。
制作地址: 猛戳前往
应用后端接口trac: 暂无
1.资讯
1.1视频栏目列表
(开发已完成,调试请连开发机代理)
mrobot地址: http://mrobot.pcauto.com.cn/xsp/s/auto/info/v4.8/columnList.xsp
video开发环境: http://dev32.pcauto.com.cn:9991/interface/pcauto/i_category_list.jsp
video线上环境: http://v.pcauto.com.cn/interface/pcauto/i_category_list.jsp
说明
获取视频栏目列表
缓存时间
提交方式
GET
是否登录
否
数据来源
video
请求参数 无
返回
{
"data": [
{
"id": "0",
"name": "全部视频"
},
{
"id": 92,
"name": "原创视频"
},
{
"id": 42,
"name": "新车视频"
},
{
"id": 1,
"name": "试车视频"
},
{
"id": 3,
"name": "安全警示"
},
{
"id": 43,
"name": "个性展示"
},
{
"id": 44,
"name": "技术视频"
},
{
"id": 32,
"name": "车展视频"
},
{
"id": 2,
"name": "广告视频"
}
]
}
返回参数说明
| 参数名 | 参数含义 | 参数名 | 参数含义 |
|---|---|---|---|
| id | 栏目名称 | name | 栏目名称 |
1.2 获取某个栏目下视频列表
(开发已完成,调试请连开发机代理)
mrobot地址: http://mrobot.pcauto.com.cn/xsp/s/auto/info/v4.8/videoList.xsp
video开发环境: http://dev32.pcauto.com.cn:9991/interface/common/video_videoList.jsp
video线上环境: http://v.pcauto.com.cn/interface/common/video_videoList.jsp
说明
获取视频栏目列表
缓存时间
提交方式
GET
是否登录
否
数据来源
video
请求参数
| 参数名 | 参数含义 | 类型 | 默认值 | 是否必须 | 说明 |
|---|---|---|---|---|---|
| cid | 栏目id | int | 0 | 否 | 接口数据是某个分类的视频。当采用默认值时,接口数据为最新发布视频倒序 |
| pageNo | 页码 | int | 1 | 否 | |
| pageSize | 分页大小 | int | 20 | 否 | |
| viewCount | 是否需要评论 | boolean | false | 否 | |
| desc | 是否需要视频描述信息 | boolean | false | 否 |
返回
{
"total": 25039,
"pageNo": 1,
"data": [
{
"id": 46314,
"pubDate": "2015-12-21",
"categoryName": "个性展示",
"duration": "00:17:13",
"desc": "",
"image": "http://img.pcauto.com.cn/images/autovideo/autovideo/201512/21/14506783936184410_s2.jpg",
"url": "http://dev32.pcauto.com.cn:9991/video-46314.html",
"title": "《四万说车》之奥迪Q7抢鲜体验",
"bigCover": "http://img.pcauto.com.cn/images/autovideo/autovideo/201512/21/14506783936184410_s5.jpg",
"isYuanChuang": 0,
"durationSimple": "17:13",
"viewCount": 0,
"type": 9
},
{
"id": 46308,
"pubDate": "2015-12-20",
"categoryName": "安全警示",
"duration": "00:02:44",
"desc": "",
"image": "http://img.pcauto.com.cn/images/autovideo/autovideo/201512/20/14506164606938720_s2.jpg",
"url": "http://dev32.pcauto.com.cn:9991/video-46308.html",
"title": "货车翻到之际见真情",
"bigCover": "http://img.pcauto.com.cn/images/autovideo/autovideo/201512/20/14506164606938720_s5.jpg",
"isYuanChuang": 0,
"durationSimple": "02:44",
"viewCount": 0,
"type": 9
}
],
"pageSize": 20
}
返回参数说明
| 参数名 | 参数含义 | 参数名 | 参数含义 |
|---|---|---|---|
| total | 视频总数 | pageNo | 当前页数 |
| pageSize | 当前页大小 | id | 视频id |
| title | 视频名称 | categoryName | 视频所属栏目名称 |
| duration | 视频的时长,hh:mm:ss 格式 | durationSimple | 视频的时长,mm:ss 格式 |
| desc | 视频的描述信息 | image | 120x68尺寸的封面图 |
| bigCover | 284x160尺寸的封面图 | url | 视频的PC播放页链接 |
| isYuanChuang | 表示是否含有"原创"标签 | viewCount | 视频播放数 |
| pubDate | 视频上传日期 yyyy-MM-dd 格式 | type | type为9表示视频类型 |
1.3 视频详情页
(mrobot已完成,请连开发机进行测试)
mrobot地址: http://mrobot.pcauto.com.cn/xsp/s/auto/info/v4.8/videoDetail.xsp?vid=46297
video开发环境: http://dev32.pcauto.com.cn:9991/interface/pcauto/video_video.jsp?vid=
video线上环境: http://v.pcauto.com.cn/interface/pcauto/video_video.jsp?vid=
说明
视频详情页
缓存时间
无
提交方式
GET
是否登录
否
数据来源
video
参数
| 参数名 | 参数含义 | 类型 | 默认值 | 是否必须 | 说明 |
|---|---|---|---|---|---|
| vid | 视频id | int | 否 |
返回 HTML页面
协议
评论:pcautobrowser://reply?nickName=&postId=
个人中心:pcautobrowser://m?userId=
举报: pcautobrowser://report
1.4评论接口
(mrobot已完成,请连开发机进行测试)
mrobot地址: http://mrobot.pcauto.com.cn/xsp/s/auto/info/xueChe/newTopics.xsp?topicId=13285745
cmt开发环境:暂无
cmt线上环境: http://cmt.pcauto.com.cn/action/comment/list_new_json.jsp?tId=13285745&arch=0&reverse=0
说明
获取某个话题评论列表
缓存时间
无
提交方式
GET
是否登录
否
数据来源
cmt
参数
| 参数名 | 参数含义 | 类型 | 默认值 | 是否必须 | 说明 |
|---|---|---|---|---|---|
| pageNo | 页数 | int | 1 | 否 | |
| pageSize | 每页条数 | int | 20 | 否 | |
| topicId | 挂评论的话题id | string | 是 | 应用端需要 | |
| articleId | 文章id | string | 否 | ||
| reverse | 是否倒序 | string | 否 |
返回
{
"comments": [
{
"1": {
"id": 29245573,
"userId": 0,
"name": "四川省成都市网友",
"floor": 110,
"time": "2015-09-09 09:22:31",
"client": 1
},
"2": {
"id": 29245573,
"userId": 0,
"name": "四川省成都市网友",
"floor": 110,
"time": "2015-09-09 09:22:31",
"client": 1
},
"current": 2,
"support": 2,
"expand": false
},
{
"1": {
"id": 28918767,
"userId": 40609440,
"name": "蓝天7763",
"floor": 96,
"time": "2015-06-18 10:39:09",
"client": 1
},
"current": 0,
"support": 0,
"expand": false
},
{
"1": {
"id": 28916485,
"userId": 34280943,
"name": "圈圈的小黑",
"floor": 95,
"time": "2015-06-17 17:49:35",
"client": 1
},
"current": 1,
"support": 1,
"expand": false
},
{
"1": {
"id": 28916007,
"userId": 34796550,
"name": "宠儿飞飞",
"floor": 93,
"time": "2015-06-17 16:23:27",
"client": 1
},
"current": 0,
"support": 0,
"expand": false
}
],
"hot-comments": [
{
"1": {
"id": 28870318,
"userId": 29841302,
"name": "Gold_Agent",
"floor": 49,
"time": "2015-06-05 17:27:27",
"client": 1
},
"current": "4",
"support": 5,
"expand": false
}
],
"docUrl": "http://mrobot.pcauto.com.cn/v3/cms/articles/0",
"pageNo": 1,
"pageCount": 6
}
返回参数说明
| 参数名 | 参数含义 |
|---|---|
2.找车
2.1预约试驾
(mrobot已完成,请连开发机进行测试)
说明
预约试驾页面
缓存时间
无
提交方式
GET
是否登录
否
数据来源
参数
| 参数名 | 参数含义 | 类型 | 默认值 | 是否必须 | 说明 |
|---|---|---|---|---|---|
| serialId | 车型ID | int | 1 | 是 | |
| modelId | 车型ID | int | 20 | 否 | |
| modelName | 车型名称 | string | 否 | ||
| url | 车型图片链接 | string | 否 | ||
| dealerId | 经销商id | int | 否 |
dealerId:经销商id(如有指定经销商,则客户端不需要调用getDealers,如无指定经销商即没传此参数,则调用getDealers以显示经销商列表)
阅读模式:无参数 白天;night 晚间
点击车型选择协议: pcaction://choose-car/json={"cars":[{"id":1, name:"车型名字"}]}
点击地址选择协议: pcaction://location/
返回结果:HTML
定义三个js函数:
setlocation(regionId,regionName) ;调用效果:设置地址,regionId(城市id),regionName(城市名称)
setCar(modelId,modelName,url);调用效果:设置车型,modelId(车型id),modelName(车型名称),url(车型图片地址)
getDealers(regionId,serialId);调用效果:获取生成可选经销商,regionId(城市id),serialId(车系id)
在HTML源码里,加入(指定经销商)在售可选车型数据
/*@_HTML_META_START_
{cars:[{title: " 1.4L 90马力",data:
[{id: "24433",title: "2013款 1.4 手动时尚型",price: "8.28",config: "5挡手动 前置前驱 ",},{id: "24434",title: "2013款 1.4 手动舒适型",price: "9.28",config: "5挡手动 前置前驱 天窗",}]},{title: " 1.4L 90马力",data:
[{id: "24433",title: "2013款 1.4 手动时尚型",price: "8.28",config: "5挡手动 前置前驱 ",},{id: "24434",title: "2013款 1.4 手动舒适型",price: "9.28",config: "5挡手动 前置前驱 天窗",}]}]}
_HTML_META_END_@*/
2.2车型页
mrobot地址: http://mrobot.pcauto.com.cn/xsp/s/auto/info/v4.8/models.xsp?mid=41610&areaId=1&hasDealers=1
说明
此接口只通过判断后端接口返回状态(state)字段是否为即将上市;如果为即将上市修改相关协议以及文案,询底价文案改为预约试驾,其他一切不变
缓存时间
无
提交方式
GET
是否登录
否
参数
返回
返回HTML
返回参数说明
(车型页—“本地最低价”下面的预约试驾,增加协议)
serialId 且有modelId 及名称
pcautobrowser://pcauto-appoint4driving/?serialId=1&modelId=1
(车型综述页—(将上市)经销商列表的预约试驾,增加协议)
车系、车型、经销商、经销商名称
pcautobrowser://pcauto-appoint4driving/?serialId=1&modelId=1&dealerId=30829&dealerName=广州璟众
| 参数名 | 参数含义 |
|---|---|
| serialId | 车系id |
| modelId | 车型id |
| dealerId | 经销商id |
| dealerName | 经销商名称 |
3.论坛
3.1车友社区首页
(开发已完成,调试请连开发机代理)
mrobot地址: http://mrobot.pcauto.com.cn/xsp/s/auto/info/xueChe/communityHomePage.xsp?pageNo=1
说明
车友社区首页
缓存时间
提交方式
GET
是否登录
否
数据来源
请求参数
参数名 类型 必须 说明 pageNo String 是 页码 inreview String 否 IOS APP送审用,1为送审期间
返回
{
"activelist": [
{
"title": "#一个字总结你的2015年#",
"url": "http://club.pcauto.com.cn/topic/4712.html",
"appUrl": "pcautoclub://club-talk/4712",
"img": "http://img0.pcauto.com.cn/pcauto/forum/club/activeapp_v2/1512/cbc.jpg",
"dynaInfoId": "",
"createBy": ""
}
],
"discover": [
{
"appUrl": "pcautoclub://club-talk/4353",
"title": " #国产品牌的希望#"
},
{
"appUrl": "pcautoclub://club-talk/4381",
"title": "#这次油价不降啦#"
},
{
"appUrl": "pcautoclub://club-talk/4352",
"title": "#京6排放标准#"
},
{
"appUrl": "http://www.pcauto.com.cn/forum/club/goddess/",
"title": "更多精彩话题"
}
],
"pics": [
{
"img": "http://img0.pcauto.com.cn/pcauto/forum/club/app/000088206/1512/fhtf.jpg",
"link": "pcautoclub://bbs-topic/9631395"
},
{
"img": "http://img0.pcauto.com.cn/pcauto/forum/club/app/000088206/1512/fhf_1.jpg",
"link": "pcautoclub://bbs-topic/9460170"
},
{
"img": "http://img0.pcauto.com.cn/pcauto/forum/club/app/000088206/1512/rtui_1.jpg",
"link": "pcautoclub://bbs-topics/22265"
}
],
"txts": [
{
"txt": "说说那些影响了一代人的车坛老炮儿 ",
"link": "pcautoclub://club-talk/4721"
}
],
"data": [
{
"title": "【提车】分分钟变极光 我的伙伴金色X7",
"url": "http://bbs.pcauto.com.cn/topic-9463208.html",
"pic": "http://img0.pcauto.com.cn/pcauto/forum/club/shequ/wapshequ/wapshequhot/1512/2_5.jpg",
"summary": "车是我的朋友,兄弟,我从小就很喜欢车,小时候我就想拥有一辆属于自己的车。记得我父亲在我五岁生日的时候给我买了一个玩具车,那时候真是把我高兴坏了",
"userId": "42458858",
"appUrl": "pcautoclub://bbs-t32pic1",
"topicid": "",
"userfaceUrl": "http://i6.3conline.com/images/upload/upc/face/42/45/88/58/42458858_100x100"
}
],
"total": "200",
"pageSize": "10",
"pageNo": "1",
"totalPage": 20
}
![(please configure the [header_logo] section in trac.ini)](http://www1.pconline.com.cn/hr/2009/global/images/logo.gif)