wiki:pcauto_4.7.0/interface

1.基本约定

mrobot开发机代理:192.168.10.199 端口为 1080
mrobot测试机代理:192.168.10.198 端口为 1080

2.接口列表

2.1 找车-按条件找车


(接口已上线)
新接口: http://mrobot.pcauto.com.cn/v3/price/chooseOptionLink?index=1
原接口: http://mrobot.pcauto.com.cn/buy/price/chooseOption
HTTP请求方式:get
是否需要登录:false
返回格式:json
缓存方式:接口缓存
缓存时间:1小时
说明:原接口是报价的接口,会与报价冲突
请求参数:

参数名类型必须说明
indexStrng可选index=1标识初始化


返回数据结构
数据结构和旧报价接口一致

2.2 直播改版

2.2.1 首页栏目

(接口已上线)
新接口: http://mrobot.pcauto.com.cn/configs/pcauto_v4_cms_iphone_channel_tree(IOS
新接口: http://mrobot.pcauto.com.cn/configs/pcauto_v4_cms_android_channel_tree(Android
原接口: http://mrobot.pcauto.com.cn/configs/pcauto_v3_cms_iphone_channel_tree(IOS
原接口: http://mrobot.pcauto.com.cn/configs/pcauto_v3_cms_android_channel_tree(Android
HTTP请求方式:get
是否需要登录:false
返回格式:json
缓存方式:
缓存时间:
说明:V4.7.0需要新增“直播”栏目,同时旧版本屏蔽该栏目
返回数据结构

