wiki:pconline_4.5.0/interface

电脑网4.5.0接口文档

1.接口列表


1.1 兑吧积分商城接口

具体接口说明,参照兑吧官方文档  http://docs.duiba.com.cn/tech_doc_book/index.html

测试环境接口域名 mdata.pconline.com.cn -> v72.pconline.com.cn

1.1.1 获取免登陆url的接口

接口: http://mdata.pconline.com.cn/pconline/user/score.jsp?act=getUserScore

说明

客户端进入积分商城的时候,访问该接口获取用户最新积分(credits),并获取商城的免登录url(redirect),然后用此url进行302跳转则可进入积分商城

缓存时间

提交方式

GET

是否登录

返回

{
    "timestamp": 1458620064615,
    "credits": 5,
    "redirect": "http://www.duiba.com.cn/autoLogin/autologin?uid=388&credits=5&appKey=zxajsvYBQgDd4DvKTe7pMEXRNVN&sign=237fc6d982751b039207793a408b7dc0&timestamp=1458620064624"
}

1.1.2 用户积分扣除接口

接口: http://mdata.pconline.com.cn/pconline/user/duibaOrder.jsp

例子:  http://mdata.pconline.com.cn/pconline/user/duibaOrder.jsp?uid=388&credits=1&orderNum=2016032211574881601107640&params=&type=coupon&ip=14.23.152.209&sign=bb04f2d20b16db50982093235730ff20&waitAudit=false&timestamp=1458619069046&actualPrice=0&description=%E6%B5%8B%E8%AF%95%E4%B8%93%E7%94%A8%E4%BC%98%E6%83%A0%E5%88%B8%E3%80%8Atesting+%E3%80%8B&facePrice=1&appKey=zxajsvYBQgDd4DvKTe7pMEXRNVN&

说明

提供给兑吧调用的接口,当用户发起兑换请求后,兑吧将会创建一个订单,然后发起该用户的积分扣除请求给开发者。

缓存时间

提交方式

GET

是否登录

返回

成功:
{
    'status': 'ok',
    'errorMessage': '',
    'bizId': '20140730192133033',
    'credits': '100'
}

失败:
{
    'status': 'fail',
    'errorMessage': '失败原因(显示给用户)',
    'credits': '100'
}

1.1.3 兑换结果通知接口

接口: http://mdata.pconline.com.cn/pconline/user/duibaNotify.jsp

例子:  http://mdata.pconline.com.cn/pconline/user/duibaNotify.jsp?sign=807d98e716e63032039f7250ef4f2879&timestamp=1458629247320&errorMessage=%E5%A4%B1%E8%B4%A5%E7%9A%84%E8%AF%9D%E8%BF%99%E9%87%8C%E4%BC%9A%E8%BF%94%E5%9B%9E%E9%94%99%E8%AF%AF%E5%8E%9F%E5%9B%A0&paramsTest65=65&orderNum=2016032212001455701107871&bizId=43&success=true&appKey=zxajsvYBQgDd4DvKTe7pMEXRNVN&

说明

提供给兑吧调用的接口,不管兑换行为最终成功还是失败,兑吧都会向开发者发出通知,汇报兑换结果

缓存时间

提交方式

GET

是否登录

返回

ok

1.2 文章发评论接口增加机型字段

接口: http://cmt.pconline.com.cn/action/comment/create_utf8.jsp

说明

原文章发评论接口增加传入用户机型字段和用户自定义机型字段

缓存时间

提交方式

POST

是否登录

新增参数

参数名 类型 默认值 是否必需 说明
model string 用户实际的手机型号
customModel string 用户自定义的手机型号

1.3 评论列表接口返回自定义机型字段

接口: http://mrobot.pconline.com.cn/v3/cmt/new_topics/ {topicId}

示例: http://mrobot.pconline.com.cn/v3/cmt/new_topics/13440544?pageNo=1&pageSize=20&reverse=0&articleId=7571361

说明

文章评论列表接口返回用户自定义机型字段

缓存时间

提交方式

GET

是否登录

返回

