wiki:bestIntf

Version 1 (modified by zhangguangwen, 10 years ago) (diff)

--

批量查询爆料点赞、踩、收藏数、评论数

线上: http://best.pconline.com.cn/intf/shangpinbaike/getTopicAttributes.jsp

说明

根据爆料ID出爆料点赞、踩、收藏数、评论数,批量查询

提交方式

post

是否需要登录

false

缓存方式

缓存时间

参数

参数名 参数含义 类型 默认值 是否必须
ids爆料id,用英文逗号隔开string""
callback回调参数string""

返回

result {
    "data":[
        {
            "badCount":1,//踩次数
            "commentCount":0,//评论数
            "favoriteCount":1,//收藏数
            "goodCount":7,//点赞数
            "topicId":2//爆料id
        },
        {
            "badCount":5,
            "commentCount":0,
            "favoriteCount":0,
            "goodCount":4,
            "topicId":11
        },
        {
            "badCount":0,
            "commentCount":0,
            "favoriteCount":0,
            "goodCount":4,
            "topicId":22
        }
    ],
    "msg":"success", 
    "status":1
}

返回状态

status msg 说明
1success请求成功
0null结果为空
-1parameter error参数错误

收藏接口

线上: http://best.pconline.com.cn/action/collect/collect.jsp

说明

收藏接口,支持跨域,限制每个用户1秒内请求一次

提交方式

post

是否需要登录

true

缓存方式

缓存时间

参数

参数名 参数含义 类型 默认值 是否必须
topicId爆料idlong""
num原有收藏数long""
isCollect/收藏或取消收藏 0取消收藏 1收藏int""
callback回调参数string""

返回

result {
    "count":1,//收藏数
    "status":1
}

返回状态

status desc 说明
1已收藏1收藏成功
2 收藏不成功
3 爆料不存在
4 取消收藏成功
0正在收藏,请稍候!已收藏不能再收藏
-1 未登录

点赞点踩接口

线上: http://best.pconline.com.cn/action/topic/like_and_dislike.jsp

说明

点赞点踩接口,支持跨域

提交方式

post

是否需要登录

true

缓存方式

缓存时间

参数

参数名 参数含义 类型 默认值 是否必须
topicId爆料idstring""
num原有收藏数string""
operate 0 赞 1 踩string""
callback回调参数string""

返回

result {
    "code":1,
    "desc":"投票成功"
}

返回状态

code desc
1投票成功!
0亲,您已经投过票了!
-1投票失败!
-2参数不对!
-3爆料不存在!
error不合法的请求方式!

加金币加积分接口

线上: http://best.pconline.com.cn/intf/shangpinbaike/addGoldAndScore.jsp

说明

提供加积分和金币接口 ,有ip限定,只提供给商品百科。

提交方式

post

是否需要登录

true

缓存方式

缓存时间

参数

参数名 参数含义 类型 默认值 是否必须
gold金币int""
score积分int""
experience经验int""
userid用户idlong""

返回

result {
    "status":1,
    "msg":"添加成功"
}

返回状态

status msg 说明
1添加成功添加成功
0未找到该用户:+userid 未找到该用户
-1你当前的ip:+ip地址+没有权限访问 非商品百科,没有权限访问
-2请求方式错误 请求方式错误

根据所属地域查询电商列表

线上: http://best.pconline.com.cn/intf/mall/getMallByType.jsp

说明

根据所属地域查询电商列表,支持跨域

提交方式

post

是否需要登录

false

缓存方式

ATS

缓存时间

10分钟

参数

参数名 参数含义 类型 默认值 是否必须
typeId国内外电商 0国内电商 1国外电商 2跨境电商 3转运公司int""
callback回调参数string""
pageNo页数,默认为1int""
pageSize每页数量,默认为10,最大为100int""

返回

result {
   {
    "data":[
        {
            "Logo":"http://dev2.pconline.com.cn:9191/upcfiles/pc_best/1604/07/c0/114692_1460009584501.jpg",
            "name":"测试电商1",
            "seq":1,
            "url":"http://best.pconline.com.cn/mall/网易考拉海购/youhui"
        }
    ],
    "msg":"success",
    "status":1
}

返回状态

status msg 说明
1success请求成功
0null结果为空
-1parameter error请求参数错误