社区首页相关接口.md
5.07 KB
1、获取首页的版块轮播信息
获取首页的版块轮播信息(method=app.social.getForumCarouselInfo)
公共请求参数
参数名称 | 参数类型 | 长度 | 可否为空 | 示例 | 默认值 | 备注 |
---|---|---|---|---|---|---|
client_secret | string | 50 | 否 | 5ac68f20cb18efe154be | 进入接口提供的参数加密信息 | |
app_version | float | 10 | 否 | 1 | APP版本 | |
os_version | string | 20 | 否 | Android4.4 | 系统版本+机器型号 | |
client_type | string | 20 | 否 | iphone/android/ipad | 手机型号(不区分大小写) | |
screen_size | string | 20 | 否 | 800x900 | (手机尺寸) |
请求参数
无
注意,通用的头部没有列出。
请求示例
http://192.168.102.205:8080/gateway?method=app.social.getForumCarouselInfo
响应
code为200即为成功,否则是失败。 响应JSON格式如下所示:
{
"alg": "SALT_MD5",
"code": 200,
"data": [
{
"forumName": "版块1",
"forumDesc": "版块1的说明",
"hotPost": {
"postsTitle": "",
"contentData": "",
"postId": 0,
"authorId": 0,
"authorHeadIcon": ""
},
"orderBy": 1,
"praiseNum": 1,
"newPost": {
"postsTitle": "",
"contentData": "",
"postId": 0,
"authorId": 0,
"authorHeadIcon": ""
},
"forumCode": 10001,
"oneDayAddNum": 0,
"commentsNum": 1,
"forumPic": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d4.png",
"postsNum": 1
},
{
"forumName": "版块2",
"forumDesc": "版块2的说明",
"hotPost": {
"postsTitle": "",
"contentData": "",
"postId": 0,
"authorId": 0,
"authorHeadIcon": ""
},
"orderBy": 1,
"praiseNum": 9,
"newPost": {
"postsTitle": "有标题有正文有图片",
"contentData": "啊啊啊啊啊啊SDDDDDDDD啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊哈哈哈哈哈哈哈哈啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊",
"postId": 60,
"authorId": 2222222,
"authorHeadIcon": "http://img10.static.yhbimg.com/yhb-img01/2016/06/28/17/01b4ab5ad41e5b2d1106915828f41c4bc6.jpg"
},
"forumCode": 10002,
"oneDayAddNum": 0,
"commentsNum": 4,
"forumPic": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d4.png",
"postsNum": 3
},
{
"forumName": "版块3",
"forumDesc": "版块3的说明",
"hotPost": {
"postsTitle": "",
"contentData": "",
"postId": 0,
"authorId": 0,
"authorHeadIcon": ""
},
"orderBy": 1,
"praiseNum": 1,
"newPost": {
"postsTitle": "",
"contentData": "",
"postId": 0,
"authorId": 0,
"authorHeadIcon": ""
},
"forumCode": 10003,
"oneDayAddNum": 0,
"commentsNum": 0,
"forumPic": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d4.png",
"postsNum": 1
},
{
"forumName": "版块4",
"forumDesc": "版块4的说明",
"hotPost": {
"postsTitle": "",
"contentData": "啊啊啊啊啊啊SDDDDDDDD啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊哈哈哈",
"postId": 72,
"authorId": 4444,
"authorHeadIcon": ""
},
"orderBy": 1,
"praiseNum": 0,
"newPost": {
"postsTitle": "",
"contentData": "啊啊啊啊啊啊SDDDDDDDD啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊哈哈哈",
"postId": 78,
"authorId": 10002,
"authorHeadIcon": ""
},
"forumCode": 10004,
"oneDayAddNum": 0,
"commentsNum": 0,
"forumPic": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d4.png",
"postsNum": 5
}
],
"md5": "0110f87c742a00c7ffc2f65eab559482",
"message": "社区首页版块成功."
}