{
{
    "comments": [
        {
            "1": {
                "client": "3",
                "content": "新品叫:New iPad Air Pro Mini",
                "face": "http://i7.3conline.com/images/upload/upc/face/56/09/65/0/5609650_50x50",
                "floor": "5",
                "from": "来自炫酷爱疯6",
                "id": "40957155",
                "name": "LinSing",
                "time": "2016-02-26 10:39:16",
                "userId": "5609650"
            },
            "current": "1",
            "expand": false,
            "support": "1"
        }
    ],
    "docUrl": "http://mrobot.pconline.com.cn/v3/cms/articles/7571361",
    "hot-comments": [],
    "pageCount": 1,
    "pageNo": 1,
    "total": 1
}

返回参数说明

参数名 参数含义
from 用户自定义的手机型号

说明:如果用户在客户端上使用,优先显示用户自定义机型,如果没有自定义机型,则显示真实机型。如果在其他平台评论的,例如网页版,WAP等,按照原来的显示规则。

1.4 论坛发贴、回帖接口增加机型字段

mrobot接口:

发帖: http://mrobot.pconline.com.cn/proxy/itbbs/forums
回帖: http://mrobot.pconline.com.cn/proxy/itbbs/topics

发帖: http://mrobot.pconline.com.cn/proxy/piebbs/forums
回帖: http://mrobot.pconline.com.cn/proxy/piebbs/topics

后端接口:

发帖: http://itbbs.pconline.com.cn/rest/forums
回帖: http://itbbs.pconline.com.cn/rest/topics

发帖: http://piebbs.pconline.com.cn/rest/forums
回帖: http://piebbs.pconline.com.cn/rest/topics

说明

原论坛发帖、回帖接口增加传入用户机型字段和用户自定义机型字段

缓存时间

提交方式

POST

是否登录

新增参数

参数名 类型 默认值 是否必需 说明
ua string 用户实际的手机型号
fakeUa string 用户自定义的手机型号

1.5 帖子终端页增加机型显示

接口:

 http://mrobot.pconline.com.cn/v2/itbbs/topics/ {postId}
 http://mrobot.pconline.com.cn/v2/piebbs/topics/ {postId}

示例: http://mrobot.pconline.com.cn/v2/itbbs/topics/52713495?pageNo=1&picRule=2&authorId=0&topicTemplate=3.6.0&app=pconlinebrowser&appVersion=4.5.0&size=18

说明

帖子终端页接口返回用户自定义机型

缓存时间

提交方式

GET

是否登录

1.6 手机号注册

接口: http://passport3.pconline.com.cn/passport3/api/registerForMobile.jsp

说明

手机注册接口

缓存时间

提交方式

HTTPS POST

是否登录

参数

参数名 是否必需 默认值 说明
mobile 手机号码
mobileVCode 手机验证码
username 用户名,参数值等于mobile
password 登录密码
passwordConfirm 确认密码
noAccountName 1 参数=1,系统自动为账号生成用户名
req_enc utf-8 提交编码
resp_enc utf-8 返回编码

返回

 {"status":0,"desc":"OK","accountId":" + accountId + "}
 {"status":1,"desc":"用户名是必填项","field":"username"}
 {"status":2,"desc":"用户名不允许包含空白字符","field":"username"}
 {"status":3,"desc":"用户名不允许为纯数字","field":"username"}
 {"status":4,"desc":"该用户名前缀不能使用","field":"username"}
 {"status":5,"desc":"该用户名涉及关键字不能使用","field":"username"}
 {"status":6,"desc":"用户名过长,请输入8个汉字或16个字符(数字,字母,减号,下划线,点号,中文,日文平假名/片假名)","field":"username"}
 {"status":7,"desc":"用户名含有非法字符,用户名只支持数字、字母、减号、下划线、点号、中文、日文平假名/片假名","field":"username"}
 {"status":8,"desc":"该用户名已经注册使用","field":"username"}
 {"status":21,"desc":"密码是必填项","field":"password"}
 {"status":22,"desc":"密码过短,密码为6-16个字母、数字、符号的组合","field":"password"}
 {"status":23,"desc":"密码过长,不超过16个字符","field":"password"}
 {"status":24,"desc":"密码只能是字母、数字、英文符号的组合","field":"password"}
 {"status":25,"desc":"确认密码密码是必填项","field":"password"}
 {"status":26,"desc":"两次输入的密码不一致,请确认","field":"password"}
 {"status":41,"desc":"手机号必须输入","field":"mobile"}
 {"status":42,"desc":"请输入正确的手机号码","field":"mobile"}
 {"status":43,"desc":"请输入验证码","field":"mobileVCode"}
 {"status":44,"desc":"请输入正确验证码","field":"mobileVCode"}
 {"status":45,"desc":"验证码错误或失效","field":"mobileVCode"}
 {"status":46,"desc":"该手机号码已经注册","field":"mobile"}
 {"status":-1,"desc":"非法请求"}
 {"status":-3,"desc":"注册失败,请稍候再试!"}
 {"status":-4,"desc":"其他错误:"......"} 

返回参数说明

参数名 参数含义
status 处理状态(0 为成功,其他为失败)
desc 处理状态描述
accountId 用户ID
field 定位到表单输入框(状态为失败时才出现)

1.7 注册时发送手机验证码

接口: http://passport3.pconline.com.cn/passport3/api/sendVerificationCode.jsp

说明

用于注册新账号时发送手机验证码,同一个手机号码一天之内只能发5次(目前的设定)

缓存时间

提交方式

POST

是否登录

参数

参数名 是否必需 默认值 说明
act act = getPassword 不检查手机号码是否已经注册
act act = check: 必须传 verificationCode = (验证码),检查验证码是否正确
act act = 不传 不传act参数,将会默认检查手机是否注册,已注册手机不发验证码
mobile 手机号
vCodeKey sendVerificationCode.jsp+当前系统毫秒数 进行md5加密
VCodeTime 为系统当前时间毫秒数
req_enc utf-8 提交编码
resp_enc utf-8 返回编码

返回

 {"code":0, "message":"发送验证码成功,手机号:1111111"}
 {"code":-1, "message":"...各种情况.."}

返回参数说明

参数名 参数含义
status 处理状态(0 为成功,其他为失败)
desc 处理状态描述

1.8 验证手机号是否可用

接口: http://passport3.pconline.com.cn/passport3/api/validate_mobile.jsp

说明

验证手机号是否可用

缓存时间

提交方式

GET

是否登录

参数

参数名 是否必需 默认值 说明
mobile 手机号
req_enc utf-8 提交编码
resp_enc utf-8 返回编码

返回

 {"status":0,"desc":"OK"}'
 {"status":41,"desc":"手机号必须输入","field":"mobile"}
 {"status":42,"desc":"请输入正确的手机号码","field":"mobile"}
 {"status":43,"desc":"该手机号码已经注册","field":"mobile"}

返回参数说明

参数名 参数含义
status 处理状态(0 为成功,其他为失败)
desc 处理状态描述

1.9 意见反馈增加上传图片

接口:

说明


缓存时间

提交方式

是否登录

参数

返回

返回参数说明

参数名 参数含义

Attachments