Table of Contents
1.基本约定
mrobot开发机代理:192.168.10.199 端口为 1080
mrobot测试机代理:192.168.10.198 端口为 1080
2.接口列表
2.1 获取全国所有城市接口
请求url:http://mrobot.pcauto.com.cn/xsp/x/xueche.pcauto.com.cn/interface/app/jsonArea.jsp
HTTP请求方式:GET
是否需要登录:否
返回格式:json
缓存方式:无
缓存时间:无
请求参数:
无
返回结果:
{
"code": 0或-1 (0成功,-1失败)
"message":提示信息
"addressList": [
{
“citypy":"A" (字母)
"cityId": 城市编号,
"city": “鞍山市”,
“type” : “2”
},
{
"citypy":"C"
"cityId": 1,
"city": “北京市",
“type” : “1”
}
]
}
2.2 获取驾校接口
请求url:http://mrobot.pcauto.com.cn/xsp/x/xueche.pcauto.com.cn/interface/app/getSchoolByCityId.jsp?cityId=440100
HTTP请求方式:GET
是否需要登录:false
返回格式:json
缓存方式:无
缓存时间:没有
请求参数:
“cityId" : 城市id
“type” : 1代表省,2代表市(北京,天津,上海,重庆参数请求为1,其它市区参数请求为2)
返回结果:
{
"code": 0或-1 (0成功,-1失败)
"message":提示信息
"schoolList": [
{
"school": "粤通驾校"
},
{
"school": "粤南驾校"
}
]
}
2.3 获取评论精华接口
获取题库对应的所有精华评论,返回json文件
请求url:http://mrobot.pcauto.com.cn/configs/pcauto_drive_questionBank
HTTP请求方式:GET
是否需要登录:false
返回格式:json
缓存方式:无
缓存时间:无
请求参数:无
返回结果:
{
"version":"1" ,
"url": "http://ftp-apk.pconline.com.cn/82291eabece07cd0d161164be8f88e88/pub/download/201010/pcauto.zip"
}
2.4 获取评论列表json接口
请求url:http://mrobot.pcauto.com.cn/xsp/x/xueche.pcauto.com.cn/interface/app/getCommentByQuestionId.jsp?questionId=3&page=2&size=2
HTTP请求方式:GET
是否需要登录:false
返回格式:json
缓存方式:无
缓存时间:无
请求参数:
“questionId” : 3 (题库id)
“page”:1 (第几页)
“size” : 20 (获取几条数据,小于等于20)
(注明:一页最多20条评论,分页请求)
返回结果:
{
"code": 0,(0正常,-1异常)
“message":提示信息,
“pageSize":每页条数,
“pageCount":总共几页,
"topicList": [
{
"dynaInfoId":评论id,
"nickName": "作者名称",
"topicContent": "评论内容",
"praiseCount":"点赞数",
"publishTime": “发布时间",
"replayList": [
{
replayId: 回复id
name: 回复人名称
replayContent: 回复内容
replayTime: 回复时间
}
],
},
{
"dynaInfoId":10,
"nickName": "小红",
"topicContent": "评论内容",
"praiseCount":5,
"publishTime": "2015-05-13 17:15",
"replayList": [
{
replayId: 2
name: 小明
replayContent: 回复内容
replayTime: "2015-05-15 17:58"
}
]
}
]
}
2.5 成绩分享
请求url:http://mrobot.pcauto.com.cn/xsp/s/auto/info/xueChe/scoreShare.xsp
HTTP请求方式:GET
是否需要登录:false
返回格式:html
缓存方式:无
缓存时间:无
请求参数:
“imageUrl” : www.baidu.com (头像图片地址)
“score”:90 : (分数)
“constTime” : 121 (用时)
“userName”: 华 (用户名)
“schoolName” : 东方驾校 (驾校)
“gender”: 0|1(性别0=女|男=1)
“subjectId” : 1=科目一 | 科目四=4
返回结果:HTML
2.6 习题分享
请求url:http://mrobot.pcauto.com.cn/xsp/s/auto/info/xueChe/exerciseShare.xsp?questionId=3
HTTP请求方式:GET
是否需要登录:false
返回格式:html
缓存方式:无
缓存时间:无
请求参数:
“questionId” : 3 (习题ID)
返回结果:HTML
2.7 获取个人信息
获取个人信息接口(登录时获取)
请求url:http://mrobot.pcauto.com.cn/xsp/s/auto/info/xueChe/getPersonalinf.xsp
HTTP请求方式:get
是否需要登录:是
返回格式:json
缓存方式:无
缓存时间:无
返回参数:
{
"code": 0,
"gender": 1,
"message": "成功",
"address": "天气预报",
"drivingSchool": "天河驾校",
"drivingSchoolId": 8059
}
![(please configure the [header_logo] section in trac.ini)](http://www1.pconline.com.cn/hr/2009/global/images/logo.gif)