{
news: [
[
"1",
"首页",
"696"
],
[
"2",
"新车",
"296"
],
[
"55555",
"行情",
"297"
],
[
"3",
"导购",
"298"
],
...
[
"18",
"直播",
"723"
]
],...

2.2.2 直播栏目列表

(接口已上线)
mrobot接口: http://mrobot.pcauto.com.cn/v2/cms/channels/18?v=4.0.0&pageNo=1&pageSize=2
后台接口: http://www.pcauto.com.cn/app/000082762/000082782/1503/intf6607.js#
HTTP请求方式:get
是否需要登录:false
返回格式:json
缓存方式:
缓存时间:
说明:需分页;一个直播内容包含banner图、标题、直播状态、时间、评论数/回复数共5个要素
请求参数:

参数名类型必须说明
vString可选版本号,v=4.0.0表示4.0以后的版本
pageNoint必须页码(默认为1)
pageSizeint必须每页大小(默认为200)


返回数据结构

{
 data: [
 {
  banner(图片): "http://img0.pcauto.com.cn/pcauto/app/000082762/000082782/1503/00002.png",
  count(评论数): 0,
  titile(标题): "【跑男来助阵】 售价14.59-21.39万 凌渡上市直播回顾",
  zbId: "6433050",
  zbState(直播状态:1表示正在直播,0表示已结束): "1",
  zbTime: "2015-02-03 15:02:00",
  zbType(type=1表示直播文章,0表示论坛帖子): "0",
  zbUrl: "http://bbs.pcauto.com.cn/topic-6433050.html"
  },
 {
  banner: "http://img0.pcauto.com.cn/pcauto/app/000082762/000082782/1503/0011.jpg",
  count: 386,
  titile: "2015日内瓦车展现场直播",
  zbId: "151",
  zbState: "1",
  zbTime: "2015-06-02 13:05:00",
  zbType: "1",
  zbUrl: "http://live.pcauto.com.cn/broadRecord.jsp?broadcastId=151"
 }
 ],
 pageNo: 1,
 pageSize: 2,
 total: 2
}

2.2.3 直播内容详情页

(接口已上线)
mrobot接口:mrobot接口: http://mrobot.pcauto.com.cn/v3/zbDetail?broadcastId=191&size=18
后台接口: http://dev33.pcauto.com.cn:8001/intf/newApp/_ajaxRecord.jsp?broadcastId=191&pageNo=1&pageSize=20
后台接口: http://dev33.pcauto.com.cn:8001/intf/newApp/getBroadcast.jsp?broadcastId=191
协议(评论节点内容):pcaction://writeComment/partId?zbUrl=&recordId=
协议(回复评论): pcaction://replyComment/partId?zbUrl=&&floor=&recordId=
协议(点击更多):pcaction://loadMoreComment/partId?zbUrl=&pageNo=1&pageSize=20&recordId=
协议(个人中心):pcaction://user-center/userId
HTTP请求方式:get
是否需要登录:false
返回格式:html
缓存方式:
缓存时间:
说明:页面源码中_HTML_META_START_需提供以下数据:
title——直播标题
status——0表示已结束,1表示正在直播,2表示其他
anchorImg——主播头像
anchor——主播名称
abstract——直播简介(这个需要保留a标签)
contentNum——该页的内容数量
url——PC端地址
firstPic——用于分享的图片地址
thumbPic——用于分享的图片地址

刷新评论区函数:function commentShow(reqUrl,reqPartId,reqRecordId){}
reqUrl:直播地址
reqPartId:直播节点评论id
reqRecordId:直播节点内容id

manGetRecord() 获取最新直播内容函数

请求参数:

参数名类型必须说明
broadcastIdString必须直播id
orderString可选按时间排序,1升序,0降序,默认为0
sizeString可选设置字体大小(16小/18中/20大)

ps:(size参数限制字号选择范围在16--21)

2.2.4 直播节点查看更多页

(接口已上线)
mrobot接口: http://mrobot.pcauto.com.cn/v3/zbCommentDetail?recordId=1511&broadcastId=151&pageNo=1&pageSize=20&partId=1425267845000
后台接口: http://dev33.pcauto.com.cn:8001/intf/newApp/getRecordByID.jsp?recordId=1511
后台接口: http://cmt.pcauto.com.cn/templates/pcauto/getPartList.jsp?url=http://live.pcauto.com.cn/broadRecord.jsp?broadcastId=151&pageNo=1&pageSize=20&partId=1425267845000
HTTP请求方式:get
是否需要登录:false
返回格式:html
缓存方式:
缓存时间:
说明:

刷新评论区函数:function commentShow(reqUrl,reqPartId,reqRecordId){}
reqUrl:直播地址
reqPartId:直播节点评论id
reqRecordId:直播节点内容id

请求参数:

参数名类型必须说明
recordIdString必须直播节点id
broadcastIdString必须直播id
pageNoString可选页码
pageSizeString可选页面大小
partIdString必须节点评论id

2.2.5 直播文章分节点评论

(接口已上线)
cmt接口: http://cmt.pcauto.com.cn/action/comment/create_utf8.jsp (由于mrobot线上接口会出现获取不了用户外网ip问题,请客户端使用cmt接口,参数不变)
HTTP请求方式:post
是否需要登录:false
返回格式:json
缓存方式:
缓存时间:
说明:当存在
请求参数:

参数名类型必须说明
id/urlString必须 二选一,必填
contentString必须评论内容
titleString选填主题
replyFloor2String选填回复楼层(若有)
windownameString选填选填,默认为0
anonymousString选填选填,1为匿名
partIdString选填选填,分段落评论的段落id
clientString选填选填(最好按实际情况给参)


返回数据结构

{
	"brief": "A57EWEW",
	"commentCount": 1,
	"commentId": 28545421,
	"createTime": "2015-03-20 10:43:07",
	"floor": 9,
	"ip": "59.42.240.7",
	"resultCode": 0,
	"resultMsg": "您的评论已经成功发表。注:评论在审核后才能出现在列表中,谢谢!",
	"showName": "广东省广州市网友",
	"status": 0,
	"topicId": 13272513,
	"userId": -1
}

2.3 违章查询

2.3.1 平安的违章查询页面

新页面url:
原url:http://cha.wcar.net.cn/taipingyang

2.3.2 发送用户的查询信息到调查系统

接口: http://survey.pcauto.com.cn/auto/submit.jsp
HTTP请求方式:post
是否需要登录:false
返回格式:无
缓存方式和时间:无
请求参数:

参数名类型必须说明
req_encstring必须编码(固定值):utf-8
q_45329string必须查询地区
q_45330string必须车牌号
q_45331string必须发动机号
q_45332string必须车架号
q_45333string必须手机号码
q_45334string必须购车日期
idstring必须固定值:12884
verstring必须固定值:-1
questionsstring必须固定值:空


说明:当用户进行违章查询,获取页面这些用户信息发送到调查系统;用户再次查询如查询信息不变则不需要再调用,如有变化需要再次调用此接口发送新的信息;不需要处理请求结果

2.4 关于车系/车型图片

2.4.1 车系车型全部type分类图片信息

(接口已上线)
mrobot旧接口: http://mrobot.pcauto.com.cn/v2/price/nav_pictures?serialGroupId=4457&modelId=0
mrobot新接口: http://mrobot.pcauto.com.cn/v2/price/nav_picturesv47?serialGroupId=4457&modelId=0
后台接口: http://price.pcauto.com.cn/interface/iphone/photo_category_list.jsp
后台接口: http://price.pcauto.com.cn/interface/iphone/atom/price/model_basic_json.jsp?mIds=
HTTP请求方式:get
是否需要登录:false
返回格式:json
缓存方式:
缓存时间:
请求参数:

参数名类型必须说明
serialGroupIdString必须车系id
modelIdString必须车型id


返回数据结构

{
sections: [
{
photos: [
{
bigPath: "http://img.pcauto.com.cn/images/upload/upc/tx/auto5/1501/28/c12/2443284_2443284_1422416688748_400x300.jpg",
modelId: "36737",
modelName: "凌渡 2015款 280TSI DSG豪华版 ",
price: "19.99",
sellState: 0,  (0:在售,1:即将上市,2:其它)
smallPath: "http://img.pcauto.com.cn/images/upload/upc/tx/auto5/1501/28/c12/2443284_2443284_1422416688748_120x90.jpg"
},
{
bigPath: "http://img.pcauto.com.cn/images/upload/upc/tx/auto5/1501/28/c12/2443284_2443284_1422416692674_400x300.jpg",
modelId: "36737",
modelName: "凌渡 2015款 280TSI DSG豪华版 ",
price: "19.99",
sellState: 0,
smallPath: "http://img.pcauto.com.cn/images/upload/upc/tx/auto5/1501/28/c12/2443284_2443284_1422416692674_120x90.jpg"
},
...
}

2.4.2 车系车型图片

(接口已上线)
mrobot旧接口: http://mrobot.pcauto.com.cn/v2/price/pictures?serialGroupId=4457&pageSize=99999&v=4.7.0&modelId=0&typeId=1&colorId=0
mrobot新接口: http://mrobot.pcauto.com.cn/v2/price/picturesv47?serialGroupId=4457&pageSize=99999&v=4.7.0&modelId=0&typeId=1&colorId=0
后台接口: http://price.pcauto.com.cn/interface/iphone/photo_page_list.jsp
后台接口: http://price.pcauto.com.cn/interface/iphone/atom/price/model_basic_json.jsp?mIds=
HTTP请求方式:get
是否需要登录:false
返回格式:json
缓存方式:
缓存时间:
请求参数:

参数名类型必须说明
serialGroupIdString必须车系id
modelIdString必须车型id
pageNoint可选页码
pageSizeint可选页面大小
vint必须v=4.7.0出4.7版本后的数据
typeIdint可选分类
colorIdint可选颜色


返回数据结构

{
pageCount: "1",
pageNo: 1,
pageSize: 99999,
sections: [
{
photos: [
{
bigPath: "http://img.pcauto.com.cn/images/upload/upc/tx/auto5/1412/25/c1/1097875_1097875_1419487751874_400x300.jpg",
modelId: "36339",
modelName: "奥迪Q5 2015款 40 TFSI 技术型 ",
price: "43.16",
sellState: 0,
smallPath: "http://img.pcauto.com.cn/images/upload/upc/tx/auto5/1412/25/c1/1097875_1097875_1419487751874_120x90.jpg"
},...
}