| Version 58 (modified by lanzhenhua, 10 years ago) (diff) |
|---|
Table of Contents
资讯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
}
返回参数说明
| 参数名 | 参数含义 |
|---|---|
1.5首页列表接口
(mrobot已完成,请连开发机进行测试)
mrobot地址: http://mrobot.pcauto.com.cn/v2/cms/channels/{id}?pageNo=1&pageSize=20&v=4.0.0
例如: http://mrobot.pcauto.com.cn/v2/cms/channels/1?pageNo=1&pageSize=20&v=4.0.0
cmt开发环境: http://test2.pcauto.com.cn:8002/app/json/
cmt线上环境: http://www.pcauto.com.cn/app/21json
说明
此接口为资讯客户端15个栏目集合,涉及参数以及各种情景太多,实在不能穷举,以下只列出新增内容。
对于客户端逻辑,此版本需要注意:1.增加新版视频类型返回:type=9;2.版本号要改为v=4.8.2
缓存时间
首页列表5分钟,其余栏目30分钟
提交方式
GET
是否登录
否
数据来源
cms、快搜、cmt、直播后台等等
参数
此版本对传入参数只做一个修改v=4.8.2。
返回
{
"data": [
{
"articleType": "y",
"channelId": 1,
"channelName": "头条",
"count": 0,
"downs": 0,
"id": "6929470",
"image": "http://img0.pcauto.com.cn/pcauto/1509/14/g_6959543_1442223329657_240x160.jpg",
"pageNo": 3,
"pubDate": "2013-01-01",
"title": "测试旧文章",
"type": 1,
"ups": 0,
"url": "http://www.pcauto.com.cn/teach/692/6929470_2.html"
}
],
"focus": [
{
"articleType": "n",
"id": "1623455",
"image": "http://img0.pcauto.com.cn/pcauto/app/daogou/1108/201108311.jpg",
"pubDate": "2011-08-31",
"title": "哈弗H6挑战比亚迪S6/瑞虎/海马骑士",
"topicUrl": "http://www.pcauto.com.cn/teach/1108/1622411.html",
"url": "http://www.pcauto.com.cn/app/daogou/1108/1623455.html"
}
],
"pageNo": 1,
"pageSize": 1,
"topData": [
{
"cc-uri": "http://count.imofan.com/count?url=http://www.pcauto.com.cn/nation/669/6690671.html&ad=132",
"channelId": 0,
"channelName": "",
"count": 0,
"downs": 0,
"id": "161",
"image": "http://img0.pcauto.com.cn/pcauto/1503/15/6055040_567.jpg",
"isExtend": "0",
"preView": "央视3·15晚会正在直播 消费在阳光下",
"pubDate": "2015-03-15",
"seq": 1,
"title": "央视3·15晚会直播回顾 消费在阳光下",
"to-uri": "pcautobrowser://information-article/161?template=live",
"type": 4,
"updateAt": 1436284800000,
"ups": 0
}
],
"topFocus": [
{
"image": "http://www1.pcauto.com.cn/test/qwegf3wrefgvazv.jpg",
"seq": 1,
"title": "驾名爵锐腾1.5T四驱豪华版",
"to-uri": "http://m.pcauto.com.cn/x/guangzhou/?type=zt&FromApp=1&browser=commonwebview&v=4.5.0",
"updateAt": 1437408000000
}
],
"total": 150
}
返回参数说明
在data与focus数组内的每一个JSONOject中type=9表示新版视频
| 参数名 | 参数含义 |
|---|---|
| type | 1文章,2帖子,3图集,4直播,5专题,6活动,7新专题,9视频,0其他 |
| to-uri | 论坛版块pcautobrowser://bbs-topics/,图库图片pcautobrowser://album-photo/,车系界面pcautobrowser://serial/,车型界面pcautobrowser://model/ |
| pageNo | 当type等于1(文章)时,假如有返回pageNo,要跳转到文章相应的pageNo页 |
| articleType | 值为y表示旧文章 |
2.找车
2.1预约试驾
(mrobot已完成,请连开发机进行测试)
mrobot地址:: http://mrobot.pcauto.com.cn/v3/price/testdriverv45/?serialId=8670&modelId=32059&modelName=%E5%A5%A5%E8%BF%AAQ3%202015%E6%AC%BE%2030%20TFSI%20%E6%A0%87%E5%87%86%E5%9E%8B&url=http://img.pconline.com.cn/images/upload/upc/tx/auto5/1311/12/c12/28562173_1384235641812_120x90.jpg&appKey=b5d3828499d0590300000003&chId=app_store&devId=cdef0dde8e82323c2a0df5bad5bce8646971f0f5' 后端接口: http://price.pcauto.com.cn/interface/iphone/model_list_v3.jsp?version=1&serialId=8670
http://price.pcauto.com.cn/dealer/action/add_order.jsp
说明
预约试驾页面
缓存时间
无
提交方式
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
后端接口:
http://www.pcauto.com.cn/forum/club/app/1510/intf7931.html
http://www.pcauto.com.cn/forum/club/app/1510/intf7971.html
http://www.pcauto.com.cn//forum/club/shequ/wapshequ/1503/intf6627_1.html
http://www.pcauto.com.cn//forum/club/activeapp_v2/
说明
车友社区首页
缓存时间
提交方式
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
}
4.其他
4.1广告接口
(mrobot已完成,请连开发机进行测试)
说明
此接口只增加了一个&showMP4=1参数,表示新版客户端才会出mp4类型启动图,其他不变
缓存
无
提交方式
GET
是否登录
否
数据来源
广告系统、第三方广告
参数
此版本增加了一个&showMP4=1参数。
返回
{
"auto.khd.zcgcjsjtl.": {
"ads": [
{
"cc-uri": "http://ivy.pconline.com.cn/adpuba/click?adid=367187&id=test.adtest.rc.ls.",
"showJDAd": 1,
"vc-uri": "http://ivy.pconline.com.cn/adpuba/show?adid=367187&id=test.adtest.rc.ls.&media=js"
}
]
},
"auto.khd.zx.qdtdh.": {
"ad": {
"cc-uri": "",
"cc3d-uri": "",
"img": "http://imgad0.pconline.com.cn/ivy/image/20161/5/14519591264250.mp4",
"to-uri": "http://ivy.pcauto.com.cn/adpuba/click?adid=397086&id=auto.other.qdt.",
"vc-uri": "http://v.admaster.com.cn/i/a58482,b720384,c71,i0,m202,h",
"vc3d-uri": ""
},
"rule": {
"age": 3,
"delay": 0,
"interval": 0
}
},
"timestamp": {
"t": 1452066684871
}
}
返回参数说明
启动图视频mp4链接也是在原本的启动图中img字段出
![(please configure the [header_logo] section in trac.ini)](http://www1.pconline.com.cn/hr/2009/global/images/logo.gif)